Skip to content

Commit 584fc7f

Browse files
ATGardnerzarbis
andauthored
chore: sync all codefresh code changes into v2.14.9 (#388)
squashed all of our code changes from `v2.13.3-2025.3.5-50344f005` into a single change over upstream `v2.14.9` --------- Co-authored-by: Vadim Gusev <ubuntolog@gmail.com>
1 parent 38985bd commit 584fc7f

File tree

272 files changed

+23198
-2034
lines changed

Some content is hidden

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

272 files changed

+23198
-2034
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ manifests/
1717
hack/
1818
docs/
1919
examples/
20+
.dockerignore
21+
.git/
2022
.github/
2123
!test/container
2224
!test/e2e/testdata

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ contact_links:
55
url: https://argo-cd.readthedocs.io/
66
about: Much help can be found in the docs
77
- name: Ask a question
8-
url: https://github.com/argoproj/argo-cd/discussions/new
8+
url: https://github.com/codefresh-io/argo-cd/discussions/new
99
about: Ask a question or start a discussion about Argo CD
1010
- name: Chat on Slack
1111
url: https://argoproj.github.io/community/join-slack

.github/workflows/ci-build.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ name: Integration tests
22
on:
33
push:
44
branches:
5-
- 'master'
6-
- 'release-*'
7-
- '!release-1.4'
8-
- '!release-1.5'
5+
- 'sync-*'
6+
# - 'master'
7+
# - 'release-*'
8+
# - '!release-1.4'
9+
# - '!release-1.5'
910
pull_request:
1011
branches:
11-
- 'master'
12-
- 'release-*'
12+
- 'sync-*'
13+
# - 'master'
14+
# - 'release-*'
1315

1416
env:
1517
# Golang version to use across CI steps
@@ -383,7 +385,7 @@ jobs:
383385
env:
384386
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
385387
- name: Upload test results to Codecov
386-
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'argoproj/argo-cd'
388+
if: startsWith(github.ref, 'refs/heads/sync-') && github.event_name == 'push' && github.repository == 'codefresh-io/argo-cd'
387389
uses: codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 # v1.0.1
388390
with:
389391
file: test-results/junit.xml
@@ -394,7 +396,7 @@ jobs:
394396
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
395397
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
396398
uses: SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
397-
if: env.sonar_secret != ''
399+
if: false && env.sonar_secret != ''
398400
test-e2e:
399401
name: Run end-to-end tests
400402
if: ${{ needs.changes.outputs.backend == 'true' }}

.github/workflows/image.yaml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Image
33
on:
44
push:
55
branches:
6-
- master
6+
- sync-*
77
pull_request:
88
branches:
9-
- master
9+
- sync-*
1010
types: [ labeled, unlabeled, opened, synchronize, reopened ]
1111

1212
concurrency:
@@ -19,17 +19,25 @@ jobs:
1919
set-vars:
2020
permissions:
2121
contents: read
22-
if: github.repository == 'argoproj/argo-cd'
22+
if: github.repository == 'codefresh-io/argo-cd'
2323
runs-on: ubuntu-22.04
2424
outputs:
25-
image-tag: ${{ steps.image.outputs.tag}}
25+
image-tag: ${{ steps.image-pr.outputs.tag || steps.image-push.outputs.tag }}
2626
platforms: ${{ steps.platforms.outputs.platforms }}
2727
steps:
2828
- uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
2929

30-
- name: Set image tag for ghcr
31-
run: echo "tag=$(cat ./VERSION)-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
32-
id: image
30+
- name: Set image tag (push to feature branch)
31+
if: ${{ github.repository == 'codefresh-io/argo-cd' && github.event_name == 'pull_request' }}
32+
run: |
33+
CLEAN_REF=$(echo "${{ github.head_ref }}" | sed 's|^refs/[^/]*||; s|/|_|g')
34+
echo "tag=v$(cat ./VERSION)-${CLEAN_REF}-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
35+
id: image-pr
36+
37+
- name: Set image tag (push to sync-* branch)
38+
if: ${{ github.repository == 'codefresh-io/argo-cd' && github.event_name == 'push' }}
39+
run: echo "tag=v$(cat ./VERSION)-$(date +%Y-%m-%d)-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
40+
id: image-push
3341

3442
- name: Determine image platforms to use
3543
id: platforms
@@ -48,7 +56,7 @@ jobs:
4856
contents: read
4957
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
5058
id-token: write # for creating OIDC tokens for signing.
51-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name != 'push' }}
59+
if: ${{ false }}
5260
uses: ./.github/workflows/image-reuse.yaml
5361
with:
5462
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
@@ -63,11 +71,11 @@ jobs:
6371
contents: read
6472
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
6573
id-token: write # for creating OIDC tokens for signing.
66-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
74+
if: ${{ github.repository == 'codefresh-io/argo-cd' }}
6775
uses: ./.github/workflows/image-reuse.yaml
6876
with:
69-
quay_image_name: quay.io/argoproj/argocd:latest
70-
ghcr_image_name: ghcr.io/argoproj/argo-cd/argocd:${{ needs.set-vars.outputs.image-tag }}
77+
quay_image_name: ${{ github.event_name == 'pull_request' && 'quay.io/codefresh/dev/argocd' || 'quay.io/codefresh/argocd' }}:${{ needs.set-vars.outputs.image-tag }}
78+
# ghcr_image_name: ghcr.io/codefresh-io/argo-cd/argocd:${{ needs.set-vars.outputs.image-tag }}
7179
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
7280
# renovate: datasource=golang-version packageName=golang
7381
go-version: 1.23.3
@@ -86,7 +94,7 @@ jobs:
8694
actions: read # for detecting the Github Actions environment.
8795
id-token: write # for creating OIDC tokens for signing.
8896
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
89-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
97+
if: ${{ false }}
9098
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
9199
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0.0
92100
with:
@@ -103,7 +111,7 @@ jobs:
103111
permissions:
104112
contents: write # for git to push upgrade commit if not already deployed
105113
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
106-
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
114+
if: ${{ false }}
107115
runs-on: ubuntu-22.04
108116
steps:
109117
- uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0

.mockery.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ mockname: "{{.InterfaceName}}"
66
with-expecter: false
77
# individual interface config
88
packages:
9+
github.com/argoproj/argo-cd/v2/acr_controller/application:
10+
interfaces:
11+
ApplicationClient:
912
github.com/argoproj/argo-cd/v2/applicationset/generators:
1013
interfaces:
1114
Generator:
@@ -36,6 +39,9 @@ packages:
3639
github.com/argoproj/argo-cd/v2/controller/cache:
3740
interfaces:
3841
LiveStateCache:
42+
github.com/argoproj/argo-cd/v2/event_reporter/application:
43+
interfaces:
44+
ApplicationClient:
3945
github.com/argoproj/argo-cd/v2/reposerver/apiclient:
4046
interfaces:
4147
RepoServerServiceClient:

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ COPY --from=argocd-build /go/src/github.com/argoproj/argo-cd/dist/argocd* /usr/l
135135
USER root
136136
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
137137
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server && \
138+
ln -s /usr/local/bin/argocd /usr/local/bin/event-reporter-server && \
139+
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-change-revision-controller && \
138140
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-cmp-server && \
139141
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller && \
140142
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex && \

Dockerfile.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ COPY argocd /usr/local/bin/
77
USER root
88
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
99
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server && \
10+
ln -s /usr/local/bin/argocd /usr/local/bin/event-reporter-server && \
11+
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-change-revision-controller && \
1012
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller && \
1113
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex && \
1214
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-notifications && \

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ define run-in-test-client
125125
-e GITHUB_TOKEN \
126126
-e GOCACHE=/tmp/go-build-cache \
127127
-e ARGOCD_LINT_GOGC=$(ARGOCD_LINT_GOGC) \
128+
-e GOSUMDB=off \
128129
-v ${DOCKER_SRC_MOUNT} \
129130
-v ${GOPATH}/pkg/mod:/go/pkg/mod${VOLUME_MOUNT} \
130131
-v ${GOCACHE}:/tmp/go-build-cache${VOLUME_MOUNT} \
@@ -145,7 +146,7 @@ PATH:=$(PATH):$(PWD)/hack
145146

146147
# docker image publishing options
147148
DOCKER_PUSH?=false
148-
IMAGE_NAMESPACE?=
149+
IMAGE_NAMESPACE?=quay.io/codefresh
149150
# perform static compilation
150151
STATIC_BUILD?=true
151152
# build development images
@@ -532,6 +533,9 @@ start-local: mod-vendor-local dep-ui-local cli-local
532533
run:
533534
bash ./hack/goreman-start.sh
534535

536+
.PHONY: cf-release
537+
cf-release:
538+
go run ./hack/release
535539

536540
# Runs pre-commit validation with the virtualized toolchain
537541
.PHONY: pre-commit

Merge-upstream.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Resolving conflicts during upstream changes merge
2+
3+
This docs include info about places where codefresh made it's customizations:
4+
5+
#### General notes:
6+
1. All files that're deleted in our branches - we can keep deleted (accept ours).
7+
2. all `xxx.pb.go` - apply theirs and after resolving conflicts re-generate.
8+
9+
#### Paths and actions on them
10+
1. `.github/workflows` - accept ours (yours).
11+
2. `applicationset` - accept theirs
12+
3. `assets / swagger` - accept ours. Later run codegen and commit new version
13+
4. `cmd / argocd` - accept ours if files deleted.
14+
5. `cmd / argocd-application-controller` - no custom thing from our side, so just resolve conflicts.
15+
6. `cmd / notifications` - no custom thing from our side, so just accept theirs.
16+
7. `cmd / argocd-repo-server` - includes our changes with codefresh related parameters.
17+
8. `cmd / common` - includes our changes with codefresh related constants (event-reporter)
18+
9. `cmd / controller / application.go` - includes our changes to resource node (to return labels and annotations getResourceTree method)
19+
10. `cmd / controller / state.go` - includes our changes (GetRepoObjs method)
20+
11. `cmd / controller / state_test.go - includes our changes. Replace manifest values with our struct `apiclient.Manifest`
21+
12. `docs` - apply theirs
22+
13. `examples` - apply theirs
23+
14. `hack` - apply theirs
24+
15. `manifests` - accept theirs
25+
16. `notification_controller` - apply theirs
26+
17. `pkg/apis/application/v1alpha` - generatedXXX - apply theirs (than re-generate). types.go - merge (includes our changes with ForceNamespace).
27+
18. `server / application.go` - merge (includes our v1 event-reporter.)
28+
19. `ui` - accept theirs.
29+
20. `util / kustomize` - merge, as it includes ours changes.
30+
21. `mkdocs.yaml` - apply theirs.
31+
22. `go.mod` - merge direct dependencies. go.sum accept theirs. Run go mod tidy. Check `replace` section, perform cleanup if needed.
32+
23. `reposerver / sepository.go` - merge, includes: cf appVersion logic; type manifest struct (with path to file, rawManifest);
33+
34+
35+
#### Post actions:
36+
1. run `go mod tidy`
37+
2. run `go mod download`
38+
3. run `go mod vendor`
39+
4. run `make lint-local`
40+
5. run `make protogen-fast` - because sometimes gogen won't work if types from protogen used
41+
6. run `make codegen`
42+
7. run `make test-local`
43+
44+
### Thoughts
45+
46+
1. Revert cherry picks before merges - as they cause issues later if in upstream decided to slightly move some parts of such changes. In this case no conflicts will occur during merge as they on different lines but then you need cleanup them manually.

SOURCE_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.14.8

0 commit comments

Comments
 (0)