Skip to content

Commit

Permalink
Merge pull request #336 from codefresh-io/cr-24608-sync-upstream-3.5.5
Browse files Browse the repository at this point in the history
feat: sync upstream `v3.5.5`
  • Loading branch information
ATGardner authored Jul 15, 2024
2 parents d95bae5 + a37026f commit c9c8c9d
Show file tree
Hide file tree
Showing 158 changed files with 2,168 additions and 320 deletions.
9 changes: 9 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ ClusterRoleBinding
CRD
CRDs
CloudSQL
ClusterRoleBinding
ClusterRoles
Codespaces
ConfigMap
ConfigMaps
Couler
CronWorkflow
CronWorkflows
DataDog
Dataflow
DeleteObject
Expand Down Expand Up @@ -207,6 +215,7 @@ v2
v2.0
v2.1
v2.10
v2.10.2
v2.11
v2.12
v2.35.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Check out our [Java, Golang and Python clients](docs/client-libraries.md).

## Quickstart

* [Get started here](docs/quick-start.md)
* [Get started here](https://argo-workflows.readthedocs.io/en/release-3.5/quick-start/)
* [Walk-through examples](https://argo-workflows.readthedocs.io/en/release-3.5/walk-through/)

## Documentation
Expand Down
6 changes: 3 additions & 3 deletions api/jsonschema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/argo/commands/client/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func AddAPIClientFlagsToCmd(cmd *cobra.Command) {
cmd.PersistentFlags().StringVar(&instanceID, "instanceid", os.Getenv("ARGO_INSTANCEID"), "submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.")
// "-s" like kubectl
cmd.PersistentFlags().StringVarP(&ArgoServerOpts.URL, "argo-server", "s", os.Getenv("ARGO_SERVER"), "API server `host:port`. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.")
cmd.PersistentFlags().StringVar(&ArgoServerOpts.Path, "argo-base-href", os.Getenv("ARGO_BASE_HREF"), "An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.")
cmd.PersistentFlags().StringVar(&ArgoServerOpts.Path, "argo-base-href", os.Getenv("ARGO_BASE_HREF"), "Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.")
cmd.PersistentFlags().BoolVar(&ArgoServerOpts.HTTP1, "argo-http1", os.Getenv("ARGO_HTTP1") == "true", "If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.")
cmd.PersistentFlags().StringSliceVarP(&ArgoServerOpts.Headers, "header", "H", []string{}, "Sets additional header to all requests made by Argo CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) Used only when either ARGO_HTTP1 or --argo-http1 is set to true.")
// "-e" for encrypted - like zip
Expand Down
16 changes: 1 addition & 15 deletions cmd/argo/commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import (
"context"
"crypto/tls"
"fmt"
"net/http"
"os"
"reflect"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -188,18 +186,6 @@ See %s`, help.ArgoServer),
return err
}

// disabled by default, for security
if x, enabled := os.LookupEnv("ARGO_SERVER_PPROF"); enabled {
port, err := strconv.Atoi(x)
if err != nil {
return err
}
go func() {
log.Infof("starting server for pprof on :%d, see https://golang.org/pkg/net/http/pprof/", port)
log.Println(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
}()
}

server.Run(ctx, port, browserOpenFunc)
return nil
},
Expand Down Expand Up @@ -232,7 +218,7 @@ See %s`, help.ArgoServer),
command.Flags().StringVar(&frameOptions, "x-frame-options", "DENY", "Set X-Frame-Options header in HTTP responses.")
command.Flags().StringVar(&accessControlAllowOrigin, "access-control-allow-origin", "", "Set Access-Control-Allow-Origin header in HTTP responses.")
command.Flags().Uint64Var(&apiRateLimit, "api-rate-limit", 1000, "Set limit per IP for api ratelimiter")
command.Flags().StringArrayVar(&allowedLinkProtocol, "allowed-link-protocol", defaultAllowedLinkProtocol, "Allowed link protocol in configMap. Used if the allowed configMap links protocol are different from http,https. Defaults to the environment variable ALLOWED_LINK_PROTOCOL")
command.Flags().StringArrayVar(&allowedLinkProtocol, "allowed-link-protocol", defaultAllowedLinkProtocol, "Allowed protocols for links feature. Defaults to the environment variable ALLOWED_LINK_PROTOCOL: http,https")
command.Flags().StringVar(&logFormat, "log-format", "text", "The formatter to use for logs. One of: text|json")
command.Flags().Float32Var(&kubeAPIQPS, "kube-api-qps", 20.0, "QPS to use while talking with kube-apiserver.")
command.Flags().IntVar(&kubeAPIBurst, "kube-api-burst", 30, "Burst to use while talking with kube-apiserver.")
Expand Down
29 changes: 25 additions & 4 deletions cmd/argoexec/commands/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,39 @@ package commands
import (
"context"

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

func NewDataCommand() *cobra.Command {
command := cobra.Command{
Use: "data",
Short: "Process data",
RunE: func(cmd *cobra.Command, args []string) error {
ctx := context.Background()
wfExecutor := initExecutor()
return wfExecutor.Data(ctx)
Run: func(cmd *cobra.Command, args []string) {
ctx := cmd.Context()
err := execData(ctx)
if err != nil {
log.Fatalf("%+v", err)
}
},
}
return &command
}

func execData(ctx context.Context) error {
wfExecutor := initExecutor()

// Don't allow cancellation to impact capture of results, parameters, artifacts, or defers.
bgCtx := context.Background()
// Create a new empty (placeholder) task result with LabelKeyReportOutputsCompleted set to false.
wfExecutor.InitializeOutput(bgCtx)
defer wfExecutor.HandleError(bgCtx)
defer wfExecutor.FinalizeOutput(bgCtx) //Ensures the LabelKeyReportOutputsCompleted is set to true.

err := wfExecutor.Data(ctx)
if err != nil {
wfExecutor.AddError(err)
return err
}
return nil
}
9 changes: 8 additions & 1 deletion cmd/argoexec/commands/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@ func NewResourceCommand() *cobra.Command {

func execResource(ctx context.Context, action string) error {
wfExecutor := initExecutor()
defer wfExecutor.HandleError(ctx)

// Don't allow cancellation to impact capture of results, parameters, artifacts, or defers.
bgCtx := context.Background()

wfExecutor.InitializeOutput(bgCtx)
defer wfExecutor.HandleError(bgCtx)
defer wfExecutor.FinalizeOutput(bgCtx) //Ensures the LabelKeyReportOutputsCompleted is set to true.
err := wfExecutor.StageFiles()
if err != nil {
wfExecutor.AddError(err)
return err
}

isDelete := action == "delete"
if isDelete && (wfExecutor.Template.Resource.SuccessCondition != "" || wfExecutor.Template.Resource.FailureCondition != "" || len(wfExecutor.Template.Outputs.Parameters) > 0) {
err = fmt.Errorf("successCondition, failureCondition and outputs are not supported for delete action")
Expand Down
4 changes: 2 additions & 2 deletions docs/argo-server-sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ metadata:
# Must evaluate to a boolean.
# If you want an account to be the default to use, this rule can be "true".
# Details of the expression language are available in
# https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md.
# https://github.com/expr-lang/expr/blob/master/docs/language-definition.md.
workflows.argoproj.io/rbac-rule: "'admin' in groups"
# The precedence is used to determine which service account to use whe
# Precedence is an integer. It may be negative. If omitted, it defaults to "0".
Expand Down Expand Up @@ -197,7 +197,7 @@ workflows.argoproj.io/rbac-rule: "'argo_admins' in groups"

## Filtering groups

> v3.5 and above
> v3.5 and after

You can configure `filterGroupsRegex` to filter the groups returned by the OIDC provider. Some use-cases for this include:

Expand Down
2 changes: 1 addition & 1 deletion docs/artifact-visualization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Artifact Visualization

> since v3.4
> v3.4 and after
Artifacts can be viewed in the UI.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ argo [flags]
### Options

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ argo archive [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ argo archive delete UID... [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ argo archive get UID [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_list-label-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ argo archive list-label-keys [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_list-label-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ argo archive list-label-values [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ argo archive list [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_resubmit.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ argo archive resubmit [WORKFLOW...] [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_archive_retry.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ argo archive retry [WORKFLOW...] [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ argo auth [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_auth_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ argo auth token [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_cluster-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ argo cluster-template [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_cluster-template_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ argo cluster-template create FILE1 FILE2... [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/argo_cluster-template_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ argo cluster-template delete WORKFLOW_TEMPLATE [flags]
### Options inherited from parent commands

```
--argo-base-href string An path to use with HTTP client (e.g. due to BASE_HREF). Defaults to the ARGO_BASE_HREF environment variable.
--argo-base-href string Path to use with HTTP client due to BASE_HREF. Defaults to the ARGO_BASE_HREF environment variable.
--argo-http1 If true, use the HTTP client. Defaults to the ARGO_HTTP1 environment variable.
-s, --argo-server host:port API server host:port. e.g. localhost:2746. Defaults to the ARGO_SERVER environment variable.
--as string Username to impersonate for the operation
Expand Down
Loading

0 comments on commit c9c8c9d

Please sign in to comment.