From 1750e50063e839a562aa697a96fa94ff8d68e42f Mon Sep 17 00:00:00 2001 From: "yangxue.chen" Date: Wed, 16 Jun 2021 11:17:03 +0800 Subject: [PATCH 1/3] [aidi][feat] support resource create or get --- workflow/executor/resource.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/workflow/executor/resource.go b/workflow/executor/resource.go index 536b9465fa8b..65fee9361005 100644 --- a/workflow/executor/resource.go +++ b/workflow/executor/resource.go @@ -24,7 +24,7 @@ import ( "github.com/argoproj/argo-workflows/v3/util" envutil "github.com/argoproj/argo-workflows/v3/util/env" argoerr "github.com/argoproj/argo-workflows/v3/util/errors" - os_specific "github.com/argoproj/argo-workflows/v3/workflow/executor/os-specific" + "github.com/argoproj/argo-workflows/v3/workflow/executor/os-specific" ) // ExecResource will run kubectl action against a manifest @@ -38,6 +38,18 @@ func (we *WorkflowExecutor) ExecResource(action string, manifestPath string, fla log.Info(strings.Join(cmd.Args, " ")) out, err := cmd.Output() + if err != nil && action == "create" { + // create支持restart,如果create err(already exists), try get + args, err = we.getKubectlArguments("get", manifestPath, flags) + if err != nil { + return "", "", "", err + } + + cmd = exec.Command("kubectl", args...) + log.Info(strings.Join(cmd.Args, " ")) + + out, err = cmd.Output() + } if err != nil { if exErr, ok := err.(*exec.ExitError); ok { errMsg := strings.TrimSpace(string(exErr.Stderr)) From 0ca724522651d20108466d5b04a6457794cb75ce Mon Sep 17 00:00:00 2001 From: "yangxue.chen" Date: Fri, 24 Sep 2021 10:20:16 +0800 Subject: [PATCH 2/3] Revert "[aidi][feat] support resource create or get" This reverts commit 1750e500 --- workflow/executor/resource.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/workflow/executor/resource.go b/workflow/executor/resource.go index 65fee9361005..536b9465fa8b 100644 --- a/workflow/executor/resource.go +++ b/workflow/executor/resource.go @@ -24,7 +24,7 @@ import ( "github.com/argoproj/argo-workflows/v3/util" envutil "github.com/argoproj/argo-workflows/v3/util/env" argoerr "github.com/argoproj/argo-workflows/v3/util/errors" - "github.com/argoproj/argo-workflows/v3/workflow/executor/os-specific" + os_specific "github.com/argoproj/argo-workflows/v3/workflow/executor/os-specific" ) // ExecResource will run kubectl action against a manifest @@ -38,18 +38,6 @@ func (we *WorkflowExecutor) ExecResource(action string, manifestPath string, fla log.Info(strings.Join(cmd.Args, " ")) out, err := cmd.Output() - if err != nil && action == "create" { - // create支持restart,如果create err(already exists), try get - args, err = we.getKubectlArguments("get", manifestPath, flags) - if err != nil { - return "", "", "", err - } - - cmd = exec.Command("kubectl", args...) - log.Info(strings.Join(cmd.Args, " ")) - - out, err = cmd.Output() - } if err != nil { if exErr, ok := err.(*exec.ExitError); ok { errMsg := strings.TrimSpace(string(exErr.Stderr)) From 1ded064bafacd73dce6f7f9beef1c7ea6a4119d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 08:25:02 +0000 Subject: [PATCH 3/3] chore(deps-dev): bump tslint-react from 3.6.0 to 4.1.0 in /ui Bumps [tslint-react](https://github.com/palantir/tslint-react) from 3.6.0 to 4.1.0. - [Release notes](https://github.com/palantir/tslint-react/releases) - [Commits](https://github.com/palantir/tslint-react/compare/3.6.0...4.1.0) --- updated-dependencies: - dependency-name: tslint-react dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- ui/package.json | 2 +- ui/yarn.lock | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ui/package.json b/ui/package.json index 72601ed84024..e051c452c611 100644 --- a/ui/package.json +++ b/ui/package.json @@ -81,7 +81,7 @@ "tslint": "^5.20.1", "tslint-config-prettier": "^1.18.0", "tslint-plugin-prettier": "^2.3.0", - "tslint-react": "^3.4.0", + "tslint-react": "^4.1.0", "typescript": "^4.6.4", "webfonts-generator": "^0.4.0", "webpack": "^4.46.0", diff --git a/ui/yarn.lock b/ui/yarn.lock index 204c645a7c44..53ce11dc5733 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -9764,11 +9764,12 @@ tslint-plugin-prettier@^2.3.0: lines-and-columns "^1.1.6" tslib "^1.7.1" -tslint-react@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1" +tslint-react@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-4.1.0.tgz#7153b724a8cfbea52423d0ffa469e8eba3bcc834" + integrity sha512-Y7CbFn09X7Mpg6rc7t/WPbmjx9xPI8p1RsQyiGCLWgDR6sh3+IBSlT+bEkc0PSZcWwClOkqq2wPsID8Vep6szQ== dependencies: - tsutils "^2.13.1" + tsutils "^3.9.1" tslint@^5.20.1: version "5.20.1" @@ -9789,13 +9790,20 @@ tslint@^5.20.1: tslib "^1.8.0" tsutils "^2.29.0" -tsutils@^2.13.1, tsutils@^2.29.0: +tsutils@^2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== dependencies: tslib "^1.8.1" +tsutils@^3.9.1: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + ttf2eot@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ttf2eot/-/ttf2eot-2.0.0.tgz#8e6337a585abd1608a0c84958ab483ce69f6654b"