Skip to content

Commit 2891faa

Browse files
authored
Merge pull request #347 from codefresh-io/sec-vuln-sync
chore: sync `v.3.5.9` into our fork
2 parents 3a69e55 + 2f9cd8c commit 2891faa

Some content is hidden

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

55 files changed

+917
-341
lines changed

.snyk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities
2+
version: v1.25.0
3+
ignore:
4+
SNYK-GOLANG-GITHUBCOMJACKCPGXV4-7416900:
5+
- '*':
6+
reason: "False Positive: vuln is for pgx/v5, not pgx/v4: https://pkg.go.dev/vuln/GO-2024-2567"
7+
expires: 2024-09-01T11:11:11.001Z

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## v3.5.8 (2024-06-17)
4+
5+
* [d13891154](https://github.com/argoproj/argo-workflows/commit/d1389115484f52d22d1cdcae29139518cbf2fc03) fix(deps): bump `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.5.1 to 1.6.0 to fix CVE (#13197)
6+
* [10488d655](https://github.com/argoproj/argo-workflows/commit/10488d655a78c28bb6e3e6bca490a5496addd605) fix: don't necessarily include all artifacts from templates in node outputs (#13066)
7+
* [c2204ae03](https://github.com/argoproj/argo-workflows/commit/c2204ae03de97acf1c589c898180bdb9942f1524) fix(server): don't use cluster scope list + watch in namespaced mode. Fixes #13177 (#13189)
8+
* [9481bb04c](https://github.com/argoproj/argo-workflows/commit/9481bb04c3e48a85da5ba05ef47c2f0a2ba500f4) fix(server): mutex calls to sqlitex (#13166)
9+
* [ee150afdf](https://github.com/argoproj/argo-workflows/commit/ee150afdf3561f8250c5212e1b6a38628a847b39) fix: only evaluate retry expression for fail/error node. Fixes #13058 (#13165)
10+
* [028f9ec41](https://github.com/argoproj/argo-workflows/commit/028f9ec41cf07056bfcf823a109964b00621797c) fix: Merge templateDefaults into dag task tmpl. Fixes #12821 (#12833)
11+
* [e8f0cae39](https://github.com/argoproj/argo-workflows/commit/e8f0cae398e8f135a6957cd74919368e0b692b6b) fix: Apply podSpecPatch in `woc.execWf.Spec` and template to pod sequentially (#12476)
12+
* [c1a5f3073](https://github.com/argoproj/argo-workflows/commit/c1a5f3073c58033dcfba5d14fe3dff9092ab258d) fix: don't fail workflow if PDB creation fails (#13102)
13+
* [5c56a161c](https://github.com/argoproj/argo-workflows/commit/5c56a161cb66b1c83fc31e5238bb812bc35f9754) fix: Allow termination of workflow to update on exit handler nodes. fixes #13052 (#13120)
14+
* [e5dfe5d73](https://github.com/argoproj/argo-workflows/commit/e5dfe5d7393c04efc0e4067a02a37aae79231a64) fix: load missing fields for archived workflows (#13136)
15+
* [7dc7fc246](https://github.com/argoproj/argo-workflows/commit/7dc7fc246393295a53308df1b77c585d5b24fe07) fix(ui): `package.json#license` should be Apache (#13040)
16+
* [3622a896d](https://github.com/argoproj/argo-workflows/commit/3622a896d08599e0d325e739c9f389c399419f7d) fix(docs): Fix `gcloud` typo (#13101)
17+
* [207e0713a](https://github.com/argoproj/argo-workflows/commit/207e0713a6eae52fc7bd1e9dcb43206d55f1a754) docs(server): full copy-edit of auth mode page (#13137)
18+
19+
### Contributors
20+
21+
* Alan Clucas
22+
* Anton Gilgur
23+
* Janghun Lee(James)
24+
* Jiacheng Xu
25+
* Julie Vogelman
26+
* Miltiadis Alexis
27+
* Tianchu Zhao
28+
* Yulin Li
29+
* jswxstw
30+
331
## v3.5.7 (2024-05-27)
432

533
* [b2b1ecd7d](https://github.com/argoproj/argo-workflows/commit/b2b1ecd7de378cec31ab0ebb1e8b9665c4b05867) chore(deps): bump tj-actions/changed-files from 40 to 41 (#12433)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG GIT_COMMIT=unknown
33
ARG GIT_TAG=unknown
44
ARG GIT_TREE_STATE=unknown
55

6-
FROM golang:1.21-alpine3.18 as builder
6+
FROM golang:1.21-alpine3.19 as builder
77

88
RUN apk update && apk add --no-cache \
99
git \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- markdownlint-disable-next-line MD041 -->
2-
[![Security Status](https://github.com/argoproj/argo-workflows/workflows/Snyk/badge.svg)](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml?query=branch%3Amain)
2+
[![Security Status](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml/badge.svg?branch=release-3.5)](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml?query=branch%3Arelease-3.5)
33
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/3830/badge)](https://bestpractices.coreinfrastructure.org/projects/3830)
44
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/argoproj/argo-workflows/badge)](https://api.securityscorecards.dev/projects/github.com/argoproj/argo-workflows)
55
[![FOSSA License Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fargoproj%2Fargo-workflows.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fargoproj%2Fargo-workflows?ref=badge_shield)

cmd/argo/commands/lint_test.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,45 @@ spec:
169169

170170
assert.False(t, fatal, "should not have exited")
171171
})
172+
173+
workflowCaseSensitivePath := filepath.Join(subdir, "workflowCaseSensitive.yaml")
174+
err = os.WriteFile(workflowCaseSensitivePath, []byte(`
175+
apiVersion: argoproj.io/v1alpha1
176+
kind: Workflow
177+
metadata:
178+
generateName: hello-world-
179+
spec:
180+
entrypoInt: whalesay
181+
templates:
182+
- name: whalesay
183+
container:
184+
image: docker/whalesay
185+
command: [ cowsay ]
186+
args: [ "hello world" ]
187+
resources:
188+
limits:
189+
memory: 32Mi
190+
cpu: 100m
191+
`), 0644)
192+
require.NoError(t, err)
193+
194+
t.Run("linting a workflow with case sensitive fields and strict enabled", func(t *testing.T) {
195+
defer func() { logrus.StandardLogger().ExitFunc = nil }()
196+
var fatal bool
197+
logrus.StandardLogger().ExitFunc = func(int) { fatal = true }
198+
199+
runLint(context.Background(), []string{workflowCaseSensitivePath}, true, nil, "pretty", true)
200+
201+
assert.True(t, fatal, "should have exited")
202+
})
203+
204+
t.Run("linting a workflow with case sensitive fields and strict disabled", func(t *testing.T) {
205+
defer func() { logrus.StandardLogger().ExitFunc = nil }()
206+
var fatal bool
207+
logrus.StandardLogger().ExitFunc = func(int) { fatal = true }
208+
209+
runLint(context.Background(), []string{workflowCaseSensitivePath}, true, nil, "pretty", false)
210+
211+
assert.False(t, fatal, "should not have exited")
212+
})
172213
}

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- markdownlint-disable-next-line MD041 -->
2-
[![Security Status](https://github.com/argoproj/argo-workflows/workflows/Snyk/badge.svg)](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml?query=branch%3Amain)
2+
[![Security Status](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml/badge.svg?branch=release-3.5)](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml?query=branch%3Arelease-3.5)
33
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/3830/badge)](https://bestpractices.coreinfrastructure.org/projects/3830)
44
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/argoproj/argo-workflows/badge)](https://api.securityscorecards.dev/projects/github.com/argoproj/argo-workflows)
55
[![FOSSA License Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fargoproj%2Fargo-workflows.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fargoproj%2Fargo-workflows?ref=badge_shield)

docs/cron-workflows.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
> v2.5 and after
44
5-
## Introduction
6-
7-
`CronWorkflow` are workflows that run on a preset schedule. They are designed to be converted from `Workflow` easily and to mimic the same options as Kubernetes `CronJob`. In essence, `CronWorkflow` = `Workflow` + some specific cron options.
5+
`CronWorkflows` are workflows that run on a schedule.
6+
They are designed to wrap a `workflowSpec` and to mimic the options of Kubernetes `CronJobs`.
7+
In essence, `CronWorkflow` = `Workflow` + some specific cron options.
88

99
## `CronWorkflow` Spec
1010

11-
An example `CronWorkflow` spec would look like:
11+
Below is an example `CronWorkflow`:
1212

1313
```yaml
1414
apiVersion: argoproj.io/v1alpha1
@@ -31,45 +31,49 @@ spec:
3131
3232
### `workflowSpec` and `workflowMetadata`
3333

34-
`CronWorkflow.spec.workflowSpec` is the same type as `Workflow.spec` and serves as a template for `Workflow` objects that are created from it. Everything under this spec will be converted to a `Workflow`.
34+
`CronWorkflow.spec.workflowSpec` is the same type as `Workflow.spec`.
35+
It is a template for `Workflow` objects created from it.
3536

36-
The resulting `Workflow` name will be a generated name based on the `CronWorkflow` name. In this example it could be something like `test-cron-wf-tj6fe`.
37+
The `Workflow` name is generated based on the `CronWorkflow` name.
38+
In the above example it would be similar to `test-cron-wf-tj6fe`.
3739

38-
`CronWorkflow.spec.workflowMetadata` can be used to add `labels` and `annotations`.
40+
You can use `CronWorkflow.spec.workflowMetadata` to add `labels` and `annotations`.
3941

4042
### `CronWorkflow` Options
4143

42-
| Option Name | Default Value | Description |
43-
|:----------------------------:|:----------------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
44-
| `schedule` | None, must be provided | Schedule at which the `Workflow` will be run. E.g. `5 4 * * *` |
45-
| `timezone` | Machine timezone | Timezone during which the Workflow will be run from the IANA timezone standard, e.g. `America/Los_Angeles` |
46-
| `suspend` | `false` | If `true` Workflow scheduling will not occur. Can be set from the CLI, GitOps, or directly |
47-
| `concurrencyPolicy` | `Allow` | Policy that determines what to do if multiple `Workflows` are scheduled at the same time. Available options: `Allow`: allow all, `Replace`: remove all old before scheduling a new, `Forbid`: do not allow any new while there are old |
48-
| `startingDeadlineSeconds` | `0` | Number of seconds after the last successful run during which a missed `Workflow` will be run |
49-
| `successfulJobsHistoryLimit` | `3` | Number of successful `Workflows` that will be persisted at a time |
50-
| `failedJobsHistoryLimit` | `1` | Number of failed `Workflows` that will be persisted at a time |
44+
| Option Name | Default Value | Description |
45+
|:----------------------------:|:----------------------:|-------------|
46+
| `schedule` | None, must be provided | [Cron schedule](#cron-schedule-syntax) to run `Workflows`. Example: `5 4 * * *` |
47+
| `timezone` | Machine timezone | [IANA Timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to run `Workflows`. Example: `America/Los_Angeles` |
48+
| `suspend` | `false` | If `true` Workflow scheduling will not occur. Can be set from the CLI, GitOps, or directly |
49+
| `concurrencyPolicy` | `Allow` | What to do if multiple `Workflows` are scheduled at the same time. `Allow`: allow all, `Replace`: remove all old before scheduling new, `Forbid`: do not allow any new while there are old |
50+
| `startingDeadlineSeconds` | `0` | Seconds after [the last scheduled time](#crash-recovery) during which a missed `Workflow` will still be run. |
51+
| `successfulJobsHistoryLimit` | `3` | Number of successful `Workflows` to persist |
52+
| `failedJobsHistoryLimit` | `1` | Number of failed `Workflows` to persist |
5153

5254
### Cron Schedule Syntax
5355

54-
The cron scheduler uses the standard cron syntax, as [documented on Wikipedia](https://en.wikipedia.org/wiki/Cron).
55-
56-
More detailed documentation for the specific library used is [documented here](https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format).
56+
The cron scheduler uses [standard cron syntax](https://en.wikipedia.org/wiki/Cron).
57+
The implementation is the same as `CronJobs`, using [`robfig/cron`](https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format).
5758

5859
### Crash Recovery
5960

60-
If the `workflow-controller` crashes (and hence the `CronWorkflow` controller), there are some options you can set to ensure that `CronWorkflows` that would have been scheduled while the controller was down can still run. Mainly `startingDeadlineSeconds` can be set to specify the maximum number of seconds past the last successful run of a `CronWorkflow` during which a missed run will still be executed.
61+
If the Controller crashes, you can ensure that any missed schedules still run.
6162

62-
For example, if a `CronWorkflow` that runs every minute is last run at 12:05:00, and the controller crashes between 12:05:55 and 12:06:05, then the expected execution time of 12:06:00 would be missed. However, if `startingDeadlineSeconds` is set to a value greater than 65 (the amount of time passing between the last scheduled run time of 12:05:00 and the current controller restart time of 12:06:05), then a single instance of the `CronWorkflow` will be executed exactly at 12:06:05.
63+
With `startingDeadlineSeconds` you can specify a maximum grace period past the last scheduled time during which it will still run.
64+
For example, if a `CronWorkflow` that runs every minute is last run at 12:05:00, and the controller crashes between 12:05:55 and 12:06:05, then the expected execution time of 12:06:00 would be missed.
65+
However, if `startingDeadlineSeconds` is set to a value greater than 5 (the time passed between the last scheduled time of 12:06:00 and the current time of 12:06:05), then a single instance of the `CronWorkflow` will be executed exactly at 12:06:05.
6366

6467
Currently only a single instance will be executed as a result of setting `startingDeadlineSeconds`.
6568

6669
This setting can also be configured in tandem with `concurrencyPolicy` to achieve more fine-tuned control.
6770

6871
### Daylight Saving
6972

70-
Daylight Saving (DST) is taken into account when using timezone. This means that, depending on the local time of the scheduled job, argo will schedule the workflow once, twice, or not at all when the clock moves forward or back.
73+
When using `timezone`, [Daylight Saving Time (DST)](https://en.wikipedia.org/wiki/Daylight_saving_time) is taken into account.
74+
Depending on the local time of the scheduled workflow, it will run once, twice, or not at all when the clock moves forward or back.
7175

72-
For example, with timezone set at `America/Los_Angeles`, we have daylight saving
76+
For example, with `timezone: America/Los_Angeles`:
7377

7478
- +1 hour (DST start) at 2020-03-08 02:00:00:
7579

@@ -107,7 +111,7 @@ For example, with timezone set at `America/Los_Angeles`, we have daylight saving
107111

108112
### CLI
109113

110-
`CronWorkflow` can be created from the CLI by using basic commands:
114+
You can create `CronWorkflows` with the CLI:
111115

112116
```bash
113117
$ argo cron create cron.yaml
@@ -142,20 +146,20 @@ NextScheduledTime: Thu Oct 29 13:03:00 +0000 (32 seconds from now)
142146
Active Workflows: test-cron-wf-rt4nf
143147
```
144148

145-
**Note**: `NextScheduledRun` assumes that the workflow-controller uses UTC as its timezone
149+
**Note**: `NextScheduledRun` assumes the Controller uses UTC as its timezone
146150

147151
### `kubectl`
148152

149-
Using `kubectl apply -f` and `kubectl get cwf`
153+
You can use `kubectl apply -f` and `kubectl get cwf`
150154

151155
## Back-Filling Days
152156

153157
See [cron backfill](cron-backfill.md).
154158

155159
### GitOps via Argo CD
156160

157-
`CronWorkflow` resources can be managed with GitOps by using [Argo CD](https://github.com/argoproj/argo-cd)
161+
You can manage `CronWorkflow` resources with GitOps by using [Argo CD](https://github.com/argoproj/argo-cd)
158162

159163
### UI
160164

161-
`CronWorkflow` resources can also be managed by the UI
165+
You can also manage `CronWorkflow` resources in the UI

0 commit comments

Comments
 (0)