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 0465b349572021e36a5619fbe4fcf833501b0901 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 08:21:53 +0000 Subject: [PATCH 3/3] chore(deps): bump peaceiris/actions-gh-pages from 2.9.0 to 3.8.0 Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 2.9.0 to 3.8.0. - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v2.9.0...v3.8.0) --- updated-dependencies: - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/gh-pages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index dc08efb64d51..c4443f99e3c4 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -39,7 +39,7 @@ jobs: name: docs path: site if-no-files-found: error - - uses: peaceiris/actions-gh-pages@v2.9.0 + - uses: peaceiris/actions-gh-pages@v3.8.0 if: github.repository == 'argoproj/argo-workflows' && github.ref == 'refs/heads/master' env: PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}