Skip to content

Commit c9c8c9d

Browse files
authored
Merge pull request #336 from codefresh-io/cr-24608-sync-upstream-3.5.5
feat: sync upstream `v3.5.5`
2 parents d95bae5 + a37026f commit c9c8c9d

File tree

158 files changed

+2168
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+2168
-320
lines changed

.spelling

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ ClusterRoleBinding
4141
CRD
4242
CRDs
4343
CloudSQL
44+
ClusterRoleBinding
45+
ClusterRoles
46+
Codespaces
47+
ConfigMap
48+
ConfigMaps
49+
Couler
50+
CronWorkflow
51+
CronWorkflows
4452
DataDog
4553
Dataflow
4654
DeleteObject
@@ -207,6 +215,7 @@ v2
207215
v2.0
208216
v2.1
209217
v2.10
218+
v2.10.2
210219
v2.11
211220
v2.12
212221
v2.35.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Check out our [Java, Golang and Python clients](docs/client-libraries.md).
7070

7171
## Quickstart
7272

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

7676
## Documentation

api/jsonschema/schema.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/swagger.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/argo/commands/client/conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func AddAPIClientFlagsToCmd(cmd *cobra.Command) {
4545
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.")
4646
// "-s" like kubectl
4747
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.")
48-
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.")
48+
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.")
4949
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.")
5050
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.")
5151
// "-e" for encrypted - like zip

cmd/argo/commands/server.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import (
44
"context"
55
"crypto/tls"
66
"fmt"
7-
"net/http"
87
"os"
98
"reflect"
10-
"strconv"
119
"strings"
1210
"time"
1311

@@ -188,18 +186,6 @@ See %s`, help.ArgoServer),
188186
return err
189187
}
190188

191-
// disabled by default, for security
192-
if x, enabled := os.LookupEnv("ARGO_SERVER_PPROF"); enabled {
193-
port, err := strconv.Atoi(x)
194-
if err != nil {
195-
return err
196-
}
197-
go func() {
198-
log.Infof("starting server for pprof on :%d, see https://golang.org/pkg/net/http/pprof/", port)
199-
log.Println(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
200-
}()
201-
}
202-
203189
server.Run(ctx, port, browserOpenFunc)
204190
return nil
205191
},
@@ -232,7 +218,7 @@ See %s`, help.ArgoServer),
232218
command.Flags().StringVar(&frameOptions, "x-frame-options", "DENY", "Set X-Frame-Options header in HTTP responses.")
233219
command.Flags().StringVar(&accessControlAllowOrigin, "access-control-allow-origin", "", "Set Access-Control-Allow-Origin header in HTTP responses.")
234220
command.Flags().Uint64Var(&apiRateLimit, "api-rate-limit", 1000, "Set limit per IP for api ratelimiter")
235-
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")
221+
command.Flags().StringArrayVar(&allowedLinkProtocol, "allowed-link-protocol", defaultAllowedLinkProtocol, "Allowed protocols for links feature. Defaults to the environment variable ALLOWED_LINK_PROTOCOL: http,https")
236222
command.Flags().StringVar(&logFormat, "log-format", "text", "The formatter to use for logs. One of: text|json")
237223
command.Flags().Float32Var(&kubeAPIQPS, "kube-api-qps", 20.0, "QPS to use while talking with kube-apiserver.")
238224
command.Flags().IntVar(&kubeAPIBurst, "kube-api-burst", 30, "Burst to use while talking with kube-apiserver.")

cmd/argoexec/commands/data.go

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,39 @@ package commands
33
import (
44
"context"
55

6+
log "github.com/sirupsen/logrus"
67
"github.com/spf13/cobra"
78
)
89

910
func NewDataCommand() *cobra.Command {
1011
command := cobra.Command{
1112
Use: "data",
1213
Short: "Process data",
13-
RunE: func(cmd *cobra.Command, args []string) error {
14-
ctx := context.Background()
15-
wfExecutor := initExecutor()
16-
return wfExecutor.Data(ctx)
14+
Run: func(cmd *cobra.Command, args []string) {
15+
ctx := cmd.Context()
16+
err := execData(ctx)
17+
if err != nil {
18+
log.Fatalf("%+v", err)
19+
}
1720
},
1821
}
1922
return &command
2023
}
24+
25+
func execData(ctx context.Context) error {
26+
wfExecutor := initExecutor()
27+
28+
// Don't allow cancellation to impact capture of results, parameters, artifacts, or defers.
29+
bgCtx := context.Background()
30+
// Create a new empty (placeholder) task result with LabelKeyReportOutputsCompleted set to false.
31+
wfExecutor.InitializeOutput(bgCtx)
32+
defer wfExecutor.HandleError(bgCtx)
33+
defer wfExecutor.FinalizeOutput(bgCtx) //Ensures the LabelKeyReportOutputsCompleted is set to true.
34+
35+
err := wfExecutor.Data(ctx)
36+
if err != nil {
37+
wfExecutor.AddError(err)
38+
return err
39+
}
40+
return nil
41+
}

cmd/argoexec/commands/resource.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ func NewResourceCommand() *cobra.Command {
3333

3434
func execResource(ctx context.Context, action string) error {
3535
wfExecutor := initExecutor()
36-
defer wfExecutor.HandleError(ctx)
36+
37+
// Don't allow cancellation to impact capture of results, parameters, artifacts, or defers.
38+
bgCtx := context.Background()
39+
40+
wfExecutor.InitializeOutput(bgCtx)
41+
defer wfExecutor.HandleError(bgCtx)
42+
defer wfExecutor.FinalizeOutput(bgCtx) //Ensures the LabelKeyReportOutputsCompleted is set to true.
3743
err := wfExecutor.StageFiles()
3844
if err != nil {
3945
wfExecutor.AddError(err)
4046
return err
4147
}
48+
4249
isDelete := action == "delete"
4350
if isDelete && (wfExecutor.Template.Resource.SuccessCondition != "" || wfExecutor.Template.Resource.FailureCondition != "" || len(wfExecutor.Template.Outputs.Parameters) > 0) {
4451
err = fmt.Errorf("successCondition, failureCondition and outputs are not supported for delete action")

docs/argo-server-sso.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ metadata:
8383
# Must evaluate to a boolean.
8484
# If you want an account to be the default to use, this rule can be "true".
8585
# Details of the expression language are available in
86-
# https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md.
86+
# https://github.com/expr-lang/expr/blob/master/docs/language-definition.md.
8787
workflows.argoproj.io/rbac-rule: "'admin' in groups"
8888
# The precedence is used to determine which service account to use whe
8989
# Precedence is an integer. It may be negative. If omitted, it defaults to "0".
@@ -197,7 +197,7 @@ workflows.argoproj.io/rbac-rule: "'argo_admins' in groups"
197197

198198
## Filtering groups
199199

200-
> v3.5 and above
200+
> v3.5 and after
201201

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

docs/artifact-visualization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Artifact Visualization
22

3-
> since v3.4
3+
> v3.4 and after
44
55
Artifacts can be viewed in the UI.
66

0 commit comments

Comments
 (0)