This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 951478c71d3 NO-ISSUE: Remove workflow plugin dependency on 
knative/client int… (#2293)
951478c71d3 is described below

commit 951478c71d3b2a9c2075f044bea303a24a4fa4aa
Author: Dmitrii Tikhomirov <[email protected]>
AuthorDate: Thu May 16 19:40:28 2024 -0700

    NO-ISSUE: Remove workflow plugin dependency on knative/client int… (#2293)
---
 packages/kn-plugin-workflow/go.mod           |  5 +-
 packages/kn-plugin-workflow/go.sum           |  6 ---
 packages/kn-plugin-workflow/plugin/plugin.go | 76 ----------------------------
 3 files changed, 2 insertions(+), 85 deletions(-)

diff --git a/packages/kn-plugin-workflow/go.mod 
b/packages/kn-plugin-workflow/go.mod
index e2fc64ec699..8f1334c2e5d 100644
--- a/packages/kn-plugin-workflow/go.mod
+++ b/packages/kn-plugin-workflow/go.mod
@@ -19,7 +19,6 @@ require (
        github.com/spf13/cobra v1.7.0
        github.com/stretchr/testify v1.8.4
        gopkg.in/yaml.v2 v2.4.0
-       knative.dev/client v0.38.0
 )
 
 require (
@@ -61,7 +60,6 @@ require (
        github.com/magiconair/properties v1.8.7 // indirect
        github.com/mailru/easyjson v0.7.7 // indirect
        github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
-       github.com/mitchellh/go-homedir v1.1.0 // indirect
        github.com/mitchellh/mapstructure v1.5.0 // indirect
        github.com/moby/term v0.5.0 // indirect
        github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // 
indirect
@@ -81,6 +79,7 @@ require (
        github.com/relvacode/iso8601 v1.3.0 // indirect
        github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
        github.com/senseyeio/duration v0.0.0-20180430131211-7c2a214ada46 // 
indirect
+       github.com/sergi/go-diff v1.2.0 // indirect
        github.com/serverlessworkflow/sdk-go/v2 v2.2.5 // indirect
        github.com/spf13/cast v1.5.1 // indirect
        github.com/spf13/jwalterweatherman v1.1.0 // indirect
@@ -104,6 +103,7 @@ require (
        gopkg.in/inf.v0 v0.9.1 // indirect
        gopkg.in/ini.v1 v1.67.0 // indirect
        gopkg.in/yaml.v3 v3.0.1 // indirect
+       gotest.tools/v3 v3.3.0 // indirect
        k8s.io/api v0.28.1 // indirect
        k8s.io/apiextensions-apiserver v0.28.1 // indirect
        k8s.io/apimachinery v0.28.1 // indirect
@@ -112,7 +112,6 @@ require (
        k8s.io/klog/v2 v2.100.1 // indirect
        k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
        k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
-       knative.dev/client-pkg v0.0.0-20230911133121-2bcbd97b17ec // indirect
        knative.dev/pkg v0.0.0-20231023151236-29775d7c9e5c // indirect
        sigs.k8s.io/controller-runtime v0.16.2 // indirect
        sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
diff --git a/packages/kn-plugin-workflow/go.sum 
b/packages/kn-plugin-workflow/go.sum
index 0cf4f136e98..f4a9214d352 100644
--- a/packages/kn-plugin-workflow/go.sum
+++ b/packages/kn-plugin-workflow/go.sum
@@ -252,8 +252,6 @@ github.com/mailru/easyjson v0.7.7 
h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
 github.com/mailru/easyjson v0.7.7/go.mod 
h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
 github.com/matttproud/golang_protobuf_extensions v1.0.4 
h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
 github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod 
h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
-github.com/mitchellh/go-homedir v1.1.0 
h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
-github.com/mitchellh/go-homedir v1.1.0/go.mod 
h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
 github.com/mitchellh/mapstructure v1.1.2/go.mod 
h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/mitchellh/mapstructure v1.5.0 
h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
 github.com/mitchellh/mapstructure v1.5.0/go.mod 
h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
@@ -767,10 +765,6 @@ k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f 
h1:eeEUOoGYWhOz7EyXqhlR2z
 k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod 
h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
 k8s.io/utils v0.0.0-20230726121419-3b25d923346b 
h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
 k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod 
h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
-knative.dev/client v0.38.0 h1:bQNPT9evQ28nFOc47VjUwtj3u7qQOk1n+Gn5KQ0zFKg=
-knative.dev/client v0.38.0/go.mod 
h1:oehBPjAXDum8sw1Tj51IF+5HEyQ8ya+Pa2O+7+/9X1E=
-knative.dev/client-pkg v0.0.0-20230911133121-2bcbd97b17ec 
h1:zaZJpw2q0iMaJ8ijQKlN/FMKqqubC5AZXVYMS1ibfoU=
-knative.dev/client-pkg v0.0.0-20230911133121-2bcbd97b17ec/go.mod 
h1:GRVZm1rKOy0lpPBGRM1ugK5joDbhXFEvULINHqPoA9U=
 knative.dev/pkg v0.0.0-20231023151236-29775d7c9e5c 
h1:xyPoEToTWeBdn6tinhLxXfnhJhTNQt5WzHiTNiFphRw=
 knative.dev/pkg v0.0.0-20231023151236-29775d7c9e5c/go.mod 
h1:HHRXEd7ZlFpthgE+rwAZ6MUVnuJOAeolnaFSthXloUQ=
 rsc.io/binaryregexp v0.2.0/go.mod 
h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
diff --git a/packages/kn-plugin-workflow/plugin/plugin.go 
b/packages/kn-plugin-workflow/plugin/plugin.go
deleted file mode 100644
index ed79d4d1716..00000000000
--- a/packages/kn-plugin-workflow/plugin/plugin.go
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package plugin
-
-import (
-       "os"
-       "runtime/debug"
-       "strings"
-
-       
"github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/root"
-       knplugin "knative.dev/client/pkg/kn/plugin"
-)
-
-type workflowPlugin struct{}
-
-var quarkusPlatformGroupId, quarkusVersion, pluginVersion string
-
-func init() {
-       knplugin.InternalPlugins = append(knplugin.InternalPlugins, 
&workflowPlugin{})
-}
-
-// Name is a plugin's name
-func (w *workflowPlugin) Name() string {
-       return "kn-workflow"
-}
-
-// Execute represents the plugin's entrypoint when called through kn
-func (w *workflowPlugin) Execute(args []string) error {
-       var version string
-       info, _ := debug.ReadBuildInfo()
-       for _, dep := range info.Deps {
-               if strings.Contains(dep.Path, 
"github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow") {
-                       version = dep.Version
-               }
-       }
-
-       cmd := root.NewRootCommand(root.RootCmdConfig{Name: "kn\u00A0workflow", 
Version: version})
-       oldArgs := os.Args
-       defer (func() {
-               os.Args = oldArgs
-       })()
-       os.Args = append([]string{"kn-workflow"}, args...)
-       return cmd.Execute()
-}
-
-// Description is displayed in kn's plugin section
-func (w *workflowPlugin) Description() (string, error) {
-       return "Manage Workflow projects", nil
-}
-
-// CommandParts defines for plugin is executed from kn
-func (w *workflowPlugin) CommandParts() []string {
-       return []string{"workflow"}
-}
-
-// Path is empty because its an internal plugins
-func (w *workflowPlugin) Path() string {
-       return ""
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to