Skip to content

Commit 9011409

Browse files
Merge pull request #93 from codefresh-io/CR-8565-sync-v3.2.6
Cr 8565 sync v3.2.6
2 parents 734c781 + 0aa619c commit 9011409

File tree

107 files changed

+2081
-658
lines changed

Some content is hidden

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

107 files changed

+2081
-658
lines changed

.github/pull_request_template.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
Tips:
1+
Don't bother creating a PR until you've done this:
2+
3+
* [ ] Run `make pre-commit -B` to fix codegen, lint, and commit message problems.
4+
5+
Create your PR as a draft.
6+
27

3-
* Maybe add you organization to [USERS.md](https://github.com/argoproj/argo-workflows/blob/master/USERS.md).
4-
* Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it does not need to pass
5-
* Sign-off your commits to pass the DCO check: `git commit --signoff`.
6-
* Run `make pre-commit -B` to fix codegen or lint problems.
8+
* Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it
9+
does not need to pass.
10+
* Once required tests have passed, you can make it "Ready for review".
711
* Say how how you tested your changes. If you changed the UI, attach screenshots.
8-
* If changes were requested, and you've made them, then dismis the review to get it looked at again.
9-
* You can ask for help!
12+
13+
Tips:
14+
15+
* If changes were requested, and you've made them, then dismiss the review to get it looked at again.
16+
* Add you organization to [USERS.md](https://github.com/argoproj/argo-workflows/blob/master/USERS.md) if you like.
17+
* You can ask for help!

.github/workflows/ci-build.yaml

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
tests:
1515
name: Unit Tests
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-latest
1717
# 5m30
1818
timeout-minutes: 8
1919
steps:
@@ -33,16 +33,13 @@ jobs:
3333
- run: make server/static/files.go STATIC_FILES=false
3434
- run: go build -v ./...
3535
- run: make test STATIC_FILES=false GOTEST='go test -covermode=atomic -coverprofile=coverage.out'
36+
# engineers just ignore this in PRs, so lets not even run it
3637
- run: bash <(curl -s https://codecov.io/bash)
38+
if: github.ref == 'refs/heads/master'
3739

3840
e2e-tests:
3941
name: E2E Tests
40-
runs-on: ubuntu-20.04
41-
# test-api: 7m (1m10s locally)
42-
# test-cli: 12m (4m locally)
43-
# test-cron: 8m
44-
# test-executor 8m (2m locally)
45-
# test-functional: 13m (7m locally)
42+
runs-on: ubuntu-latest
4643
timeout-minutes: 20
4744
env:
4845
KUBECONFIG: /home/runner/.kubeconfig
@@ -57,14 +54,20 @@ jobs:
5754
containerRuntimeExecutor: docker
5855
profile: mysql
5956
- test: test-cron
60-
containerRuntimeExecutor: docker
57+
containerRuntimeExecutor: emissary
6158
profile: minimal
62-
- test: test-examples
59+
- test: test-executor
60+
containerRuntimeExecutor: emissary
61+
profile: minimal
62+
- test: test-functional
6363
containerRuntimeExecutor: emissary
6464
profile: minimal
6565
- test: test-executor
6666
containerRuntimeExecutor: docker
6767
profile: minimal
68+
- test: test-examples
69+
containerRuntimeExecutor: emissary
70+
profile: minimal
6871
- test: test-executor
6972
containerRuntimeExecutor: k8sapi
7073
profile: minimal
@@ -74,9 +77,6 @@ jobs:
7477
- test: test-executor
7578
containerRuntimeExecutor: pns
7679
profile: minimal
77-
- test: test-functional
78-
containerRuntimeExecutor: docker
79-
profile: minimal
8080
steps:
8181
- uses: actions/checkout@v2
8282
- uses: actions/setup-go@v2
@@ -94,9 +94,27 @@ jobs:
9494
with:
9595
path: /home/runner/go/bin
9696
key: go-bin-v1-${{ hashFiles('**/go.mod') }}
97+
- name: Cache Docker layers
98+
uses: actions/cache@v2
99+
with:
100+
path: /tmp/.buildx-cache
101+
key: ${{ runner.os }}-buildx-${{ github.sha }}
102+
restore-keys: |
103+
${{ runner.os }}-buildx-
104+
- uses: docker/setup-buildx-action@v1
97105
- run: mkdir -p /tmp/log/argo-e2e
106+
# we never want to pull images by accident on CI after we built them
107+
# so imagePullPolicy=Never
108+
# but, we can pull it if we don't need it
109+
- run: docker pull quay.io/argoproj/argoexec:latest
110+
if: ${{!(matrix.test == 'test-executor' || matrix.test == 'test-functional')}}
111+
- name: make argoexec-image
112+
if: ${{matrix.test == 'test-executor' || matrix.test == 'test-functional'}}
113+
# retry this once, as it can be flakey
114+
run: |
115+
make argoexec-image STATIC_FILES=false || make argoexec-image STATIC_FILES=false
116+
docker image prune -f
98117
- name: Install and start K3S
99-
timeout-minutes: 3
100118
run: |
101119
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.2+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh -
102120
until kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml cluster-info ; do sleep 10s ; done
@@ -113,21 +131,20 @@ jobs:
113131
echo '127.0.0.1 mysql' | sudo tee -a /etc/hosts
114132
- run: make install controller cli $(go env GOPATH)/bin/goreman PROFILE=${{matrix.profile}} E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false LOG_LEVEL=info
115133
- run: make start PROFILE=${{matrix.profile}} E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false LOG_LEVEL=info UI=false > /tmp/log/argo-e2e/argo.log 2>&1 &
116-
timeout-minutes: 4
117-
- name: make argoexec-image
118-
run: make argoexec-image STATIC_FILES=false
119134
- run: make wait
120135
timeout-minutes: 4
121136
- run: make ${{matrix.test}} E2E_TIMEOUT=1m STATIC_FILES=false
122137
- name: cat argo.log
123138
if: ${{ failure() }}
124139
run: cat /tmp/log/argo-e2e/argo.log
125-
140+
- name: MinIO logs
141+
if: ${{ failure() }}
142+
run: kubectl -n argo logs deploy/minio
126143
codegen:
127144
name: Codegen
128-
runs-on: ubuntu-20.04
145+
runs-on: ubuntu-latest
129146
needs: [ tests ]
130-
timeout-minutes: 9
147+
timeout-minutes: 15
131148
env:
132149
GOPATH: /home/runner/go
133150
PROTOC_ZIP: protoc-3.11.1-linux-x86_64.zip
@@ -173,7 +190,7 @@ jobs:
173190

174191
lint:
175192
name: Lint
176-
runs-on: ubuntu-20.04
193+
runs-on: ubuntu-latest
177194
needs: [ tests, codegen ]
178195
timeout-minutes: 6
179196
env:
@@ -187,7 +204,7 @@ jobs:
187204

188205
ui:
189206
name: UI
190-
runs-on: ubuntu-20.04
207+
runs-on: ubuntu-latest
191208
timeout-minutes: 6
192209
env:
193210
NODE_OPTIONS: --max-old-space-size=4096

.github/workflows/gh-pages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
deploy:
1010
if: github.repository == 'argoproj/argo-workflows'
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Setup Python

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
build-linux-amd64:
1818
name: Build & push linux/amd64
1919
if: github.repository == 'codefresh-io/argo-workflows'
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
2323
platform: [ linux/amd64 ]
@@ -85,7 +85,7 @@ jobs:
8585
build-linux-arm64:
8686
name: Build & push linux/arm64
8787
if: github.repository == 'codefresh-io/argo-workflows'
88-
runs-on: ubuntu-20.04
88+
runs-on: ubuntu-latest
8989
strategy:
9090
matrix:
9191
platform: [ linux/arm64 ]
@@ -200,7 +200,7 @@ jobs:
200200
push-images:
201201
name: Push manifest with all images
202202
if: github.repository == 'codefresh-io/argo-workflows'
203-
runs-on: ubuntu-20.04
203+
runs-on: ubuntu-latest
204204
needs: [ build-linux-amd64, build-linux-arm64, build-windows ]
205205
steps:
206206
- uses: actions/checkout@v2
@@ -253,7 +253,7 @@ jobs:
253253
test-images-linux-amd64:
254254
name: Try pulling linux/amd64
255255
if: github.repository == 'codefresh-io/argo-workflows'
256-
runs-on: ubuntu-20.04
256+
runs-on: ubuntu-latest
257257
needs: [ push-images ]
258258
strategy:
259259
matrix:
@@ -328,7 +328,7 @@ jobs:
328328
done
329329
330330
publish-release:
331-
runs-on: ubuntu-20.04
331+
runs-on: ubuntu-latest
332332
if: github.repository == 'codefresh-io/argo-workflows'
333333
needs: [ push-images, test-images-linux-amd64, test-images-windows ]
334334
env:

.github/workflows/sdks.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ on:
33
push:
44
tags:
55
- v*
6-
- 'v3.2.*'
7-
- 'v3.1.*'
86
branches:
9-
- dev-*
7+
- master
108
jobs:
119
sdk:
1210
if: github.repository == 'argoproj/argo-workflows'
@@ -21,9 +19,3 @@ jobs:
2119
- run: make --directory sdks/${{matrix.name}} publish -B
2220
env:
2321
JAVA_SDK_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
24-
- uses: peter-evans/create-pull-request@v3
25-
with:
26-
title: 'chore: updated ${{matrix.name}} SDK'
27-
commit-message: 'chore: updated ${{matrix.name}} SDK'
28-
branch: create-pull-request/sdk/${{matrix.name}}
29-
signoff: true

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://golangci-lint.run/usage/quick-start/
22
run:
33
concurrency: 4
4-
timeout: 5m
4+
timeout: 8m
55
skip-dirs:
66
- pkg/client
77
- vendor

Makefile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,13 @@ argoexec-image:
219219

220220
%-image:
221221
[ ! -e dist/$* ] || mv dist/$* .
222-
docker buildx build -t $(IMAGE_NAMESPACE)/$*:$(VERSION) --target $* --output=type=docker .
222+
docker buildx install
223+
docker build \
224+
-t $(IMAGE_NAMESPACE)/$*:$(VERSION) \
225+
--target $* \
226+
--cache-from "type=local,src=/tmp/.buildx-cache" \
227+
--cache-to "type=local,dest=/tmp/.buildx-cache" \
228+
--output=type=docker .
223229
[ ! -e $* ] || mv $* dist/
224230
docker run --rm -t $(IMAGE_NAMESPACE)/$*:$(VERSION) version
225231
if [ $(K3D) = true ]; then k3d image import $(IMAGE_NAMESPACE)/$*:$(VERSION); fi
@@ -396,7 +402,7 @@ test: server/static/files.go dist/argosay
396402
env KUBECONFIG=/dev/null $(GOTEST) ./...
397403

398404
.PHONY: install
399-
install:
405+
install: githooks
400406
kubectl get ns $(KUBE_NAMESPACE) || kubectl create ns $(KUBE_NAMESPACE)
401407
kubectl config set-context --current --namespace=$(KUBE_NAMESPACE)
402408
@echo "installing PROFILE=$(PROFILE), E2E_EXECUTOR=$(E2E_EXECUTOR)"
@@ -570,15 +576,15 @@ validate-examples: api/jsonschema/schema.json
570576
cd examples && go test
571577

572578
# pre-push
579+
.git/hooks/commit-msg: hack/git/hooks/commit-msg
580+
cp -v hack/git/hooks/commit-msg .git/hooks/commit-msg
573581

574-
.PHONY: pre-commit
575-
pre-commit: codegen lint test start
576582

577-
ifeq ($(GIT_BRANCH),master)
578-
LOG_OPTS := '-n10'
579-
else
580-
LOG_OPTS := 'origin/master..'
581-
endif
583+
.PHONY: githooks
584+
githooks: .git/hooks/commit-msg
585+
586+
.PHONY: pre-commit
587+
pre-commit: githooks codegen lint
582588

583589
release-notes: /dev/null
584590
version=$(VERSION) envsubst < hack/release-notes.md > release-notes

USERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Currently, the following organizations are **officially** using Argo Workflows:
147147
1. [WooliesX](https://wooliesx.com.au/)
148148
1. [Woolworths Group](https://www.woolworthsgroup.com.au/)
149149
1. [Workiva](https://www.workiva.com/)
150+
1. [Voyager](https://investvoyager.com/)
150151
1. [Zhihu](https://www.zhihu.com/)
151152

152153
### Projects Using Argo

cmd/argo/commands/cron/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ func NewDeleteCommand() *cobra.Command {
3838
},
3939
}
4040

41-
command.Flags().BoolVar(&all, "all", false, "Delete all workflow templates")
41+
command.Flags().BoolVar(&all, "all", false, "Delete all cron workflows")
4242
return command
4343
}

cmd/argo/commands/cron/util.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import (
1111
// GetNextRuntime returns the next time the workflow should run in local time. It assumes the workflow-controller is in
1212
// UTC, but nevertheless returns the time in the local timezone.
1313
func GetNextRuntime(cwf *v1alpha1.CronWorkflow) (time.Time, error) {
14-
cronScheduleString := cwf.Spec.Schedule
15-
if cwf.Spec.Timezone != "" {
16-
cronScheduleString = "CRON_TZ=" + cwf.Spec.Timezone + " " + cronScheduleString
17-
}
18-
cronSchedule, err := cron.ParseStandard(cronScheduleString)
14+
cronSchedule, err := cron.ParseStandard(cwf.Spec.GetScheduleString())
1915
if err != nil {
2016
return time.Time{}, err
2117
}

0 commit comments

Comments
 (0)