Compare commits

...

754 commits

Author SHA1 Message Date
Aditya Raj
6256abf182
fix(cli): uses DrySource revision for app diff/manifests with sourceHydrator (#23817) (#24670)
Some checks are pending
Integration tests / Run end-to-end tests (push) Blocked by required conditions
Integration tests / changes (push) Waiting to run
Integration tests / Ensure Go modules synchronicity (push) Blocked by required conditions
Integration tests / Build & cache Go code (push) Blocked by required conditions
Integration tests / Lint Go code (push) Blocked by required conditions
Integration tests / Run unit tests for Go packages (push) Blocked by required conditions
Integration tests / Run unit tests with -race for Go packages (push) Blocked by required conditions
Integration tests / Check changes to generated code (push) Blocked by required conditions
Integration tests / Build, test & lint UI code (push) Blocked by required conditions
Integration tests / shellcheck (push) Waiting to run
Integration tests / Process & analyze test artifacts (push) Blocked by required conditions
Integration tests / E2E Tests - Composite result (push) Blocked by required conditions
Code scanning - action / CodeQL-Build (push) Waiting to run
Image / set-vars (push) Waiting to run
Image / build-only (push) Blocked by required conditions
Image / build-and-publish (push) Blocked by required conditions
Image / build-and-publish-provenance (push) Blocked by required conditions
Image / Deploy (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
2026-04-21 12:51:39 -04:00
dependabot[bot]
b01aa188fd
chore(deps): bump tj-actions/changed-files from 47.0.5 to 47.0.6 (#27470)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 12:12:31 -04:00
dependabot[bot]
a7853eb7b6
chore(deps): bump step-security/harden-runner from 2.18.0 to 2.19.0 (#27471)
Some checks are pending
Integration tests / changes (push) Waiting to run
Integration tests / Ensure Go modules synchronicity (push) Blocked by required conditions
Integration tests / Build & cache Go code (push) Blocked by required conditions
Integration tests / Lint Go code (push) Blocked by required conditions
Integration tests / Run unit tests for Go packages (push) Blocked by required conditions
Integration tests / Run unit tests with -race for Go packages (push) Blocked by required conditions
Integration tests / Check changes to generated code (push) Blocked by required conditions
Integration tests / Build, test & lint UI code (push) Blocked by required conditions
Integration tests / shellcheck (push) Waiting to run
Integration tests / Process & analyze test artifacts (push) Blocked by required conditions
Integration tests / Run end-to-end tests (push) Blocked by required conditions
Integration tests / E2E Tests - Composite result (push) Blocked by required conditions
Code scanning - action / CodeQL-Build (push) Waiting to run
Image / set-vars (push) Waiting to run
Image / build-only (push) Blocked by required conditions
Image / build-and-publish (push) Blocked by required conditions
Image / build-and-publish-provenance (push) Blocked by required conditions
Image / Deploy (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 21:41:33 -10:00
CPunia
e0e827dab0
fix: downgrade DiffFromCache log level for cache-miss errors (#26185)
Some checks are pending
Integration tests / changes (push) Waiting to run
Integration tests / Ensure Go modules synchronicity (push) Blocked by required conditions
Integration tests / Build & cache Go code (push) Blocked by required conditions
Integration tests / Lint Go code (push) Blocked by required conditions
Integration tests / Run unit tests for Go packages (push) Blocked by required conditions
Integration tests / Run unit tests with -race for Go packages (push) Blocked by required conditions
Integration tests / Check changes to generated code (push) Blocked by required conditions
Integration tests / Build, test & lint UI code (push) Blocked by required conditions
Integration tests / shellcheck (push) Waiting to run
Integration tests / Process & analyze test artifacts (push) Blocked by required conditions
Integration tests / Run end-to-end tests (push) Blocked by required conditions
Integration tests / E2E Tests - Composite result (push) Blocked by required conditions
Code scanning - action / CodeQL-Build (push) Waiting to run
Image / build-and-publish-provenance (push) Blocked by required conditions
Image / set-vars (push) Waiting to run
Image / build-only (push) Blocked by required conditions
Image / build-and-publish (push) Blocked by required conditions
Image / Deploy (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: CPunia <67651406+cp319391@users.noreply.github.com>
2026-04-20 19:15:35 -04:00
shiiyan
74d1fe0a13
feat(ui): use toggle-auto-sync resource action in app details page (#21564) (#27226)
Signed-off-by: SY <shiiyan79@gmail.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-20 22:17:34 +00:00
Peter Jiang
b74c08ec5c
fix: remove resourceVersion from ssd (#27406)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-04-20 13:27:41 -04:00
Alexandre Gaudreault
032d9e1e80
refactor: simplify UpdateRevisionForPaths logic and add early returns (#27190)
Some checks are pending
Integration tests / changes (push) Waiting to run
Integration tests / Ensure Go modules synchronicity (push) Blocked by required conditions
Integration tests / Build & cache Go code (push) Blocked by required conditions
Integration tests / Lint Go code (push) Blocked by required conditions
Integration tests / Run unit tests for Go packages (push) Blocked by required conditions
Integration tests / Run unit tests with -race for Go packages (push) Blocked by required conditions
Integration tests / Check changes to generated code (push) Blocked by required conditions
Integration tests / Build, test & lint UI code (push) Blocked by required conditions
Integration tests / shellcheck (push) Waiting to run
Integration tests / Process & analyze test artifacts (push) Blocked by required conditions
Integration tests / Run end-to-end tests (push) Blocked by required conditions
Integration tests / E2E Tests - Composite result (push) Blocked by required conditions
Code scanning - action / CodeQL-Build (push) Waiting to run
Image / set-vars (push) Waiting to run
Image / build-only (push) Blocked by required conditions
Image / build-and-publish (push) Blocked by required conditions
Image / build-and-publish-provenance (push) Blocked by required conditions
Image / Deploy (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-20 10:03:55 -04:00
Alex Recuenco
b37d389f62
chore: Lint change, Prevent class components from being created (#27420)
Signed-off-by: alexrecuenco <26118630+alexrecuenco@users.noreply.github.com>
Signed-off-by: Alex Recuenco <26118630+alexrecuenco@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-20 09:25:29 -04:00
dependabot[bot]
26f71b3159
chore(deps): bump actions/setup-node from 6.3.0 to 6.4.0 (#27452)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 08:27:30 -04:00
dependabot[bot]
99b10b5e29
chore(deps): bump renovatebot/github-action from 46.1.9 to 46.1.10 (#27453)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 08:26:58 -04:00
dependabot[bot]
f54cc0bc61
chore(deps): bump github.com/go-openapi/runtime from 0.29.3 to 0.29.4 (#27457)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 08:26:27 -04:00
Mangaal Meetei
5103112b9a
docs: Promote ApplicationSet in any namespace to stable (#27417)
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
2026-04-20 14:04:25 +03:00
dependabot[bot]
5a4a551478
chore(deps): bump the aws-sdk-v2 group with 6 updates (#27455)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 11:48:05 +02:00
Vilius Puskunalis
611fcb012c
feat: add sync overrun option to sync windows (#25361) (#25510)
Some checks are pending
Integration tests / Run end-to-end tests (push) Blocked by required conditions
Integration tests / E2E Tests - Composite result (push) Blocked by required conditions
Integration tests / changes (push) Waiting to run
Integration tests / Ensure Go modules synchronicity (push) Blocked by required conditions
Integration tests / Build & cache Go code (push) Blocked by required conditions
Integration tests / Lint Go code (push) Blocked by required conditions
Integration tests / Run unit tests for Go packages (push) Blocked by required conditions
Integration tests / Run unit tests with -race for Go packages (push) Blocked by required conditions
Integration tests / Check changes to generated code (push) Blocked by required conditions
Integration tests / Build, test & lint UI code (push) Blocked by required conditions
Integration tests / shellcheck (push) Waiting to run
Integration tests / Process & analyze test artifacts (push) Blocked by required conditions
Code scanning - action / CodeQL-Build (push) Waiting to run
Image / set-vars (push) Waiting to run
Image / build-only (push) Blocked by required conditions
Image / build-and-publish (push) Blocked by required conditions
Image / build-and-publish-provenance (push) Blocked by required conditions
Image / Deploy (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Vilius Puškunalis <47086537+puskunalis@users.noreply.github.com>
2026-04-20 06:55:13 +00:00
dependabot[bot]
9c8ae9a294
chore(deps): bump github.com/dlclark/regexp2 from 1.11.5 to 1.12.0 (#27456)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 08:21:34 +02:00
dependabot[bot]
68505a81ed
chore(deps): bump goreleaser/goreleaser-action from 7.0.0 to 7.1.0 (#27454)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 08:20:54 +02:00
Pasha Kostohrys
3132b0de4f
chore: update Maintainers.md and move Pasha Kostohrys to octopus deploy org (#27450)
Co-authored-by: pasha <pasha.k@fyxt.com>
2026-04-19 20:33:04 -04:00
Michael Crenshaw
25b3037485
fix(ci): pnpm sbom generation (#27337) (#27339)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-04-19 07:53:06 -04:00
Jaewoo Choi
c3af4251d8
docs: add revert prefix to PR title documentation (#27439)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-04-19 07:51:48 -04:00
Kanika Rana
7f3ecfcf42
chore(ci): add revert to title checker config (#27424)
Signed-off-by: Kanika Rana <krana@redhat.com>
2026-04-19 10:09:11 +03:00
github-actions[bot]
8038e0ec96
[Bot] docs: Update Snyk report (#27438)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-04-19 09:41:10 +03:00
firas_mosbehi
6c1fd67558
test: add t.Parallel() to util jwt, crypto, and password tests (#27423) (#27432)
Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
2026-04-18 18:11:38 -04:00
dependabot[bot]
d017512baa
chore(deps): bump github.com/moby/spdystream from 0.5.0 to 0.5.1 (#27401)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-18 16:13:36 +02:00
Prune Sebastien THOMAS
29fd8db39a
feat(appset): filtering repos by archived status #20736 (#21505)
Signed-off-by: Prune <prune@lecentre.net>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-17 17:32:18 +00:00
renovate[bot]
37e10dba75
chore(deps): update docker.io/library/registry:3.1 docker digest to 8a7c1aa (#27405)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-17 08:30:38 -04:00
dependabot[bot]
f3b803f284
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.14 to 1.32.15 in the aws-sdk-v2 group (#27412)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 08:15:49 +02:00
Alexandre Gaudreault
4bc5d38634
docs: clarify selective sync and ApplyOutOfSyncOnly (#27393)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-16 22:40:35 -04:00
Tsung-Han Chang
4f47dd0afa
fix(rbac): resolve RBAC regression for project-scoped resources in multi-namespace architecture (#25289) (#26573)
Signed-off-by: tcfwbper <pesci861207@gmail.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-16 17:23:46 -04:00
Soumya Ghosh Dastidar
21615be541
fix: avoid stale informer cache in RevisionMetadata handler (#27392)
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2026-04-16 12:34:21 -07:00
Soumya Ghosh Dastidar
8fbb72d1eb
fix: revert autosync event message format change (#27387)
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2026-04-16 17:47:23 +00:00
Alexandre Gaudreault
87d79f9392
fix(performance): add cache support for ResolveRevision to reduce Git operations (#27193)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-16 15:42:58 +00:00
Alexandre Gaudreault
4d2b6fa940
fix(hydrator): align dry source validation cache keys with hydrator (#27182)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-16 11:31:32 -04:00
Matthieu MOREL
dce3f6e8a5
chore: enable unnecessary-format rule from revive (#26958)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-04-16 11:21:56 -04:00
Allan Yung
9a19735918
feat: Support Azure Service Principal authentication for Azure DevOps repositories (#25324)
Signed-off-by: Allan Yung <allan.yung@bbdsoftware.com>
Co-authored-by: Dan Garfield <dan.garfield@octopus.com>
2026-04-16 11:16:47 -04:00
Alex Recuenco
6bf97ec1fd
refactor: Move NodeUpdateAnimation to functional from classes (#27382)
Signed-off-by: alexrecuenco <26118630+alexrecuenco@users.noreply.github.com>
2026-04-16 04:22:12 -10:00
dependabot[bot]
e6aa9059dd
chore(deps): bump sigs.k8s.io/structured-merge-diff/v6 from 6.3.2 to 6.4.0 (#27371)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 08:43:29 -04:00
dependabot[bot]
4f8f4d2e21
chore(deps): bump node from 20 to 24 (#23466)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-16 02:34:19 -10:00
Oliver Gondža
2ccc2ea466
chore(docs): Fix godoc in util/db/certificate.go (#27380)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-04-16 12:01:19 +00:00
argoproj-renovate[bot]
19219e06d2
chore(deps): update group node to v24 (major) (#25096)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-16 13:17:10 +02:00
Nitish Kumar
db7d672f05
feat(webhooks): add webhook support for GHCR (#26462)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-04-16 13:11:31 +02:00
Mangaal Meetei
04fa70c4a4
docs: Update the status of the feature, appset in any namespace, from beta to stable (#27353)
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
2026-04-16 13:38:09 +03:00
dependabot[bot]
3eb5104750
chore(deps): bump library/registry from afcd13f to b0f3668 in /test/container (#27374)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 07:56:30 +03:00
dependabot[bot]
1a195cc04f
chore(deps): bump library/ubuntu from cc925e5 to 5e27572 in /test/container (#27373)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 07:56:07 +03:00
dependabot[bot]
576002fb72
chore(deps): bump github/codeql-action from 4.35.1 to 4.35.2 (#27372)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 07:27:56 +03:00
dependabot[bot]
a216fdb8f4
chore(deps): bump github.com/aws/smithy-go from 1.24.3 to 1.25.0 (#27369)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 07:26:13 +03:00
dependabot[bot]
9cfce1df0e
chore(deps): bump step-security/harden-runner from 2.17.0 to 2.18.0 (#27370)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 07:25:11 +03:00
Karim Farid
30efe53bf2
fix(ui): OCI revision metadata never renders due to conflicting guard clause (#26948) (#27097)
Signed-off-by: Karim Zakzouk <karimzakzouk69@gmail.com>
Signed-off-by: Karim Farid <karimzakzouk69@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-15 22:51:21 +02:00
Atif Ali
706a0370c2
feat(ui): support creating multi-source applications in New App panel [CONTINUED..] (#27095)
Signed-off-by: Dave Canton <dvcanton7@gmail.com>
Signed-off-by: Atif Ali <atali@redhat.com>
Co-authored-by: Dave Canton <dvcanton7@gmail.com>
2026-04-15 10:47:43 -04:00
argoproj-renovate[bot]
ecc178f03e
chore(deps): update docker.io/library/golang:1.26.2 docker digest to 5f3787b (#27343)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-15 07:34:44 -04:00
dependabot[bot]
0a0cd0b687
chore(deps): bump library/golang from fcdb3e4 to 5f3787b in /test/container (#27347)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 07:30:00 -04:00
dependabot[bot]
ea3dae667e
chore(deps): bump library/golang from fcdb3e4 to 5f3787b in /test/remote (#27346)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 07:29:36 -04:00
Revital Barletz
bfc332d871
docs: clarify prune ordering for sync waves (#27352)
Signed-off-by: Revital Barletz <Revital.barletz@octopus.com>
2026-04-15 15:52:43 +05:30
Mirko Krause
67de02b1c4
docs: fix enumeration line breaks (#27333)
Signed-off-by: Mirko Krause <krause@codebase.one>
2026-04-15 12:17:36 +03:00
Sean Liao
a1af401f5f
docs: add Circle to USERS.md (#27349)
Signed-off-by: Sean Liao <sean.liao@circle.com>
2026-04-15 12:07:01 +03:00
Elton de Boer
3ce32a9880
fix(#25983): update theme default to auto (#25985)
Signed-off-by: Elton de Boer <elton@playgroundtech.io>
2026-04-14 20:31:35 -04:00
Jaewoo Choi
1bd0d48c82
fix(ui): add truncation and tooltip for long sync status branch names (#27260)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-04-14 17:22:49 -04:00
Nitish Kumar
6ba0727217
fix: improve error message when hydrateTo sync path does not exist yet (#27336)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-04-14 13:50:52 +00:00
dependabot[bot]
0c01fc895e
chore(deps): bump renovatebot/github-action from 46.1.8 to 46.1.9 (#27332)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 09:38:03 -04:00
renovate[bot]
7308ed98af
chore(deps): update actions/cache action to v5.0.5 (#27334)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 09:37:22 -04:00
dudinea
1a0f5d4ef2
docs: add AGENTS.md file to the repository (#27315) (#27316)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
Signed-off-by: dudinea <eugene.doudine@octopus.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-04-14 15:02:56 +03:00
dudinea
7445f7ed73
ci: harden-runner: whitelist get.helm.sh and registry.npmjs.org for renovate workflow (#27163) (#27328)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-04-14 07:54:10 +03:00
Michael Crenshaw
daadf868db
feat(health): additional promoter.argoproj.io health checks (#27170)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-04-13 17:09:21 -04:00
renovate[bot]
7accd34f64
chore(deps): update dependency eslint-config-prettier to v9.1.2 (#27323)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 09:38:20 -04:00
dependabot[bot]
0737418abb
chore(deps): bump library/golang from 2a2b4b5 to fcdb3e4 in /test/remote (#27307)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 15:08:50 +03:00
dependabot[bot]
0dd5e08d64
chore(deps): bump library/golang from 2a2b4b5 to fcdb3e4 in /test/container (#27309)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 14:50:03 +03:00
dependabot[bot]
d65af147d2
chore(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 (#27310)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 14:47:01 +03:00
dependabot[bot]
c9b2e4b359
chore(deps): bump softprops/action-gh-release from 2.6.1 to 3.0.0 (#27311)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 14:45:58 +03:00
dependabot[bot]
579fbab195
chore(deps): bump docker/build-push-action from 7.0.0 to 7.1.0 (#27312)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 14:24:51 +03:00
dependabot[bot]
c4f3e389a2
chore(deps): bump actions/create-github-app-token from 3.0.0 to 3.1.1 (#27313)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 14:24:15 +03:00
Blake Pettersson
bd823728ac
test: fix helm test flake (#27275)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-12 23:18:42 -10:00
AvivGuiser
de9416137d
feat: add action to restart StrimziPodSet (#27266)
Signed-off-by: AvivGuiser <avivguiser@gmail.com>
2026-04-13 09:54:06 +03:00
dependabot[bot]
73962555bb
chore(deps): bump the otel group across 1 directory with 2 updates (#27217)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-12 20:17:56 +03:00
dependabot[bot]
b2a8bc99e4
chore(deps): bump actions/setup-node from 4.4.0 to 6.3.0 (#27244)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-12 10:26:38 -04:00
Bram
cde9db8b29
docs: Add Car & Classic to USERS.md (#27297)
Signed-off-by: Bram <bram@ceulemans.dev>
2026-04-12 10:25:57 -04:00
argoproj-renovate[bot]
85913f797e
chore(deps): update docker.io/library/golang:1.26.2 docker digest to fcdb3e4 (#27296)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-12 17:05:31 +03:00
dependabot[bot]
25e0c38363
chore(deps): bump golang.org/x/net from 0.52.0 to 0.53.0 (#27272)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-04-12 12:43:12 +03:00
github-actions[bot]
28e13c3ec3
[Bot] docs: Update Snyk report (#27294)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-04-12 07:35:57 +00:00
dependabot[bot]
9cfbeb72f0
chore(deps): bump github.com/mattn/go-isatty from 0.0.20 to 0.0.21 (#27245)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-12 10:29:29 +03:00
Rishabh Pandey
62422a9c30
docs: Improve wording in contributing guide (#27295)
Signed-off-by: Rishabh Pandey <32699563+allexistence@users.noreply.github.com>
2026-04-12 10:28:13 +03:00
dependabot[bot]
c90b922522
chore(deps): bump golang.org/x/crypto from 0.49.0 to 0.50.0 (#27268)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-12 10:13:20 +03:00
dependabot[bot]
a98eba200e
chore(deps): bump pnpm/action-setup from 4.1.0 to 5.0.0 (#27246)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-12 10:11:25 +03:00
dependabot[bot]
170b89fe7b
chore(deps): bump library/redis from 970b561 to 1f07381 in /test/container (#27273)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 14:51:38 -04:00
Eron Wright
1dd9075a72
fix(settings): only trigger reload for app.kubernetes.io/part-of=argocd secrets (#27213)
Signed-off-by: Eron Wright <eron.wright@akuity.io>
2026-04-10 09:56:43 -07:00
dependabot[bot]
38a3826df8
chore(deps): bump github.com/Azure/kubelogin from 0.2.16 to 0.2.17 (#27269)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 08:13:25 +02:00
dependabot[bot]
cd8a25c195
chore(deps): bump step-security/harden-runner from 2.16.1 to 2.17.0 (#27271)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 08:12:53 +02:00
dependabot[bot]
7b5b6a8744
chore(deps-dev): bump @types/dagre from 0.7.42 to 0.7.54 in /ui (#27184)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-09 22:22:54 +02:00
dudinea
3a6083cb2d
chore(ci): Enable harden runner blocking mode for workflows - part 1 (#27163) (#27256)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-04-09 22:29:47 +03:00
dudinea
fb82b16b2d
fix(ci): run yarn install with --frozen-lockfile (#27098) (#27099)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-04-09 19:37:28 +03:00
Nikolaos Astyrakakis
ae10c0c6c3
fix(hook): Fixed hook code issues that caused stuck applications on "Deleting" state (Issues #18355 and #17191) (#26724)
Signed-off-by: Nikolaos Astyrakakis <nastyrakakis@gmail.com>
2026-04-09 05:19:38 -10:00
dependabot[bot]
9e80e058e7
chore(deps): bump library/golang from 1.26.1 to 1.26.2 in /test/container (#27248)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 17:52:21 +03:00
Eoin Shaughnessy
4220eddbf3
docs: fix typos (#27254)
Signed-off-by: Eoin Shaughnessy <eoinsh@gmail.com>
2026-04-09 16:21:45 +03:00
Alexander Matyushentsev
422ef230fa
fix: Revert "fix: avoid calling UpdateRevisionForPaths unnecessary (#25151)" (#27241) 2026-04-09 06:39:05 -04:00
renovate[bot]
1fde0d075f
chore(deps): update dependency formidable to v2.1.3 [security] (#27233)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-09 12:14:05 +02:00
dependabot[bot]
f86cd078fc
chore(deps): bump github.com/coreos/go-oidc/v3 from 3.17.0 to 3.18.0 (#27247)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 09:52:19 +02:00
Alexander Matyushentsev
c3b498c2ae
fix: cancel log stream goroutines on client disconnect (#27243)
Signed-off-by: Alexander Matyushentsev <alexander@akuity.io>
2026-04-09 12:53:34 +05:30
Alexander Matyushentsev
ad310c2452
feat: replace error message in webhook handler with metrics (#27215)
Signed-off-by: Alexander Matyushentsev <alexander@akuity.io>
2026-04-08 13:59:58 -07:00
Sean Liao
6743cdf9cc
chore: don't read current user git configs in tests (#27172)
Signed-off-by: Sean Liao <sean@liao.dev>
2026-04-08 10:53:50 -04:00
renovate[bot]
19983129f2
chore(deps): update docker.io/library/ubuntu:26.04 docker digest to cc925e5 (#27232)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-08 14:19:19 +00:00
renovate[bot]
880433f03b
chore(deps): update docker.io/library/golang:1.26.1 docker digest to cd78d88 (#27231)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-08 14:15:30 +00:00
argoproj-renovate[bot]
34b38428e9
chore(deps): update group golang to v1.26.2 (#27224)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-08 09:36:13 -04:00
Blake Pettersson
f5f3bf8a06
chore: migrate to pnpm (#23937)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-08 09:31:19 -04:00
Blake Pettersson
f1388674cc
chore: migrate to cluster informer (#27206)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-08 09:26:21 -04:00
Nitish Kumar
212f51d851
fix(sharding): fix log format verb and document intentional shard-0 fallback (#27222)
Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: Soumya Ghosh Dastidar <44349253+gdsoumya@users.noreply.github.com>
2026-04-08 09:25:45 -04:00
argoproj-renovate[bot]
d3b06f113f
chore(deps): update docker.io/library/golang:1.26.1 docker digest to cd78d88 (#27214)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-08 07:02:25 -04:00
dependabot[bot]
86fcb1447f
chore(deps): bump library/golang from 1.26.1 to 1.26.2 in /test/remote (#27216)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 07:01:59 -04:00
dependabot[bot]
12b241a56e
chore(deps): bump library/redis from 009cc37 to 970b561 in /test/container (#27218)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 07:01:40 -04:00
Blake Pettersson
a2b91ce309
feat: add depth option to ui (#26618)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-08 15:29:08 +05:30
Atif Ali
57dfe55e70
fix: prevent automatic refreshes from informer resync and status updates (#25290)
Signed-off-by: Atif Ali <atali@redhat.com>
2026-04-07 18:25:51 -04:00
Alexandre Gaudreault
8c29202f1c
fix(hydrator): fix race condition in status update with hydrate annotation (#27183)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-07 17:01:04 -04:00
Linghao Su
8e2571fdca
fix(ui): handle 401 error in stream (#26917)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-04-07 12:04:46 -07:00
Michael Crenshaw
21b826e204
docs: Revise vulnerability reporting and remove bounty details (#27212)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-04-07 14:23:42 -04:00
argoproj-renovate[bot]
047c0ae734
chore(deps): update docker.io/library/golang:1.26.1 docker digest to 5e69504 (#27211)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-07 15:14:09 +00:00
Michael Crenshaw
4c42071c7b
fix(ci): openssf scorecard doesn't allow global vars (#27203)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-04-07 11:01:10 -04:00
argoproj-renovate[bot]
6d3e641cca
chore(deps): update docker.io/library/golang:1.26.1 docker digest to 42ebbf7 (#27205)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-04-07 10:14:42 -04:00
dependabot[bot]
884ba71afc
chore(deps): bump library/registry from 3.0 to 3.1 in /test/container (#27201)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 10:14:23 -04:00
Vikas Rao
48f18e2905
feat: add toggle-auto-sync resource action for Application (#21564) (#26477)
Signed-off-by: vikasrao23 <vikasrao23@users.noreply.github.com>
Co-authored-by: vikasrao23 <vikasrao23@users.noreply.github.com>
2026-04-07 06:12:32 -04:00
Vedant Mhatre
b8da88a288
docs: clarify Helm hook delete-policy semantics (#26828)
Signed-off-by: Vedant-Mhatre <vedantmh@gmail.com>
2026-04-07 12:56:58 +03:00
dependabot[bot]
7262e61704
chore(deps): bump step-security/harden-runner from 2.16.0 to 2.16.1 (#27202)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 04:14:06 +00:00
dudinea
364bd00647
chore(ci): add Step Security Harden Runner to workflows in audit mode (#27168)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-04-06 23:00:50 -04:00
Regina Voloshin
9a05e0e7f3
fix(ui): placate sonar with adding compare function for repo path sort autocomplete (#26906)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-04-07 01:09:30 +02:00
dependabot[bot]
71da5f64ba
chore(deps): bump actions/create-github-app-token from 1.12.0 to 2.1.1 (#24360)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 21:56:29 +00:00
dependabot[bot]
9f723393e8
chore(deps): bump the otel group across 1 directory with 4 updates (#27174)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 21:53:42 +00:00
dependabot[bot]
ba4d2a2104
chore(deps): bump google.golang.org/grpc from 1.79.3 to 1.80.0 (#27119)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 17:14:07 -04:00
dependabot[bot]
0e4f7c857d
chore(deps): bump github.com/itchyny/gojq from 0.12.18 to 0.12.19 (#27118)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 17:13:20 -04:00
dependabot[bot]
bb66ffe0fa
chore(deps): bump github.com/google/go-jsonnet from 0.21.0 to 0.22.0 (#26992)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 17:12:55 -04:00
Sean Liao
45a32a5c32
fix: use unique names for initial commits (#27171)
Signed-off-by: Sean Liao <sean@liao.dev>
2026-04-06 19:44:31 +00:00
Alexandre Gaudreault
f298f4500f
fix(hydrator): preserve all source type fields in GetDrySource() (#27189)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-04-06 18:46:43 +00:00
dependabot[bot]
86a245c8bc
chore(deps): bump lodash from 4.17.23 to 4.18.1 in /ui (#27135)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 14:44:22 -04:00
dependabot[bot]
3c47518db4
chore(deps): bump lodash-es from 4.17.23 to 4.18.1 in /ui (#27120)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 14:43:59 -04:00
S Kevin Joe Harris
5a11160e9c
chore(deps): Bump create-github-app-token to v3 (#27191)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-04-06 13:04:53 -04:00
dependabot[bot]
721a7e722e
chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.94 to 0.9.95 (#27175)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 12:14:34 -04:00
S Kevin Joe Harris
7af68d277f
chore(deps): bump github/codeql-action bundle to v4.35.1 (#27068)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-04-06 15:14:08 +00:00
dependabot[bot]
54f9cf08e4
chore(deps): bump the aws-sdk-v2 group with 3 updates (#27186)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 16:52:29 +02:00
dependabot[bot]
719ac073d8
chore(deps): bump docker/login-action from 4.0.0 to 4.1.0 (#27138)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 10:29:55 -04:00
dependabot[bot]
fc03869180
chore(deps-dev): bump webpack from 5.94.0 to 5.105.4 in /ui (#27185)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 10:27:54 -04:00
dependabot[bot]
bb2cfd9553
chore(deps): bump renovatebot/github-action from 46.1.7 to 46.1.8 (#27176)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 10:26:42 -04:00
Blake Pettersson
43d94f2b55
chore: group aws sdk v2 prs (#27179)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-04-06 16:59:41 +03:00
Regina Voloshin
321153a69e
docs: Update releasing.md with handling a failed release (#26049)
Signed-off-by: Regina Voloshin <regina.voloshin@codefresh.io>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-04-06 16:16:14 +05:30
T.dev :)
873f63aa0d
chore: align Go version to 1.26.1 across repository (#27112)
Signed-off-by: T.dev :) <120010745+thev1ndu@users.noreply.github.com>
2026-04-05 10:55:46 -04:00
dependabot[bot]
b018313aec
chore(deps): bump library/ubuntu from 730382b to a072b64 in /test/container (#27137)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-05 10:26:20 -04:00
Oliver Gondža
d449294f03
fix(docs): Fix manifest path in Source Hydrator docs (#27123)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-04-05 10:14:38 -04:00
github-actions[bot]
908ce7ee49
[Bot] docs: Update Snyk report (#27162)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-04-05 01:04:54 +00:00
Rohan Sood
68cbd05e52
fix: Add X-Frame-Options and CSP headers to Swagger UI endpoints (#26521)
Signed-off-by: rohansood10 <rohansood10@users.noreply.github.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: rohansood10 <rohansood10@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-04 00:58:32 +00:00
dependabot[bot]
e21d471965
chore(deps): bump picomatch from 2.3.1 to 2.3.2 in /ui (#27017)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-04 01:37:57 +02:00
dependabot[bot]
04e4e080df
chore(deps): bump flatted from 3.3.1 to 3.4.2 in /ui (#26928)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-04 01:37:09 +02:00
dependabot[bot]
0c4946f12f
chore(deps): bump minimatch from 3.1.3 to 3.1.4 in /ui (#26641)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-04 01:33:37 +02:00
dependabot[bot]
88663928f6
chore(deps): bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.5 (#27142)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 20:08:58 +02:00
dependabot[bot]
5c03a8b37d
chore(deps): bump github.com/aws/smithy-go from 1.24.2 to 1.24.3 (#27141)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 20:08:32 +02:00
Seitaro Fujigaki
490f02116c
docs: fix submit-your-pr rebase target to upstream/master (#27144)
Signed-off-by: seitarof <pyotarou@icloud.com>
2026-04-03 20:07:07 +02:00
Seitaro Fujigaki
82789b7071
refactor: use new(expr) for pointer literals in Go 1.26 (#27143)
Signed-off-by: seitarof <pyotarou@icloud.com>
2026-04-03 10:57:32 -04:00
dependabot[bot]
5fa0045311
chore(deps): bump SonarSource/sonarqube-scan-action from 7.0.0 to 7.1.0 (#27116)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-02 15:47:38 -04:00
dependabot[bot]
44e08631f2
chore(deps): bump library/ubuntu from 91832dc to 730382b in /test/container (#27117)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-02 15:47:21 -04:00
Leonardo Luz Almeida
62670d6595
fix: address SSD applier nil pointer in error cases (#27126)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2026-04-02 14:38:28 +00:00
Kanika Rana
fabbbbe6ee
test(e2e): add e2e tests for reverse deletionOrder when progressive sync enabled (#26673)
Signed-off-by: Kanika Rana <krana@redhat.com>
2026-04-02 10:23:38 -04:00
Alexy Mantha
3eebbcb33b
feat: use impersonation for server operations (logs, delete, etc) #22996 (#26898)
Signed-off-by: Alexy Mantha <alexy@mantha.dev>
2026-04-02 05:48:29 -04:00
OpenGuidou
4259f467b0
fix(server): Ensure OIDC config is refreshed at server restart (#26913)
Signed-off-by: OpenGuidou <guillaume.doussin@gmail.com>
2026-04-01 17:54:22 -07:00
rumstead
32f23a446f
fix(controller): reduce secret deepcopies and deserialization (#27049)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
2026-04-01 16:48:36 -04:00
Ville Vesilehto
5101db5225
chore(deps): migrate to go.yaml.in/yaml/v3 (#27063)
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2026-04-01 16:34:18 +02:00
dependabot[bot]
a5073f1ecc
chore(deps): bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 (#27101)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 10:15:25 -04:00
dependabot[bot]
bd1cccfb9a
chore(deps): bump github.com/yuin/gopher-lua from 1.1.1 to 1.1.2 (#27100)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 10:14:34 -04:00
Mangaal Meetei
0e729cce34
feat(cli): add appset-namespace for appset command (#27022)
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
2026-04-01 13:37:33 +03:00
Nitish Kumar
fb1b240c9e
docs: add missing content for Automatic Retry with a limit section (#27092)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-03-31 20:04:10 +02:00
Anand Francis Joseph
c52bf66380
fix(appcontroller): application controller in core mode fails to sync when server.secretkey is missing (#26793)
Signed-off-by: anandf <anjoseph@redhat.com>
2026-03-31 13:26:11 -04:00
Jaewoo Choi
e00345bff7
docs: replace resource_hooks links with sync-waves (#26187)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-03-31 19:37:42 +03:00
Oliver Gondža
c3c12c1cad
fix(commitserver): Static analysis fixes (#27085)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-03-31 15:15:04 +02:00
Dan Garfield
e96063557a
fix(docs): Fix formatting and clarity about requestedScopes in Keycloak integration docs (#27019)
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>
Signed-off-by: Dan Garfield <dan@codefresh.io>
2026-03-31 12:44:29 +03:00
S Kevin Joe Harris
bfe5cfb587
chore: New gif for docs (#27081)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-03-31 11:31:20 +03:00
Blake Pettersson
393152ddad
fix: pass repo.insecure flag to helm dependency build (#27078)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-30 15:40:21 -07:00
Max Verbeek
1042e12c6a
fix: force attempt http2 with custom tls config (#26975) (#26976)
Signed-off-by: Max Verbeek <m4xv3rb33k@gmail.com>
2026-03-30 16:39:56 +02:00
dependabot[bot]
0191c1684d
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.11 to 1.32.12 (#26844)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 09:05:43 -04:00
dependabot[bot]
ab0070994b
chore(deps): bump renovatebot/github-action from 46.1.6 to 46.1.7 (#27065)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 00:50:19 -04:00
dependabot[bot]
da7a61b75c
chore(deps): bump actions/setup-go from 6.3.0 to 6.4.0 (#27066)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 00:49:15 -04:00
dependabot[bot]
a892317c67
chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.19.12 to 1.19.13 (#27032)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 00:02:24 +00:00
dependabot[bot]
303e001b8b
chore(deps): bump codecov/codecov-action from 5.5.4 to 6.0.0 (#27030)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-29 23:38:06 +00:00
dependabot[bot]
d75a6b1523
chore(deps): bump sigstore/cosign-installer from 4.1.0 to 4.1.1 (#27031)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-29 23:15:44 +00:00
Navneet Shahi
1dc2ad04ff
feat: add health check for karpenter.sh/NodeClaim (#26876)
Signed-off-by: Navneet Shahi <navneetshahi345@gmail.com>
2026-03-29 16:04:39 -04:00
renovate[bot]
9ceaf0e8ee
chore(deps): update actions/create-github-app-token action to v2.2.2 (#27034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-29 15:59:11 -04:00
dependabot[bot]
6a22728fd5
chore(deps): bump github.com/aws/aws-sdk-go-v2/service/codecommit from 1.33.11 to 1.33.12 (#27035)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-29 15:58:44 -04:00
dependabot[bot]
0c02de795e
chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sts from 1.41.9 to 1.41.10 (#27037)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-29 15:58:12 -04:00
renovate[bot]
8e0b6e689a
chore(deps): update codecov/codecov-action action to v5.5.4 (#27038)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-29 15:57:06 -04:00
Regina Voloshin
5aa83735f2
ci: pin images of setup-qemu-action, setup-buildx-action and goreleaser CLI version (#27060)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-29 15:56:28 -04:00
dudinea
36f4ff7f35
fix(ci): pin goreman version used in ci-build.yaml (#27062) (#27061)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-03-29 15:55:19 -04:00
dudinea
99c51dfd2c
fix(ci): renovatebot action uses floating image tag (#27023) (#27024)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-03-29 16:29:54 +03:00
github-actions[bot]
a4c7f82c5b
[Bot] docs: Update Snyk report (#27056)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-03-29 10:51:31 +00:00
Atif Ali
759e746e87
fix: invalid URL or protocol not validated consistently by server and UI (#27052)
Signed-off-by: Atif Ali <atali@redhat.com>
2026-03-27 23:15:03 -04:00
Christopher Coco
94d8ba92a8
docs: update cosign install and docs links (#27042)
Signed-off-by: Christopher Coco <ccoco@redhat.com>
2026-03-27 22:55:05 +01:00
Pratik Lawate
b532528a0b
docs: fix README GitHub branding in community section (#27050)
Signed-off-by: Pratik Lawate <39809928+pratik268@users.noreply.github.com>
2026-03-27 21:28:22 +01:00
Alexander Matyushentsev
8705f6965e
Merge pull request #27029 from pierluigilenoci/fix/honor-stderrthreshold
fix: honor stderrthreshold when logtostderr is enabled
2026-03-27 18:23:35 +01:00
Alexander Matyushentsev
4aeca2fbf8
Merge pull request #27001 from leoluz/fix-ssd-npe
fix: address nil pointer when SSD returns error
2026-03-27 18:16:04 +01:00
Jonathan Ogilvie
2bbf91c0cf
fix: improve perf: switch parentUIDToChildren to map of sets, remove cache rebuild (#26863) (#26864)
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Signed-off-by: Jonathan Ogilvie <679297+jcogilvie@users.noreply.github.com>
2026-03-27 09:17:36 -04:00
Pierluigi Lenoci
84442e03bc
Honor stderrthreshold when logtostderr is enabled
Opt into the fixed klog behavior by setting legacy_stderr_threshold_behavior=false
after klog.InitFlags(). Ref: kubernetes/klog#212, kubernetes/klog#432

Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
2026-03-27 00:18:54 +01:00
Zach Aller
f97e2d2844
fix: wrong installation id returned from cache (#26969)
Signed-off-by: Zach Aller <zach_aller@intuit.com>
2026-03-26 16:57:21 -04:00
dependabot[bot]
e972bfca78
chore(deps): bump yaml from 1.10.2 to 1.10.3 in /ui (#27015)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 10:42:29 -04:00
Jaewoo Choi
1b405ce2b5
feat(ui): search filter by target revision (#24038)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-03-26 12:17:33 +02:00
Jaewoo Choi
45b926d796
fix(ui): show clear-all button for annotation-only filters (#26937)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-03-26 12:08:13 +02:00
dependabot[bot]
d4ec3282d4
chore(deps): bump library/redis from 8.6.1 to 8.6.2 in /test/container (#26991)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 12:56:16 -04:00
dependabot[bot]
4e3904a554
chore(deps): bump library/busybox from b3255e7 to 1487d0a in /test/e2e/multiarch-container (#26990)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 12:54:35 -04:00
Alexander Matyushentsev
8981a5b855
fix: controller incorrectly detecting diff during app normalization (#27002)
Signed-off-by: Alexander Matyushentsev <alexander@akuity.io>
2026-03-25 12:32:07 +00:00
Leonardo Luz Almeida
ab27dd3ccf
fix: address nil pointer when SSD returns error
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2026-03-25 12:34:32 +01:00
Regina Voloshin
269e0b850b
fix: Hook resources not created at PostSync when configured with PreDelete PostDelete hooks (#26996)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-25 12:09:14 +02:00
Nolan Emirot
3f15cc6c9e
chore: fix bad indentation (#26989)
Signed-off-by: emirot <emirot.nolan@gmail.com>
2026-03-24 18:58:21 -04:00
Alberto Chiusole
25df43d7a0
fix(ui): Improve message on self-healing disabling panel (#26977) (#26978)
Signed-off-by: Alberto Chiusole <chiusole@seqera.io>
2026-03-24 15:50:31 +02:00
dependabot[bot]
6b35246605
chore(deps): bump library/golang from c7e98cc to 595c784 in /test/container (#26960)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 12:51:02 -04:00
dependabot[bot]
bd7b16cbeb
chore(deps): bump renovatebot/github-action from 46.1.5 to 46.1.6 (#26961)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 07:26:22 -04:00
argoproj-renovate[bot]
e1bb509264
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.11.4 (#26957)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-03-22 16:14:59 -04:00
dancer13
3570031fa8
docs: fix typo in metrics (#26951)
Signed-off-by: dancer13 <alfredotic0809@gmail.com>
2026-03-22 03:01:26 -06:00
github-actions[bot]
3eee5e3f52
[Bot] docs: Update Snyk report (#26950)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-03-22 08:03:59 +00:00
Oliver Gondža
77732d89b3
docs: Formatting and style for source-hydrator.md (#26949)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-03-21 10:35:47 +01:00
Honarkhah
4aabf526c8
fix: typo in error message for multi-source apps (#26936)
Signed-off-by: Honarkhah <m.honar@gmail.com>
2026-03-20 10:55:47 -04:00
dependabot[bot]
24c3abd8dd
chore(deps): bump library/ubuntu from 5798086 to 91832dc in /test/container (#26930)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 09:57:04 -04:00
Linghao Su
91d83d37c4
fix(server): fix find container logic for terminal (#26858)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-03-19 23:37:39 -10:00
dependabot[bot]
aabe8524ba
chore(deps): bump library/redis from a019c00 to 315270d in /test/container (#26902)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-19 12:56:40 -04:00
Papapetrou Patroklos
fe30b2c60a
fix: trigger app sync on app-set spec change (#26811)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-03-19 10:31:07 +00:00
dependabot[bot]
148c86ad42
chore(deps): bump actions/cache from 5.0.3 to 5.0.4 (#26901)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-03-19 07:31:08 +00:00
dependabot[bot]
30db355197
chore(deps): bump codecov/codecov-action from 5.5.2 to 5.5.3 (#26900)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-19 08:31:09 +02:00
Andy Lo-A-Foe
442aed496f
fix: prevent panic on nil APIResource in permission validator (#26610)
Signed-off-by: Andy Lo-A-Foe <andy.loafoe@gmail.com>
2026-03-18 14:27:24 -04:00
Blake Pettersson
87ccebc51a
chore(ci): remove cherry-pick branch if already present (#26881)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-18 14:23:20 -04:00
dependabot[bot]
20439902eb
chore(deps): bump google.golang.org/grpc from 1.79.2 to 1.79.3 (#26886)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-18 17:43:25 +00:00
Michael Crenshaw
559da44135
chore(deps): bump Helm to 3.20.1 (#26896)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-18 13:42:58 -04:00
Blake Pettersson
a87aab146e
chore(ci): attempt to make test less flaky (#26890)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-18 13:02:42 -04:00
Andrea Matera
d34e83f60c
chore: add Mollie to USERS.md (#26895)
Signed-off-by: Andrea Matera <andrea.matera@mollie.com>
2026-03-18 15:13:44 +00:00
Michael Crenshaw
566c172058
feat(ui): add GitOps Promoter resource icon (#26894)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-18 10:52:20 -04:00
dependabot[bot]
d80a122502
chore(deps): bump library/ubuntu from fed6ddb to 5798086 in /test/container (#26887)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-18 14:38:29 +00:00
Ekamveer Walia
539c35b295
docs: fix incorrect wording for ApplicationSets in other namespaces (#26893) 2026-03-18 13:44:10 +00:00
Blake Pettersson
45a84dfa38
fix(ci): add .gitkeep to images dir (#26892)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-18 09:37:18 -04:00
Mangaal Meetei
d011b7b508
fix: Bitbucket webhook diffstat does not work with upper case repo slug (#26594)
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
2026-03-18 07:50:32 -04:00
Huynh Duc Tran
f1b922765d
chore: add Techcom Securities to USERS.md (#26889)
Signed-off-by: Tran Huynh Duc <duchuynhtran12a1@gmail.com>>
Signed-off-by: Duck <duchuynhtran12a1@gmail.com>
2026-03-18 15:22:26 +05:30
Jaewoo Choi
4b4bbc8bb2
fix(ui): include _-prefixed dirs in embedded assets (#26589)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-03-17 16:55:20 -06:00
Atif Ali
c5d1c914bb
fix(UI): show RollingSync step clearly when labels match no step (#26877)
Signed-off-by: Atif Ali <atali@redhat.com>
2026-03-17 23:05:29 +01:00
dependabot[bot]
59aea0476a
chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.19.11 to 1.19.12 (#26840)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 23:01:40 +01:00
Nitish Kumar
4cdc650a58
feat(helm): support wildcard glob patterns for valueFiles (#26768)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-03-17 21:37:43 +00:00
Blake Pettersson
2b6489828b
chore: allow multiple signoff lines (#26875)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-17 21:06:28 +00:00
Alexander Matyushentsev
92c3ef2559
fix: avoid scanning symlinks in whole repo on each app manifest operation (#26718)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2026-03-17 13:40:16 -07:00
Alexandre Gaudreault
4070b6feea
docs: add warning in orphan resource doc (#26874)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-03-17 12:54:01 -04:00
Jonathan Ogilvie
67db597810
fix: stack overflow when processing circular ownerrefs in resource graph (#26783) (#26790)
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Signed-off-by: Jonathan Ogilvie <679297+jcogilvie@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-17 12:03:23 -04:00
rumstead
5b3073986f
feat(appset): add concurrency when managing applications (#26642)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-03-17 15:04:11 +00:00
Kit Dallege
5ceb8354e6
docs: add orphaned resources FAQ entry (#26833)
Signed-off-by: kovan <xaum.io@gmail.com>
2026-03-17 10:53:24 -04:00
S Kevin Joe Harris
79922c06d6
ci: Improve Go build timing with effective caching (#26628)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-03-17 20:12:09 +05:30
Sinhyeok Seo
382c507beb
fix(server): Cache glob patterns to improve RBAC evaluation performance (#25759)
Signed-off-by: Sinhyeok Seo <sinhyeok@gmail.com>
Signed-off-by: Sinhyeok Seo <44961659+Sinhyeok@users.noreply.github.com>
2026-03-17 10:22:23 -04:00
dependabot[bot]
8142920ab8
chore(deps): bump library/redis from 1c054d5 to a019c00 in /test/container (#26865)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 07:08:27 -04:00
Blake Pettersson
47a0746851
chore(renovate): group aws-sdk-v2-updates (#26848)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-17 11:39:00 +02:00
Regina Voloshin
13cd517470
docs: move releases to Tuesdays (#26859)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-16 18:27:47 +02:00
Christopher Coco
63a009effa
fix(test): make fail message better for TestAuthReconcileWithMissingNamespace (#26856)
Signed-off-by: Christopher Coco <ccoco@redhat.com>
2026-03-16 03:13:40 -10:00
github-actions[bot]
5a6c83229b
chore: Bump version in master (#26855)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <19544836+reggie-k@users.noreply.github.com>
2026-03-16 14:44:45 +02:00
dependabot[bot]
f409135f17
chore(deps): bump softprops/action-gh-release from 2.5.0 to 2.6.1 (#26838)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 13:00:58 +02:00
Regina Voloshin
458837ee21
docs: clarify v prefix in cluster version related docs for CMP Plugins and CLI (#26852)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-16 10:26:45 +00:00
Regina Voloshin
8fb91682db
docs: fix cluster generator version docs (#26847)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-16 10:30:30 +02:00
dependabot[bot]
63ddc3c3df
chore(deps): bump github.com/aws/aws-sdk-go-v2/service/codecommit from 1.33.10 to 1.33.11 (#26842)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 09:20:01 +01:00
dependabot[bot]
b5a08fac7a
chore(deps): bump renovatebot/github-action from 46.1.4 to 46.1.5 (#26839)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 09:19:33 +01:00
Regina Voloshin
f7dbfbd9b4
docs: updated upgrade guide 3.3-3.4 and cluster generator doc with the changed cluster version format (#26837)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-15 21:45:50 -04:00
dudinea
f0c694d9f0
fix: fix generator bug with templating of parameters in values (#25342) (#26696)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-03-15 16:11:46 +02:00
dudinea
06719071d6
fix: fix GetAppdetails to show data from refs to other git repos (#26440) (#26544)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-03-15 16:11:03 +02:00
Michael Crenshaw
2653860882
docs: document dependency upgrade policy (#26826)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-14 13:32:55 -04:00
Oliver Gondža
59f229b9fd
fix(ci): Add missing git-lfs installer checksum for ppc64le (#26835)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-03-14 17:44:15 +02:00
Peter Jiang
22327073ef
fix: allow automatedSyncPolicy fields to be changed to false (#26763)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-03-14 11:27:15 -04:00
Josh Soref
76a14132f5
chore: Make links accessible + friendly (#26815)
Signed-off-by: Josh Soref <jsoref@gmail.com>
2026-03-13 17:41:48 -04:00
dependabot[bot]
bd9c12cbba
chore(deps): bump github.com/olekukonko/tablewriter from 1.1.3 to 1.1.4 (#26820)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 17:40:18 -04:00
Michael Crenshaw
d875c6170e
chore: make getRepositorySecret more readable (#26827)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-13 17:08:02 -04:00
Mike Cutsail
c86e32b9d6
chore: update go-oidc to v3.17.0 (#26822)
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
2026-03-13 22:54:57 +02:00
Anudeep Reddy
e208035ac7
chore: Add C.H. Robinson to USERS.md (#26825)
Signed-off-by: Anudeep Reddy <reddanu@chrobinson.com>
2026-03-13 14:22:52 -04:00
Arthur Outhenin-Chalandre
b7e2027f35
feat: add Prune and Delete as application level sync option (#23370)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@ledger.fr>
2026-03-13 13:50:34 -04:00
Regina Voloshin
b8e6a797cc
docs: added custom health checks section to 3.3-3.4 upgrade guide (#26812)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-13 09:31:38 +02:00
Nitish Kumar
3a4b0a0fed
fix: helm flaky test (#26805)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-03-12 12:52:33 -04:00
Anand Francis Joseph
8739f91afd
fix(reposerver): using timeouts in http transport for Github App authentication (#26762)
Signed-off-by: anandf <anjoseph@redhat.com>
2026-03-12 03:15:08 -10:00
Soumya Ghosh Dastidar
6df1a5bbc2
fix: skip token refresh threshold parsing in unrelated components (#26803)
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2026-03-12 10:30:55 +00:00
Papapetrou Patroklos
d099c24655
fix: fixes the already exists error when syncing apps with replace (#26791)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-03-12 12:14:08 +02:00
dependabot[bot]
f1c5201e0c
chore(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 (#26801)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-12 09:17:34 +00:00
dependabot[bot]
4524dc997c
chore(deps): bump golang.org/x/net from 0.51.0 to 0.52.0 (#26799)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-12 09:11:17 +00:00
Kirill Bilchenko
3cb4955d44
feat: expose notifications controller processors count via cmd params (#26798)
Signed-off-by: Kirill Bilchenko <kirillbilchenko@users.noreply.github.com>
2026-03-12 01:49:31 +02:00
Christopher Coco
f8c0d7efcf
fix: health check doesn't detect resource deletion during sync operation (#26286)
Signed-off-by: Christopher Coco <ccoco@redhat.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-03-11 21:14:30 +00:00
jaehanbyun
4c59c3c7ec
chore: unify clientOpts usage in command parameters (#24251)
Signed-off-by: jaehanbyun <awbrg789@naver.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-11 17:09:18 +02:00
Nitish Kumar
305ecb623b
fix: use certificate fingerprints to deduplicate TLS certs (#25779)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-03-11 14:33:00 +00:00
dependabot[bot]
d1089f8b55
chore(deps): bump github.com/bradleyfalzon/ghinstallation/v2 from 2.17.0 to 2.18.0 (#26782)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 15:57:25 +02:00
Regina Voloshin
7477ecb5b9
ci: exclude gitops engine bumps from renovate (#26787)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-11 09:42:00 -04:00
dependabot[bot]
79a11cb745
chore(deps): bump library/golang from e2ddb15 to c7e98cc in /test/container (#26780)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 12:21:18 +02:00
renovate[bot]
58993ecabc
chore(deps): update docker.io/library/golang:1.26.0 docker digest to fb612b7 (#26779)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-11 12:20:50 +02:00
Nitish Kumar
7ccb6cecc1
chore(migration): migrate to aws-sdk-go-v2 (#26439)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-03-11 12:12:56 +02:00
dependabot[bot]
6041e85df0
chore(deps): bump github.com/Azure/kubelogin from 0.2.15 to 0.2.16 (#26781)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 08:26:19 +01:00
Alexandre Gaudreault
95c17b68f5
test(e2e): ExpectConsistency was not consistent (#26778)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-03-10 15:44:15 -04:00
Linghao Su
18fe8c4e34
chore: use server-side apply for CRDs in Tiltfile to fix annotation size limit (#26419)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-03-10 19:20:28 +00:00
Michael Crenshaw
8a507b783e
fix(dex): run as user 1001 (#26726) (#26775)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-10 13:08:04 -04:00
jhansi
054538b069
fix: AAD Domain Hint Improvement (fixes #18066) (#24639)
Signed-off-by: pjmanda <jhansi.manda@amadeus.com>
Signed-off-by: jhansireddy01 <m.jhansireddy01@gmail.com>
Co-authored-by: pjmanda <jhansi.manda@amadeus.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: jhansireddy01 <m.jhansireddy01@gmail.com>
2026-03-10 16:21:13 +02:00
argoproj-renovate[bot]
845d1c9c40
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.11.3 (#26771)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-03-10 09:47:41 -04:00
Anand Francis Joseph
d9c83da78f
fix(server): invalidate JWT tokens on logout (#26388)
Signed-off-by: anandf <anjoseph@redhat.com>
2026-03-10 09:03:48 -04:00
dependabot[bot]
36e8c52829
chore(deps): bump sigstore/cosign-installer from 4.0.0 to 4.1.0 (#26761)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-10 06:52:33 +02:00
Michael Crenshaw
63698bd4d2
fix(dex): run as user 1001 (#26726) (#26757)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-09 21:30:13 +00:00
S Kevin Joe Harris
cf53ed7ad1
ci: Skip CodeQL for documentation-only changes (#26602)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
Signed-off-by: S Kevin Joe Harris <kevinjoeharris1@gmail.com>
Co-authored-by: rumstead <37445536+rumstead@users.noreply.github.com>
2026-03-09 15:22:59 +00:00
Michael Crenshaw
6eea558023
fix(health): use note.drySha when available (#26698)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-09 14:44:07 +00:00
Papapetrou Patroklos
6740282c3a
chore: adds Pat and Reggie as release champion and approver for 3.5 (#26748)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-03-09 14:02:49 +02:00
Takuma Shibuya
3250327f01
fix: use InstanceName for cache cleanup on Application deletion (#26741)
Signed-off-by: takuma-shibuya <takuma.shibuya@because-i-love.dev>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2026-03-08 23:28:45 -10:00
Nitish Kumar
de99b70071
fix(reposerver): make temp dir cleanup best-effort in TestGenerateManifestsHelmWithRefs_CachedNoLsRemote (#26742)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-03-09 07:53:00 +00:00
Alexander Matyushentsev
984a29c921
fix: skip unnecessary git state clean (#26714)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2026-03-09 12:58:31 +05:30
dependabot[bot]
92e4b2c877
chore(deps): bump golang.org/x/oauth2 from 0.35.0 to 0.36.0 (#26733)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 07:27:46 +00:00
dependabot[bot]
1762a59f30
chore(deps): bump the otel group with 6 updates (#26731)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-09 06:49:10 +00:00
dependabot[bot]
b3c5f4b1c6
chore(deps): bump golang.org/x/sync from 0.19.0 to 0.20.0 (#26734)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 08:14:02 +02:00
dependabot[bot]
60ee21377c
chore(deps): bump renovatebot/github-action from 46.1.3 to 46.1.4 (#26730)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 07:31:27 +02:00
dependabot[bot]
37f29e517d
chore(deps): bump google.golang.org/grpc from 1.79.1 to 1.79.2 (#26735)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 07:30:21 +02:00
dependabot[bot]
fd1307d454
chore(deps): bump github.com/go-openapi/runtime from 0.29.2 to 0.29.3 (#26736)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 07:29:50 +02:00
dependabot[bot]
d8b33bd437
chore(deps): bump golang.org/x/time from 0.14.0 to 0.15.0 (#26737)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 07:28:56 +02:00
Josef Kolář
330077c5a8
fix(appset): fix post-generator selector ignoring labels in GoTemplate mode (#26717)
Signed-off-by: Josef Kolář <josef.kolar@firma.seznam.cz>
2026-03-08 22:26:11 -04:00
dependabot[bot]
0ee21afe37
chore(deps): bump library/golang from 1.26.0 to 1.26.1 in /test/container (#26708)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-08 22:12:44 -04:00
dependabot[bot]
3b34d2a56a
chore(deps): bump tmp from 0.2.3 to 0.2.4 in /ui-test (#24058)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-03-08 23:07:37 +01:00
tank.500m
472d50cb19
fix: OpenTelemetryCollector health check shows 0/0 for mode: daemonset (#26391)
Signed-off-by: tank.500m <tank.500m@kakaocorp.com>
2026-03-08 21:07:42 +02:00
dependabot[bot]
560d428381
chore(deps): bump docker/build-push-action from 6.19.2 to 7.0.0 (#26706)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-08 20:38:51 +02:00
argoproj-renovate[bot]
0d22f39603
chore(deps): update module github.com/vektra/mockery/v3 to v3.7.0 (#26716)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-03-08 20:38:28 +02:00
Papapetrou Patroklos
08602c27c1
fix: adds the missing source-name flag in app unset command (#26712)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-03-08 18:11:16 +02:00
argoproj-renovate[bot]
ffeacae414
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.11.2 (#26728)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-03-08 17:25:16 +02:00
argoproj-renovate[bot]
1f6d54ce04
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.11.1 (#26713)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-08 15:56:45 +02:00
Rouke Broersma
ede9229353
fix(actions): Use correct annotation for CNPG suspend/resume (#26711)
Signed-off-by: Rouke Broersma <rouke.broersma@infosupport.com>
2026-03-08 15:47:43 +02:00
github-actions[bot]
d6e36fc5ea
[Bot] docs: Update Snyk report (#26725)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-03-08 10:56:51 +00:00
Michael Crenshaw
cbbb19ddef
fix: make config key optional (#26701)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-03-07 01:57:29 +01:00
dependabot[bot]
d8d7009a4f
chore(deps): bump docker/setup-buildx-action from 3.12.0 to 4.0.0 (#26705)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 08:52:31 -05:00
Dan Garfield
30e30a126b
docs: Update shallow clone section for clarity (#26697)
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>
2026-03-06 02:06:01 +01:00
dependabot[bot]
f46c387c68
chore(deps): bump immutable from 4.0.0 to 4.3.8 in /ui (#26690)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 11:59:34 -05:00
dependabot[bot]
063d3b6d80
chore(deps): bump docker/setup-qemu-action from 3.6.0 to 4.0.0 (#26688)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 11:27:49 +02:00
dependabot[bot]
3321498f0b
chore(deps): bump docker/login-action from 3.7.0 to 4.0.0 (#26689)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 11:27:05 +02:00
Alex Eftimie
13bc5ae0c4
feat: add argocd account session-token command (#15277) (#24638)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: alexef <alex.eftimie@getyourguide.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Peter Jiang <35584807+pjiang-dev@users.noreply.github.com>
2026-03-04 13:58:11 -05:00
Mathieu Garstecki
11ec675138
docs(rbac): add note documenting the role requirement for groups (#7952) (#26672)
Signed-off-by: Mathieu Garstecki <mathieu.garstecki@pigment.com>
2026-03-04 19:39:59 +05:30
Papapetrou Patroklos
e01714590d
fix: create events with argocd namespace (#26667)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-03-04 15:51:48 +02:00
dependabot[bot]
1f124986d9
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.10 to 1.32.11 (#26679)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 13:44:54 +00:00
dependabot[bot]
abb60a9c27
chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.19.10 to 1.19.11 (#26680)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 14:54:18 +02:00
dependabot[bot]
14e69bfa0c
chore(deps): bump tj-actions/changed-files from 47.0.4 to 47.0.5 (#26676)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 11:56:47 +00:00
dependabot[bot]
6baa4bcbcc
chore(deps): bump actions/setup-node from 6.2.0 to 6.3.0 (#26675)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 13:03:28 +02:00
Peter Jiang
d11c99a516
fix(ui): update AppSet UI for watch API and remove unused filters (#26631)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-03-03 08:34:56 -05:00
Aditya Raj
8ed52b2ca1
feat(notification): add appProject access to notification templates (#26437) (#26470)
Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
Signed-off-by: Aditya Raj <161347394+adityaraj178@users.noreply.github.com>
2026-03-03 07:41:05 -05:00
dependabot[bot]
0af9b6761e
chore(deps): bump the otel group across 1 directory with 6 updates (#26668)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 13:34:16 +02:00
ManvithaP
6e89ed9867
fix: use force flag in copyutil symlink to prevent repo-server crashes (#26613)
Signed-off-by: manvitha92 <62259625+manvitha92@users.noreply.github.com>
Co-authored-by: manvitha92 <62259625+manvitha92@users.noreply.github.com>
2026-03-03 13:32:08 +02:00
Papapetrou Patroklos
7f877a68a9
chore: bumps dex version to 2.45.0 (#26609)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
Signed-off-by: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com>
2026-03-03 13:07:05 +02:00
dudinea
1d2d032642
test: fix test TestUntgz/preserves file mode (#26663) (#26664)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-03-03 11:06:43 +02:00
Rodrigo Fior Kuntzer
b61b08d18b
fix(repo-server): optimize short ref resolution in revision comparison (#26456)
Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>
2026-03-02 14:57:04 -05:00
Regina Voloshin
c85d65511b
ci: run pr-title-check on pull-request (#26662)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-03-02 18:12:06 +02:00
jwinters01
251c366f8a
chore: bump argo-ui version (#26629)
Signed-off-by: Jonathan Winters <wintersjonathan0@gmail.com>
2026-03-02 09:21:29 -05:00
dependabot[bot]
7825b4bce3
chore(deps): bump go.opentelemetry.io/otel/sdk from 1.39.0 to 1.40.0 (#26649)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:37:29 +02:00
dependabot[bot]
5e3feb4463
chore(deps): bump renovatebot/github-action from 46.1.2 to 46.1.3 (#26658)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:36:43 +02:00
dependabot[bot]
f50f88fb66
chore(deps): bump github.com/aws/smithy-go from 1.24.1 to 1.24.2 (#26657)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:35:32 +02:00
dependabot[bot]
564d17d57f
chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.93 to 0.9.94 (#26656)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:34:56 +02:00
dependabot[bot]
91253dcf46
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.44.0 to 1.46.0 (#26655)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:01:47 +02:00
dependabot[bot]
2c6d97a89f
chore(deps): bump library/redis from 5cb00b0 to 1c054d5 in /test/container (#26654)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:01:10 +02:00
Papapetrou Patroklos
9e9a49d95f
Merge pull request #26643 from malikdraz/fix/helm-version-deprecated-flag
chore(ci): remove deprecated --client flag from helm version
2026-03-01 17:38:29 +02:00
dependabot[bot]
858f159cf9
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.43.0 to 1.44.0 (#26634)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-01 12:07:32 +02:00
Oleksandr Saulyak
a903bc46e6
fix(ui): monaco-editor search scroll positioning fix (#26638) (#26639)
Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@octopus.com>
2026-03-01 11:53:35 +02:00
github-actions[bot]
945fb13fe6
[Bot] docs: Update Snyk report (#26647)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-03-01 09:49:02 +00:00
Papapetrou Patroklos
6a10ffe833
fix: ensure compatibility of kubeversion.version with what helm reeturns (#26469)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-03-01 11:40:15 +02:00
S Kevin Joe Harris
db8c801b0d
docs: Add CodeQL in docs (#26645)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-28 13:54:43 -07:00
Malik Draz
739bc5812f fix: remove deprecated --client flag from helm version
The --client flag was a Helm 2 concept for distinguishing client vs
Tiller server versions. In Helm 3, there is no Tiller, so `helm version`
already only shows the client version. The flag still works but prints a
deprecation warning, adding unnecessary noise to CI output.

Signed-off-by: Malik Draz <engineering@malikdraz.io>
2026-02-28 22:45:44 +11:00
Tuxthepirate
a3b4c8327f
chore: update redis-ha chart to 4.35.10 (#26453)
Signed-off-by: Doubleth1nk <20193656+Doubleth1nk@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-27 15:03:35 -05:00
dependabot[bot]
38345d6185
chore(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 (#26633)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 15:02:52 -05:00
dependabot[bot]
796b722807
chore(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 (#26635)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 15:02:31 -05:00
Jonathan Ogilvie
887736534f
fix: multi-level cross-namespace hierarchy traversal for cluster-scoped intermediates (#26408, #24379) (#26410)
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Signed-off-by: Jonathan Ogilvie <679297+jcogilvie@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-27 08:07:06 -05:00
Artem Vdovin
ff8305694f
fix(repo-server): optimize repoLock on checkout for manifest-generate-paths (#26468)
Signed-off-by: Artem Vdovin <arte.vdovin@gmail.com>
2026-02-26 12:15:52 -05:00
Daniel Barnes
af05c56bc4
fix(dashboards): Correct job label for the Controller Telemetry Panel (#26548)
Signed-off-by: Daniel Barnes <dabarnes2b@gmail.com>
2026-02-26 11:31:06 -05:00
Peter Jiang
19b41b9d31
feat: ApplicationSet watch API (#26409)
Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
Co-authored-by: nitishfy <justnitish06@gmail.com>
2026-02-26 10:07:00 -05:00
dependabot[bot]
4e71de3ef7
chore(deps): bump basic-ftp from 5.0.5 to 5.2.0 in /ui-test (#26617)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 09:52:42 -05:00
dependabot[bot]
b70d1444f0
chore(deps): bump minimatch from 3.1.2 to 3.1.3 in /ui (#26604)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 09:51:51 -05:00
dependabot[bot]
d77f8d8667
chore(deps): bump actions/setup-go from 6.2.0 to 6.3.0 (#26620)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-25 23:35:19 -10:00
dependabot[bot]
adf88c56ef
chore(deps): bump github.com/alicebob/miniredis/v2 from 2.36.1 to 2.37.0 (#26621)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-25 23:34:13 -10:00
Nitish Kumar
986cdf0ef3
fix(dev): skip Tilt rebuild on test file changes (#26624)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-02-26 13:13:32 +05:30
dependabot[bot]
98430658d8
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.42.0 to 1.43.0 (#26622)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 08:38:51 +01:00
dependabot[bot]
5fff3b3640
chore(deps): bump golang.org/x/net from 0.50.0 to 0.51.0 (#26623)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 08:38:33 +01:00
dependabot[bot]
acc4bb7078
chore(deps): bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 (#26616)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-25 22:52:55 +01:00
jwinters01
ff45972ec8
feat(ui): enable hydrator support in app create panel (#26485)
Signed-off-by: Jonathan Winters <wintersjonathan0@gmail.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-25 15:54:43 -05:00
dependabot[bot]
8c1a815b78
chore(deps): bump library/redis from dc123d5 to 5cb00b0 in /test/container (#26606)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-25 07:17:54 -05:00
argoproj-renovate[bot]
f6b0c8146f
chore(deps): update docker.io/library/golang:1.26.0 docker digest to b39810f (#26603)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-02-25 07:17:25 -05:00
Alexander Matyushentsev
c0a2a579c5
feat: implement application cache synchronization in appset controller (#26578)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2026-02-25 01:08:53 -08:00
Takuma Shibuya
5e6449fbba
fix: handle parse errors in ReadLocalConfig properly (#26597)
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2026-02-24 22:40:26 -10:00
dependabot[bot]
4ffad60095
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.41.0 to 1.42.0 (#26605)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-25 08:23:06 +01:00
Takuma Shibuya
3ce6f14b74
refactor: remove helper pointer functions in pull_request tests (#26598)
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2026-02-24 13:05:53 -05:00
Takuma Shibuya
6795b80cfc
refactor: replace ptr.To with new(expr) (#26534)
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2026-02-24 17:42:12 +01:00
dependabot[bot]
6ab9426cf5
chore(deps): bump library/redis from 8.6.0 to 8.6.1 in /test/container (#26579)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-24 11:40:15 -05:00
argoproj-renovate[bot]
630c6e86ea
chore(deps): update module github.com/vektra/mockery/v3 to v3.6.4 (#26445)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-02-24 15:45:19 +01:00
argoproj-renovate[bot]
51327cb818
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.10.1 (#26382)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-24 02:51:19 -10:00
Papapetrou Patroklos
1d50c48dec
Merge pull request #26590 from sh-cho/fix-docs-link-correctly
docs: Fix link correctly
2026-02-24 13:56:21 +02:00
Seonghyeon Cho
3dd71ea14d docs: Fix link correctly
`https://www.googleapis.com/auth.admin.directory.group` is used as API
scope, not a link itself.

Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
2026-02-24 20:40:39 +09:00
Papapetrou Patroklos
987768c07d
Merge pull request #26133 from Kevinjoeharris/Fix-broken-links-in-users
docs: Fixed broken links in USERS.md
2026-02-24 12:08:12 +02:00
HARSHIL GARG
4519fdf650
fix: include Depth field in Repository.Sanitized() response (#26572)
Signed-off-by: Harshil Garg <harshil562@users.noreply.github.com>
2026-02-23 23:05:35 -10:00
Linghao Su
956a6a1352
fix(controller): handle comma-separated hook annotations for PreDelete/PostDelete hooks (#26420)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-02-23 23:04:56 -10:00
dependabot[bot]
2ae64ba04b
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.9 to 1.32.10 (#26581)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-24 08:40:06 +01:00
Linghao Su
fd3c8840c9
fix(ui): remove createApplication option in write repo credential list (#23550)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-02-23 16:14:37 -05:00
Oliver Gondža
5e974b03d3
docs: Proposal: Source Integrity Policies (#25148)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
Co-authored-by: jannfis <jann@mistrust.net>
2026-02-23 09:23:33 -05:00
Papapetrou Patroklos
973c3f281d
Merge pull request #26569 from sh-cho/fix-docs-link
docs: Fix link
2026-02-23 13:56:17 +02:00
Seonghyeon Cho
3e29c4c752 docs: Fix link
Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
2026-02-23 20:45:00 +09:00
dependabot[bot]
a21fcf32ae
chore(deps): bump goreleaser/goreleaser-action from 6.4.0 to 7.0.0 (#26565)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 13:16:24 +02:00
dependabot[bot]
a8676aeb46
chore(deps): bump github.com/Azure/kubelogin from 0.2.14 to 0.2.15 (#26560)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 08:57:47 +01:00
dependabot[bot]
8aea5612ab
chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.91 to 0.9.93 (#26563)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 09:27:17 +02:00
dependabot[bot]
296100fe13
chore(deps): bump renovatebot/github-action from 46.1.1 to 46.1.2 (#26562)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 09:26:04 +02:00
dependabot[bot]
a4f9f57b5f
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.39.0 to 1.41.0 (#26561)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 09:25:33 +02:00
dependabot[bot]
09fac7b7f3
chore(deps): bump github.com/aws/smithy-go from 1.24.0 to 1.24.1 (#26564)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 08:17:36 +01:00
S Kevin Joe Harris
ccdcf6f885
Merge branch 'master' into Fix-broken-links-in-users 2026-02-23 01:52:36 +05:30
Sander Tervoert
7a3d6f1f6a
feat: Implement nmstate health checks (#26506) (#26507)
Signed-off-by: sandert-k8s <sandert98@gmail.com>
2026-02-22 13:44:36 -05:00
Blake Pettersson
5e7bb39b02
chore: use base ref for cherry-pick prs (#26551)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-22 20:34:44 +02:00
Papapetrou Patroklos
46ff85af31
Merge pull request #26546 from Kevinjoeharris/codegen-local
docs: Change codegen to codegen-local
2026-02-22 13:11:38 +02:00
Regina Voloshin
3d97fc9ede
docs: instruct to enable ClientSideApplyMigration in 3.3.2 (#26547)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-22 12:28:10 +02:00
github-actions[bot]
ee4d6e0efe
[Bot] docs: Update Snyk report (#26545)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-02-22 10:51:59 +02:00
Kevin Joe Harris
bbb13df56f Change to make codegen-local
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-22 06:49:29 +05:30
S Kevin Joe Harris
9515e68413
chore(deps): Bump create-github-app-token (#26487)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-21 18:33:58 -05:00
Papapetrou Patroklos
ae08a3ed6c
Merge pull request #26519 from hokatabi/fix/kustomize-nameprefix-suffix-docs
docs(api): fix namePrefix/nameSuffix description in docs and API comments
2026-02-22 01:31:53 +02:00
dependabot[bot]
cc302bab90
chore(deps): bump sigs.k8s.io/structured-merge-diff/v6 from 6.3.1-0.20251003215857-446d8398e19c to 6.3.2 (#26332)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:41:44 -05:00
dependabot[bot]
0c2fa1ea23
chore(deps): bump github.com/redis/go-redis/v9 from 9.17.3 to 9.18.0 (#26475)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:40:35 -05:00
Rishabh Pandey
afdb3fe047
docs(operator-manual): fix typos and improve clarity (#26542)
Signed-off-by: rishabh <rishank69@gmail.com>
2026-02-21 09:18:20 -05:00
Greg Barasch
401b1a8b3c
fix: parent-child httpproxy health checking (#25714)
Signed-off-by: Greg Barasch <gregbarasch@gmail.com>
2026-02-21 09:16:33 -05:00
Nitish Kumar
b85887fc3a
fix: return error when cache is unavailable (#26053)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-02-21 19:09:41 +05:30
Peter Jiang
e1aeb792a4
feat(ui): AppSet Slide Out Summary (#26490)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
Co-authored-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-20 15:15:45 -05:00
Peter Jiang
bdc3447649
fix(appset): update appset resources after creation (#26511)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-02-20 15:14:34 -05:00
dependabot[bot]
7db8ab20cb
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.36.0 to 1.39.0 (#26533)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-20 08:36:06 +01:00
shibatch
b5e09212cf chore: update generated files from codegen
Generated files updated after changing namePrefix/nameSuffix
comments in types.go to reflect override behavior.

Signed-off-by: shibatch <shibatch@pepabo.com>
2026-02-20 05:42:32 +09:00
Codey Jenkins
326831aee4
chore(docs): add 3.4 release approver and checklist (#26528)
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
2026-02-19 19:04:50 +02:00
shibatch
205241f350 docs: fix namePrefix/nameSuffix description to reflect override behavior
The documentation and API comments incorrectly described namePrefix and
nameSuffix as "appended to resources", which could be misleading about
their actual behavior.

In reality, these options use `kustomize edit set nameprefix/namesuffix`
commands (util/kustomize/kustomize.go:166,175), which override any
existing namePrefix/nameSuffix values in the kustomization.yaml file.

Updated both docs/user-guide/kustomize.md and
pkg/apis/application/v1alpha1/types.go to accurately reflect this
override behavior.

Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
Signed-off-by: shibatch <shibatch@pepabo.com>
2026-02-19 18:46:31 +09:00
dependabot[bot]
9851b84f97
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.8 to 1.32.9 (#26514)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 08:01:17 +00:00
dependabot[bot]
f2fdc65386
chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.19.8 to 1.19.9 (#26515)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 08:23:34 +01:00
Peter Jiang
7180deb937
fix: use csapgrade to patch managedFields for client-side apply migration (#26289)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-02-19 09:00:42 +02:00
Drew Bailey
ed6d2c525e
feat(controller): Annotation to pause reconciliation for a specific cluster (#26442)
Signed-off-by: Drew Bailey <drew.bailey@airbnb.com>
Co-authored-by: Drew Bailey <drew.bailey@airbnb.com>
2026-02-18 20:30:39 -05:00
Papapetrou Patroklos
7acd9305df
chore: install git-lfs 3.7.1 version using an install script (#26465)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-02-18 18:58:38 +02:00
dependabot[bot]
6a902023b2
chore(deps): bump library/ubuntu from 4095ef6 to fed6ddb in /test/container (#26494)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 11:08:28 -05:00
Christopher Coco
043544c197
fix: skip namespace check on cluster scoped rbac resources for auth reconcile (#26403)
Signed-off-by: Christopher Coco <ccoco@redhat.com>
2026-02-18 10:55:54 -05:00
Papapetrou Patroklos
650fa6a10e
Merge pull request #26295 from jcjveraa/patch-2
docs: Add database initialization instructions example-header
2026-02-18 15:48:14 +02:00
Jaewoo Choi
03556db586
docs: update MAINTAINERS.md (#26496)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-02-18 12:04:09 +02:00
dependabot[bot]
47eb7ee4d6
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.7 to 1.32.8 (#26492)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-17 23:17:31 -10:00
Rishabh P
b40a443b6a
docs: fix grammar, typos, and improve clarity in documentation (#26498)
Signed-off-by: rishabh <rishank69@gmail.com>
Signed-off-by: Rishabh P <32699563+allexistence@users.noreply.github.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-02-17 23:13:54 -10:00
dependabot[bot]
f4852f70af
chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.19.7 to 1.19.8 (#26495)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 08:35:16 +01:00
dependabot[bot]
adbf9cd237
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.35.0 to 1.36.0 (#26493)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 09:32:22 +02:00
dependabot[bot]
0f069ee767
chore(deps): bump tj-actions/changed-files from 47.0.2 to 47.0.4 (#26491)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 09:20:52 +02:00
Arthur Outhenin-Chalandre
a1d68ca465
fix(engine): correctly set prune confirmation message in setRunningPhase (#25915)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@ledger.fr>
2026-02-17 09:58:49 -05:00
dependabot[bot]
3db8a412e0
chore(deps): bump actions/stale from 10.1.1 to 10.2.0 (#26474)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 22:04:58 -10:00
dependabot[bot]
67c5fe27cd
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.34.0 to 1.35.0 (#26476)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 22:04:16 -10:00
S Kevin Joe Harris
9e19a8f0bc
docs: Add ci prefixes for PR titles (#26471)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-16 15:46:50 -05:00
Nitish Kumar
510af5c4d7
docs: add missing prefixes for PR titles (#26464)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-02-16 02:37:15 -10:00
Jaewoo Choi
ac0c63eb43
chore(refactor): bump notifications-engine to include Teams adaptive card fix (#26449)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-02-16 10:55:24 +02:00
dependabot[bot]
8dfbdec941
chore(deps): bump google.golang.org/grpc from 1.79.0 to 1.79.1 (#26458)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 09:49:14 +01:00
dependabot[bot]
f1ce190671
chore(deps): bump github.com/expr-lang/expr from 1.17.7 to 1.17.8 (#26459)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 10:29:13 +02:00
dependabot[bot]
139ecf610b
chore(deps): bump renovatebot/github-action from 46.1.0 to 46.1.1 (#26460)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 10:28:10 +02:00
dependabot[bot]
dcf0a1586d
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.31.0 to 1.34.0 (#26461)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 10:11:02 +02:00
jaehanbyun
b48ed499c0
chore(cmd): unify CLI names via common constants and simplify main dispatch (#24486)
Signed-off-by: jaehanbyun <awbrg789@naver.com>
2026-02-15 12:03:39 +01:00
S Kevin Joe Harris
b0b9658e04
chore(deps): Bump dex from v2.43.0 to v2.44.0 (#26448)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-15 11:00:45 +02:00
Jaewoo Choi
3eeebd8346
fix(docs): PR title guide from refactor to chore and reformat json (#26450)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-02-15 01:52:28 +01:00
S Kevin Joe Harris
2253481c84
fix(ci): Remove stale label when Issue/PR is updated (#26452)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-14 22:28:14 +01:00
rumstead
fb6a46c8de
ci: upgrade codeql for go 1.26 support and give renovate post upgrade commands (#26446)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
2026-02-13 20:26:45 +00:00
Dhruvang Makadia
86e42fb223
fix: AppProject finalizer should consider apps in all allowed namespaces (#24347) (#26416)
Signed-off-by: Dhruvang Makadia <dhruvang1@users.noreply.github.com>
2026-02-13 14:23:55 -05:00
Kanika Rana
d66ad45500
fix(docs): update other sections of feature maturity to match feature status in overview (#26411)
Signed-off-by: Kanika Rana <krana@redhat.com>
2026-02-13 14:17:53 -05:00
dependabot[bot]
5cfcd0f88f
chore(deps): bump qs from 6.14.1 to 6.14.2 in /ui (#26444)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-13 12:21:49 -05:00
dependabot[bot]
c13ba1ee98
chore(deps): bump docker/build-push-action from 6.19.1 to 6.19.2 (#26433)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-13 10:17:34 -05:00
dependabot[bot]
09b3856177
chore(deps): bump google.golang.org/grpc from 1.78.0 to 1.79.0 (#26432)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-13 10:17:14 -05:00
dependabot[bot]
53a5cd3420
chore(deps): bump renovatebot/github-action from 46.0.2 to 46.1.0 (#26434)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-13 10:13:38 -05:00
dependabot[bot]
8b2ad9ba66
chore(deps): bump library/ubuntu from 25.10 to 26.04 in /test/container (#26431)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-13 10:12:52 -05:00
Papapetrou Patroklos
43ea991a25
fix: register pprof endpoints in repo-server using the params config map (#26237)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-02-12 11:16:17 -05:00
Linghao Su
8e636b78e5
fix(ui): add previous option to download logs functionality (#26427)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-02-12 17:49:58 +02:00
Regina Voloshin
a46baf4863
ci: make Upload code coverage information to codecov.io step always run (#26379)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-12 09:30:13 -05:00
Leonardo Luz Almeida
0cdd44bda7
chore: fix gitops-engine mod name so it can be referenced by external repos (#26407)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2026-02-12 09:29:40 -05:00
Nitish Kumar
18efd0cf1b
fix: trim whitespaces when retrieving source refresh paths (#26400)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-02-12 03:34:34 -10:00
dependabot[bot]
40412aaba3
chore(deps): bump docker/build-push-action from 6.18.0 to 6.19.1 (#26414)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-12 15:08:00 +02:00
dependabot[bot]
a544bc0920
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.30.0 to 1.31.0 (#26413)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-12 12:22:18 +01:00
Papapetrou Patroklos
a2e0b6f902
chore: bumps golang version to 1.26 in all places (#26393)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-02-12 12:15:13 +02:00
Niclas Mietz
a22f33dbe2
fix(health): configconnectorcontext and configconnector (#26308) (#26309)
Signed-off-by: solidnerd <github@mietz.io>
Signed-off-by: solidnerd <niclas@mietz.io>
2026-02-11 21:04:13 +00:00
Peter Jiang
1391e2f95f
feat(ui): add appset tree-view details page (#26262)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
Signed-off-by: Peter Jiang <35584807+pjiang-dev@users.noreply.github.com>
Co-authored-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: Keith Chong <kykchong@redhat.com>
2026-02-11 15:52:32 -05:00
dependabot[bot]
21acbb861d
chore(deps): bump library/redis from 8.2.1 to 8.2.2 in /test/container (#24859)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 11:28:38 -05:00
Regina Voloshin
1418e87420
ci: exclude testdata from sonar.exclusions (#26398)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-11 09:28:54 -05:00
dependabot[bot]
e8539bea12
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.29.0 to 1.30.0 (#26384)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 09:51:06 +02:00
Luis Baronceli
716339c799
fix(ui): prevent log viewer crash on malformed stream packets issue #26023 (#26226)
Signed-off-by: Luis Baronceli <luisbaronceli@gmail.com>
2026-02-11 00:43:52 +01:00
jwinters01
971bf5769a
fix(ui): Parameters tab should correctly show dry source parameters (#26179)
Signed-off-by: Jonathan Winters <wintersjonathan0@gmail.com>
Signed-off-by: jwinters01 <34199886+jwinters01@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-10 16:38:23 -05:00
Linghao Su
a76a8762e4
fix(ui): standard resource icons are not displayed properly (#26216) (#26228)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-02-10 16:18:39 -05:00
S Kevin Joe Harris
fdbe19adaf
ci: label stale issues and PRs without auto-closing (#26318)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-02-10 10:56:11 -05:00
erin
8f9ee6d1da
fix: compressedLayerExtracterStore+isCompressedLayer - allow tar.gzip suffixes (#26355)
Signed-off-by: erin liman <erin.liman@tiktokusds.com>
2026-02-10 10:18:50 -05:00
Regina Voloshin
9cfcd2d261
chore: placate Sonar by ignoring tetsdata files (#26371)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-10 10:00:22 -05:00
Papapetrou Patroklos
262360e0ee
chore: Bump oauth2 0.35.0 (#26347)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
Signed-off-by: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 16:45:46 +02:00
dudinea
6c043d3acb
fix: Fix excessive ls-remote requests on monorepos with Auto Sync enabled apps (26277) (#26278)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
Co-authored-by: Dan Garfield <dan.garfield@octopus.com>
2026-02-10 16:09:01 +02:00
Mike Cutsail
2793097480
feat: add OTEL instrumentation for authentication and handlers (#25296)
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-10 13:31:55 +00:00
Matthieu MOREL
2c5f7317a5
fix: enable and fix modernize linter (#26352)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-10 08:02:55 -05:00
Regina Voloshin
66835b6ec7
chore(deps): Upgrade Kustomize to 5.8.1 (#26367)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-10 01:24:06 -10:00
Matt Warren
d655bf6453
docs: rewrite [here] links (#26282)
Signed-off-by: Matt Warren <matt@tramat.com>
Co-authored-by: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com>
2026-02-10 16:23:55 +05:30
Matthieu MOREL
5345a2aa22
chore: update golangci-lint to v2.8.0 (#26354)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-10 16:11:02 +05:30
dependabot[bot]
89fe752eb4
chore(deps): bump golang.org/x/net from 0.49.0 to 0.50.0 (#26361)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 05:13:47 +00:00
dependabot[bot]
6be8ac10e6
chore(deps): bump golang.org/x/crypto from 0.47.0 to 0.48.0 (#26362)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 04:35:42 +00:00
dependabot[bot]
b337855e22
chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.89 to 0.9.91 (#26360)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 04:01:04 +00:00
dependabot[bot]
ad186cfe54
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.28.1 to 1.29.0 (#26358)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 03:58:34 +00:00
dependabot[bot]
235bf2aace
chore(deps): bump golang.org/x/term from 0.39.0 to 0.40.0 (#26357)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 03:57:50 +00:00
dependabot[bot]
49d0b48984
chore(deps): bump tj-actions/changed-files from 47.0.1 to 47.0.2 (#26359)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 03:57:21 +00:00
Michael Crenshaw
8515358413
chore: improve app install ID error (#26178)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-02-09 17:04:59 -05:00
dependabot[bot]
2615be441d
chore(deps): bump axios from 1.12.2 to 1.13.5 in /ui-test (#26353)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 14:11:51 -05:00
Regina Voloshin
b0488f5a9e
ci: Revive CodeCov steps (#26350)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-02-09 18:05:24 +00:00
Matthieu MOREL
1b4398b5ba
chore(util): Fix modernize linter (#26342)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 10:59:51 -05:00
Matthieu MOREL
847b8b203c
chore(util): Fix modernize linter (#26344)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 10:59:32 -05:00
Matthieu MOREL
a108a84f62
chore(server): Fix modernize linter (#26328)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 14:37:34 +02:00
Matthieu MOREL
27433929c0
chore(applicationset): Fix modernize linter (#26326)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 14:27:21 +02:00
Matthieu MOREL
1a62c87d29
chore(util): Fix modernize linter (#26316)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-09 00:48:56 -10:00
Matthieu MOREL
34ccf865f6
chore(applicationset): Fix modernize linter (#26320)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 00:48:06 -10:00
Matthieu MOREL
0cff632502
chore(server): Fix modernize linter (#26324)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 00:47:03 -10:00
Matthieu MOREL
ac83f1d8da
chore(commitserver): Fix modernize linter (#26327)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 00:45:44 -10:00
Matthieu MOREL
34eeede822
chore(util): Fix modernize linter (#26329)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 00:44:05 -10:00
github-actions[bot]
f2c69c1628
[Bot] docs: Update Snyk report (#26319)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-02-09 11:55:42 +02:00
dependabot[bot]
39fcff7bad
chore(deps): bump renovatebot/github-action from 46.0.1 to 46.0.2 (#26336)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 10:20:56 +02:00
dependabot[bot]
7ccc6f94c7
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.28.0 to 1.28.1 (#26334)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 10:14:07 +02:00
dependabot[bot]
9b10fe9774
chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.88 to 0.9.89 (#26333)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 10:13:30 +02:00
Matthieu MOREL
76162a9310
chore(cmd): Fix modernize linter (#26321)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-08 17:51:03 +02:00
Matthieu MOREL
1d65d8be6c
chore(util): Fix modernize linter (#26323)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-08 17:48:27 +02:00
Papapetrou Patroklos
2b3eae62c4
fix: fixes output of argocd proj windows list PROJ - USEANDOPERATOR was missing (#26273)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-02-07 18:37:31 +01:00
Matthieu MOREL
88223b09e4
chore(common): Fix modernize linter (#26312)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-07 18:36:02 +01:00
Matthieu MOREL
0c9039ecd9
chore(controller): Fix modernize linter (#26313)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-07 18:35:48 +01:00
Matthieu MOREL
2bea8c0deb
chore(pkg): Fix modernize linter (#26314)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-07 18:35:29 +01:00
Matthieu MOREL
342aea457f
chore(reposerver): Fix modernize linter (#26315)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-07 18:34:35 +01:00
Matthieu MOREL
6b2b0668be
chore(cmpserver): Fix modernize linter (#26317)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-02-07 18:31:26 +01:00
Jaewoo Choi
be08693409
fix: remove stale reposFilter references (#26310)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-02-07 13:19:00 +02:00
Linghao Su
24615c8ce8
fix(state): fix(controller): display correct SyncWave for hook resources #26208 (#26240)
Signed-off-by: linghaoSu <linghao.su@daocloud.io>
2026-02-07 00:28:18 +01:00
dependabot[bot]
257ebc5f3e
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.27.0 to 1.28.0 (#26292)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-06 17:18:56 -05:00
Matthieu MOREL
286c6b8725
chore(cmd): Fix modernize linter (#26298)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 17:18:32 -05:00
Matthieu MOREL
a369ae2cf6
chore(util): Fix modernize linter (#26300)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 17:17:17 -05:00
Matthieu MOREL
e2f7e7d27f
chore(controller): Fix modernize linter (#26303)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 17:16:37 -05:00
Matthieu MOREL
6e0c949dd2
chore(hack): Fix modernize linter (#26304)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 17:15:45 -05:00
Jaewoo Choi
f85ad11b2a
feat: remove unused reposFilter from Applications list (#24667)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-02-06 15:20:50 -05:00
Matthieu MOREL
2e1d81d62c
chore(test): Fix modernize linter (#26301)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 13:56:18 -05:00
Matthieu MOREL
849815ee1a
chore(applicationset): Fix modernize linter (#26299)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 10:16:31 -05:00
Gaston Festari
bea1139e96
docs: Typo synching -> syncing (#26275)
Signed-off-by: Gaston Festari <cilindrox@gmail.com>
2026-02-06 00:01:08 -10:00
jcjveraa
e4a97bde49
Clarify database initialization/migration section
Updated the section title and clarified the description for database initialization or migration.

Signed-off-by: jcjveraa <3942301+jcjveraa@users.noreply.github.com>
2026-02-06 09:43:55 +01:00
jcjveraa
bd284b1d29
[docs] Add database initialization instructions example-header
Add missing level 3 heade for DB example

Signed-off-by: jcjveraa <3942301+jcjveraa@users.noreply.github.com>
2026-02-06 09:22:51 +01:00
gami
b4421672f6
feat: Document and expose K8S API client environment variables(#8527) (#25145)
Signed-off-by: gami <20226196+gosarami@users.noreply.github.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-05 15:17:26 +00:00
Mike
96bfc1e20b
fix(ui): convert yaml-editor to functional component (#24921)
Signed-off-by: Mike <mike.kangaroo.world@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-05 14:45:06 +00:00
Alex Recuenco
feab8bde77
docs: Set installation to match the quick-start guide in the installation section (#26259)
Signed-off-by: Alex Recuenco <26118630+alexrecuenco@users.noreply.github.com>
2026-02-05 09:42:09 -05:00
dependabot[bot]
9cc0c77eb5
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.26.0 to 1.27.0 (#26267)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-05 08:37:08 +02:00
Peter Jiang
f45ee221e5
fix(appset): change appset resource status count to 5000 by default (#26249)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-02-04 21:39:01 +00:00
jwinters01
12149466c8
feat(ui): support hydrator properties in summary tab (#26152)
Signed-off-by: Jonathan Winters <wintersjonathan0@gmail.com>
Signed-off-by: jwinters01 <34199886+jwinters01@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-02-04 13:35:57 -05:00
Peter Jiang
84f9446d3a
fix(ui): prevent crash when navigating between Applications and Appli… (#26245)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-02-04 13:21:31 -05:00
argoproj-renovate[bot]
f8cab49a07
chore(deps): update docker.io/library/golang:1.25.6 docker digest to 06d1251 (#26256)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-02-04 11:07:24 -05:00
argoproj-renovate[bot]
46e9022ab8
chore(deps): update docker.io/library/golang:1.25.6 docker digest to 0c87ea6 (#26235)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-02-04 11:05:40 +02:00
dependabot[bot]
05620cea27
chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.29.9 to 1.32.7 (#26254)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 08:49:03 +00:00
dependabot[bot]
cd65bc0585
chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.62 to 1.19.7 (#26251)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 10:10:35 +02:00
dependabot[bot]
f255cef326
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.25.0 to 1.26.0 (#26250)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 09:43:59 +02:00
Kanika Rana
e168d8a9fd
fix: Revert "fix(ci): ensure cherry-pick commits include DCO sign-off" (#26124) (#26243) 2026-02-03 22:36:19 +00:00
Valéry Fouques
28b90a75ba
fix(server): OIDC config via secrets fails (#18269) (#26214)
Signed-off-by: Valéry Fouques <48053275+BZValoche@users.noreply.github.com>
2026-02-03 16:02:25 -05:00
Regina Voloshin
7925bf7916
chore(deps): migrated aws sdk v1 to v2 for EKS with argocd-k8s-auth (#26200)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Signed-off-by: Regina Voloshin <regina.voloshin@codefresh.io>
Co-authored-by: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com>
2026-02-03 15:56:07 -05:00
Papapetrou Patroklos
bf1f836ece
fix: get app resources tree view (#26166)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-02-03 15:54:10 -05:00
Rohan K
ae34305d18
fix(ui): improve filter autocomplete performance for large app counts (#15087) (#26082)
Signed-off-by: Rohan K <rohankmr414@gmail.com>
2026-02-03 15:50:00 -05:00
Jaewoo Choi
d8635ca27b
feat: add clear-all button to applications list filters (#26007)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-02-03 15:48:22 -05:00
Artem Vdovin
57e9e5e201
fix: manifest-generate-paths for multisource git+helm (#25531)
Signed-off-by: Artem Vdovin <arte.vdovin@gmail.com>
Signed-off-by: Artem Vdovin <34456690+fm1ck3y@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-02-03 14:57:48 +00:00
argoproj-renovate[bot]
1d66593195
chore(deps): update docker.io/library/golang:1.25.6 docker digest to 4c973c7 (#26232)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-02-03 10:36:40 +02:00
dependabot[bot]
01629ccd7c
chore(deps): bump code.gitea.io/sdk/gitea from 0.22.1 to 0.23.2 (#26231)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 10:36:02 +02:00
dependabot[bot]
8ef0fd7068
chore(deps): bump library/busybox from e226d63 to b3255e7 in /test/e2e/multiarch-container (#26229)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 09:36:09 +02:00
Moulick Aggarwal
d883412df8
docs: Fix some admonitions in docs (#26213)
Signed-off-by: Moulick Aggarwal <Moulick@users.noreply.github.com>
Co-authored-by: Moulick Aggarwal <Moulick@users.noreply.github.com>
2026-02-02 13:58:28 -05:00
renovate[bot]
d35a2518e6
chore(deps): update docker.io/library/registry:3.0 docker digest to 6c5666b (#26217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-02 12:37:31 -05:00
renovate[bot]
807ff53fd5
chore(deps): update dependency @types/prop-types to v15.7.15 (#26140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-02 11:18:53 -05:00
renovate[bot]
7f34ee84fd
chore(deps): update dependency @types/minimatch to v3.0.5 (#26139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-02 11:18:30 -05:00
dependabot[bot]
a7c771fbdd
chore(deps): bump renovatebot/github-action from 44.2.6 to 46.0.1 (#26203)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 11:37:30 +02:00
dependabot[bot]
0a70881921
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.23.0 to 1.25.0 (#26202)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 09:29:39 +02:00
github-actions[bot]
e20affd6f0
[Bot] docs: Update Snyk report (#26195)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-02-01 14:43:32 +02:00
Peter Jiang
72085781dc
feat(ui): appset list page and filters (#25837)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-01-30 13:40:38 -05:00
Jaewoo Choi
b912405c16
chore(ui): add qeId to paginate dropdown menus (#25929)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-01-30 13:36:33 -05:00
Jaewoo Choi
f5de841d97
fix(ui): relayout Monaco editor on window resize (#25784)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-01-30 13:35:58 -05:00
Jaewoo Choi
c9a5a7e62c
fix(ui): make yaml editor outline button opaque (#25748)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-01-30 13:30:29 -05:00
Kanika Rana
989fa6fecd
chore(appset): basic progressive sync e2e tests (#26092)
Signed-off-by: krana limaDocker <krana-lima-argo@example.com>
Signed-off-by: Kanika Rana <krana@redhat.com>
Co-authored-by: krana limaDocker <krana-lima-argo@example.com>
2026-01-30 16:26:57 +00:00
Codey Jenkins
28ca821978
chore(tilt): use manifest image name instead of kustomize override (#26190)
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
2026-01-30 11:01:46 -05:00
dependabot[bot]
8c30738f6f
chore(deps): bump actions/cache from 5.0.2 to 5.0.3 (#26183)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-30 09:25:01 -05:00
dependabot[bot]
fe93731777
chore(deps): bump github.com/golang-jwt/jwt/v5 from 5.3.0 to 5.3.1 (#26171)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 10:03:41 +02:00
dependabot[bot]
d064cec17a
chore(deps): bump docker/login-action from 3.6.0 to 3.7.0 (#26172)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 10:02:20 +02:00
dependabot[bot]
e548ec76c7
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.21.0 to 1.23.0 (#26170)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 10:01:14 +02:00
Aidan O'Gorman
69c2620aef
docs: fixing typo in Config Management Plugins docs (#26150)
Signed-off-by: Aidan O'Gorman <aidan.ogorman@outlook.com>
2026-01-29 11:34:43 +09:00
Jaewoo Choi
2f4c5bb972
fix(ui): show filter-empty state on repos list (#26160)
Signed-off-by: choejwoo <jaewoo45@gmail.com>
2026-01-28 14:13:44 +02:00
Fan Zhang
e3f616d6dc
docs: Fix wrong default value for applicationsetcontroller.enable.scm.providers (#26162)
Signed-off-by: Fan Zhang <m42zhang@uwaterloo.ca>
2026-01-28 08:49:11 +02:00
dependabot[bot]
9d459c8afe
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.19.0 to 1.21.0 (#26165)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-28 08:44:48 +02:00
Mo Sahihi Benis
7879dc0f6e
docs: add SAP Signavio to USERS.md (#26164)
Signed-off-by: Mohammad Sahihi Benis <mohammad.sahihi@gmail.com>
2026-01-27 20:53:57 -05:00
Oliver Gondža
afdf99f33a
fix(helm): Improve error message when helm cmd fails (#26159)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-01-27 22:58:03 +02:00
Valentin Stoican
c2e594c5f5
feat: disable gRPC service config DNS TXT lookups by default (#26077)
Signed-off-by: Valentin Stoican <vstoican@ripe.net>
Co-authored-by: Valentin Stoican <vstoican@ripe.net>
2026-01-27 11:29:38 +02:00
dependabot[bot]
9c108cbaa0
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.18.0 to 1.19.0 (#26155)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 11:02:27 +02:00
dependabot[bot]
e42727bcaf
chore(deps): bump renovatebot/github-action from 44.2.5 to 44.2.6 (#26156)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 11:01:31 +02:00
Ji Kwan
5ab598e0fd
feat(ui): add annotation filtering support to applications list (#25590)
Signed-off-by: Kim Jikwan <zc149@naver.com>
2026-01-27 10:59:29 +02:00
Papapetrou Patroklos
19a74df8dc
fix: return missing information in cluster get API (#25566)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-01-26 13:37:50 -05:00
dependabot[bot]
3811a30949
chore(deps): bump github.com/bmatcuk/doublestar/v4 from 4.9.2 to 4.10.0 (#26144)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 08:05:12 +02:00
dependabot[bot]
928543527d
chore(deps): bump github.com/redis/go-redis/v9 from 9.17.2 to 9.17.3 (#26145)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 08:04:44 +02:00
dependabot[bot]
e10a395f34
chore(deps): bump github.com/alicebob/miniredis/v2 from 2.36.0 to 2.36.1 (#26146)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 08:03:59 +02:00
dependabot[bot]
c7574970d0
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.16.0 to 1.18.0 (#26143)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 08:03:29 +02:00
github-actions[bot]
24434907af
[Bot] docs: Update Snyk report (#26138)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-01-25 12:06:36 +02:00
renovate[bot]
988e4f48cf
chore(deps): update docker.io/library/ubuntu:25.10 docker digest to 4a9232c (#26131)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-25 08:25:11 +02:00
renovate[bot]
82be819e9a
chore(deps): update docker.io/library/redis:8.2.3 docker digest to c4316c4 (#26130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-25 08:24:27 +02:00
dudinea
aadf2af7e1
fix(ci): fix deleting files on linux in make build-ui (#26134) (#26135)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-01-25 08:23:42 +02:00
Anagha S Devan
92c5389388
fix(ci): ensure cherry-pick commits include DCO sign-off (#26124)
Signed-off-by: Anagha S Devan <anaghaavi176@gmail.com>
2026-01-25 08:23:06 +02:00
Kevin Joe Harris
d60b41da5e Fixed broken links in USERS.md
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
2026-01-24 22:07:04 +05:30
renovate[bot]
81d109fb7a
chore(deps): update dependency @types/deepmerge to v2.2.3 (#25609)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-23 16:07:46 -05:00
renovate[bot]
3ddf722517
chore(deps): update dependency @codecov/webpack-plugin to v0.0.1-beta.12 (#25385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-23 16:07:09 -05:00
Michael Crenshaw
65350789e8
docs: small fixes for mkdocs warnings (#26112)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-01-23 13:00:47 +00:00
dependabot[bot]
82ee09a930
chore(deps): bump library/busybox from b86c79d to e226d63 in /test/e2e/multiarch-container (#26122)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-23 07:34:09 -05:00
dependabot[bot]
4e827c80cf
chore(deps): bump actions/checkout from 6.0.1 to 6.0.2 (#26123)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-23 01:34:11 -10:00
Alexandre Gaudreault
4d66a209d3
fix: consider Replace/Force sync option on live resource annotations (#26110)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-22 17:19:45 -05:00
Michael Crenshaw
3e26594009
docs: cherry-pick process (#26109)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-01-22 12:28:52 -05:00
Christian Oleson
90ce1782ec
docs: Add Imagine Learning to USERS.md (#26111)
Signed-off-by: Christian Oleson <Christian.Oleson@ImagineLearning.com>
2026-01-22 11:14:26 -05:00
Codey Jenkins
e5e00d3f6f
fix(hydrator): use refresh paths from drySource when source hydration is enabled (#25516)
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
Signed-off-by: pbhatnagar-oss <pbhatifiwork@gmail.com>
Co-authored-by: pbhatnagar-oss <pbhatifiwork@gmail.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-22 15:08:58 +00:00
dependabot[bot]
559dc16e72
chore(deps): bump lodash from 4.17.21 to 4.17.23 in /ui (#26100)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 10:44:12 +02:00
renovate[bot]
1b85a688ac
chore(deps): update dependency lodash-es to v4.17.23 [security] (#26099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-22 10:43:07 +02:00
dependabot[bot]
9182e6696f
chore(deps): bump github.com/alicebob/miniredis/v2 from 2.35.0 to 2.36.0 (#26103)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 10:36:52 +02:00
dependabot[bot]
1a1b142cea
chore(deps): bump library/busybox from 2383baa to b86c79d in /test/e2e/multiarch-container (#26101)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 08:40:37 +02:00
dependabot[bot]
5c2a417257
chore(deps): bump peter-evans/create-pull-request from 8.0.0 to 8.1.0 (#26102)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 08:39:51 +02:00
dudinea
6a597c9e62
chore: fix make test running all the gitops-engine tests when requested to test specific ArgoCD module (#26089) (#26090)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-01-21 18:08:41 +02:00
Regina Voloshin
e8895b8d68
ci: test against k8s 1.35.0 (#26062)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-01-21 10:47:55 -05:00
S Kevin Joe Harris
b8d4216438
docs: Fixed broken links (#26083)
Signed-off-by: Kevin Joe Harris <kevinjoeharris1@gmail.com>
Signed-off-by: S Kevin Joe Harris <59595928+Kevinjoeharris@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-01-21 16:49:35 +02:00
Aditya Raj
507289925b
feat(hydrator): making configurable authorName/Email used for hydration commit (#22847) (#25746)
Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
2026-01-21 08:44:32 -05:00
Kostis (Octopus Deploy)
fc6379b90e
docs: recommend cluster generator in cluster boostrapping page (#26084)
Signed-off-by: Kostis Kapelonis <kostis.kapelonis@octopus.com>
2026-01-21 14:16:27 +02:00
dependabot[bot]
c626b202b7
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.14.0 to 1.16.0 (#26081)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 07:26:27 +00:00
Aditya Raj
2f7d36bc38
fix: resolve flaky TestSync_SyncWaveHookError test (#26080)
Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
2026-01-21 09:19:39 +02:00
John Soutar
c879b6da2f
chore(deps): update notifications-engine to fix GitHub PR comments nil panic (#26065)
Signed-off-by: John Soutar <john@tella.com>
2026-01-20 15:45:32 +02:00
dudinea
4e997f0d5e
fix: invalid error message on health check failure (#26040) (#26039)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-01-20 11:24:47 +02:00
dependabot[bot]
8b1415a6b7
chore(deps): bump renovatebot/github-action from 44.2.4 to 44.2.5 (#26059)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-20 10:41:03 +02:00
argoproj-renovate[bot]
acb30b4e06
chore(deps): update docker.io/library/golang:1.25.6 docker digest to ce63a16 (#26056)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-20 08:11:08 +02:00
Yugan
408e99e9e9
feat: Allow custom User-Agent headers for Helm repository requests (#25473)
Signed-off-by: Yugan <yugannkt@gmail.com>
2026-01-19 12:06:09 -05:00
Alexandre Gaudreault
228378474a
fix(hooks): always remove finalizers (#23226) (#25916)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2026-01-19 16:42:03 +00:00
Nitish Kumar
a66fe2af24
docs: add information on handling ambiguous revisions (#26052)
Signed-off-by: nitishfy <justnitish06@gmail.com>
Signed-off-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: Afzal Ansari <afzal442@gmail.com>
2026-01-19 13:46:43 +00:00
Regina Voloshin
088ef94d78
docs: change manifests master reference to stable reference (#26035)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-19 17:04:25 +05:30
José Maia
b911650616
docs: Fix typo in Plugin generator description (#26051)
Signed-off-by: José Maia <josecbmaia@hotmail.com>
2026-01-19 16:57:42 +05:30
dependabot[bot]
a9da448046
chore(deps): bump github.com/olekukonko/tablewriter from 1.1.2 to 1.1.3 (#26043)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-19 09:00:22 +02:00
dependabot[bot]
91475509e1
chore(deps): bump actions/cache from 5.0.1 to 5.0.2 (#26042)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-19 08:59:32 +02:00
Papapetrou Patroklos
6cd65b4622
fix: error sending generate manifest metadata cmp server (#25891)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-01-19 08:47:01 +02:00
argoproj-renovate[bot]
23c021f53d
chore(deps): update group golang to v1.25.6 (#26034)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-18 07:00:56 -05:00
dependabot[bot]
b18d576fe2
chore(deps): bump github.com/sirupsen/logrus from 1.9.3 to 1.9.4 (#26021)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-18 09:31:46 +00:00
argoproj-renovate[bot]
42f09f7529
chore(deps): update module github.com/vektra/mockery/v3 to v3.6.3 (#26029)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-18 11:00:29 +02:00
argoproj-renovate[bot]
ef21768b92
chore(deps): update docker.io/library/golang:1.25.5 docker digest to 581c059 (#25966)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-18 08:44:31 +02:00
Oliver Gondža
fee6962f68
fix(makefile): Improve performance of make lint-local and dependent goals (#26025)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-01-18 08:36:03 +02:00
github-actions[bot]
bfbb88e5fe
[Bot] docs: Update Snyk report (#26033)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-01-18 06:31:36 +00:00
Alexandre Gaudreault
82597111a1
fix(health): app missing health only when all resources are missing (#23995) (#25962)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Peter Jiang <35584807+pjiang-dev@users.noreply.github.com>
2026-01-16 17:21:39 +00:00
Nitish Kumar
fded82ad57
test: add tests for glob match (#26027)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-01-16 16:00:30 +00:00
Oliver Gondža
3453367509
fix(hydrator): Fix compilation error (#26024)
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
2026-01-16 01:56:05 -10:00
Michael Crenshaw
2e638831a6
chore(hydrator): improve error message (#25737)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-01-15 22:00:11 +00:00
pedro-cs-ribeiro
1049d40b7d
chore: add tests to validate ConfigMap/Secret key removal in server-side diff (#25216)
Signed-off-by: Pedro Ribeiro <pedro.ribeiro@cross-join.com>
Co-authored-by: Pedro Ribeiro <pedro.ribeiro@cross-join.com>
Co-authored-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2026-01-15 16:53:13 -05:00
Sean Liao
6994a42fa9
fix(hydrator): pass destination.namespace to manifest rendering (#25478) (#25699)
Signed-off-by: Sean Liao <sean@liao.dev>
2026-01-15 16:39:10 -05:00
Michael Crenshaw
ef40ba8805
fix(hydrator): empty links for failed operation (#25025) (#26014)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-01-15 16:25:12 -05:00
Michael Crenshaw
67712c19d8
fix(hydrator): .gitattributes include deeply nested files (#25870) (#26011)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2026-01-15 15:38:10 -05:00
jwinters01
c4f3bb8be4
fix: integrate split button (#25993) (#25994)
Signed-off-by: Jonathan Winters <wintersjonathan0@gmail.com>
2026-01-15 14:28:08 -05:00
afarbos
2d762e4a2b
fix: optimize cli server-side diff with parallel dynamic batching (#25550)
Signed-off-by: Arnaud Farbos <afarbos@nvidia.com>
2026-01-15 14:20:55 -05:00
Dan Garfield
a6cc7ad9a6
docs: Revise web terminal setup instructions for Argo CD (#25992)
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>
Signed-off-by: Dan Garfield <dan@codefresh.io>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-01-15 10:42:04 -05:00
Ekene Chris
d2cb56d7c7
fix: modernize slice initialization syntax in util/argo/argo.go (#26001)
Signed-off-by: Ekene Chris <ekenechris53@gmail.com>
2026-01-15 09:30:36 -05:00
QingHe
c32286a9a4
fix: close response body on error paths to prevent connection leak (#25824)
Signed-off-by: chentiewen <tiewen.chen@aminer.cn>
Co-authored-by: chentiewen <tiewen.chen@aminer.cn>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15 12:58:04 +00:00
Blake Pettersson
429fc1f2d9
fix: nil and empty ignoredifferences (#25980)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-01-15 10:48:42 +01:00
Papapetrou Patroklos
275c5de627
fix: improves the Rabbit MQ resouce customization to better handle unknown conditions (#25941)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-01-15 11:15:55 +02:00
dudinea
b320854f04
fix: fix image functionality breakage caused by --no-install-updates option in Dockerfiles (#25972) (#25999)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-01-15 07:38:33 +00:00
argoproj-renovate[bot]
38363f3388
chore(deps): update module github.com/vektra/mockery/v3 to v3.6.2 (#25995)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-01-15 09:34:56 +02:00
Josh Soref
912e216be3
docs: clarify the parent for syncOptions (#25989)
Signed-off-by: Josh Soref <jsoref@gmail.com>
2026-01-15 09:24:34 +02:00
dependabot[bot]
f76046fc7e
chore(deps): bump actions/setup-node from 6.1.0 to 6.2.0 (#25997)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-15 08:26:09 +02:00
Jesse Hitch
61c8ce2fc9
fix: #25313 remove --client from helm version command (#25740)
Signed-off-by: Jesse Hitch <jessebot@linux.com>
2026-01-14 15:36:48 +01:00
dependabot[bot]
8866fcf207
chore(deps): bump library/golang from 6cc2338 to 8bbd140 in /test/remote (#25974)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 09:23:37 -05:00
Ekene Chris
bde6f667e1
fix: correct typos across codebase (#25959)
Signed-off-by: Ekene Chris <ekenechris53@gmail.com>
2026-01-14 14:54:34 +01:00
dependabot[bot]
c212bb77bd
chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.20.0 to 1.21.0 (#25975)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 14:53:39 +01:00
dependabot[bot]
0da603db11
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.13.0 to 1.14.0 (#25973)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 14:53:06 +01:00
Blake Pettersson
1488a13b89
fix: allow docker dhi helm charts to be used (#25835)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2026-01-13 10:07:30 -08:00
Alex Recuenco
6a3a540c9a
docs: vscode settings recommendation is outdated (#25925)
Signed-off-by: alexrecuenco <26118630+alexrecuenco@users.noreply.github.com>
2026-01-13 10:39:00 -05:00
Revital Barletz
fb56875397
docs: Add release checklist step to reference the release-specific instructions file (#25854)
Signed-off-by: Revital Barletz <Revital.barletz@octopus.com>
Co-authored-by: Peter Jiang <35584807+pjiang-dev@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
2026-01-13 16:08:40 +02:00
Afzal Ansari
b137439c07
docs: Add GitLab CI integration documentation with Dex configuration (#25413)
Signed-off-by: Afzal Ansari <afzal442@gmail.com>
2026-01-13 11:24:31 +01:00
Alexander
43dd717183
docs: fix garbled text in cluster bootstrapping helm example (#25940)
Signed-off-by: AlexO <30403857+AlexOQ@users.noreply.github.com>
2026-01-13 10:04:12 +01:00
argoproj-renovate[bot]
c19d0461ff
chore(deps): update docker.io/library/golang:1.25.5 docker digest to 0f406d3 (#25951)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-13 10:20:18 +02:00
dependabot[bot]
667b7d658c
chore(deps): bump actions/setup-go from 6.1.0 to 6.2.0 (#25950)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-13 10:19:37 +02:00
dependabot[bot]
d08a87931e
chore(deps): bump renovatebot/github-action from 44.2.3 to 44.2.4 (#25949)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-13 10:18:36 +02:00
dependabot[bot]
a1955019f8
chore(deps): bump golang.org/x/net from 0.48.0 to 0.49.0 (#25947)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-13 10:16:21 +02:00
dependabot[bot]
2322cdca32
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.12.0 to 1.13.0 (#25946)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-13 10:15:43 +02:00
rumstead
f83906d877
feat(appset): optimize appset controller performance when grabbing cluster secrets (#25624) (#25577)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
2026-01-12 18:37:48 -05:00
Alexandre Gaudreault
e988c55a11
test(e2e): fix invalid AppSet test on master (#25939)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-12 13:51:27 -05:00
Peter Jiang
05504d623c
feat(appset): add Health field to ApplicationSet status (#25753)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-01-12 16:35:49 +02:00
dudinea
3c01ab15ee
fix: missing gpg-agent in argocd image (#25935) (#25937)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-01-12 09:36:55 +02:00
dependabot[bot]
3ac7a0b69a
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.11.0 to 1.12.0 (#25934)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 08:52:05 +02:00
dependabot[bot]
93a7717c71
chore(deps): bump golang.org/x/term from 0.38.0 to 0.39.0 (#25933)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 08:51:05 +02:00
dependabot[bot]
b4a52fc5c8
chore(deps): bump github.com/bmatcuk/doublestar/v4 from 4.9.1 to 4.9.2 (#25932)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 08:48:17 +02:00
Ryan Wu
af64957452
docs: Add 'Netease Cloud Music' to USERS.md (#25922)
Signed-off-by: Ryan Wu <rongjun0821@gmail.com>
2026-01-11 20:38:47 -05:00
dudinea
cbc7ecdb85
fix(ci): Inconsistent use of IMAGE_REGISTRY and IMAGE_NAMESPACE Makefile variables (#25846) (#25860)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
2026-01-11 16:15:16 +02:00
Piyush Khobragade
5d790e5c94
docs: fix description of argocd_oci_request_duration_seconds metric (#25918)
Signed-off-by: piyushkhobragade <piyushkhobragade2005@gmail.com>
2026-01-11 14:04:21 +01:00
github-actions[bot]
7317cde9e7
[Bot] docs: Update Snyk report (#25926)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-01-11 10:04:59 +02:00
dudinea
946a3ab44b
fix(ci): fix make image DEV_IMAGE=true on non-amd64 architecture (#25897) (#25898)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com>
Signed-off-by: dudinea <eugene.doudine@octopus.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-01-11 09:47:03 +02:00
Quentin Ågren
e6825529ab
docs: Complements to the Gateway API ingress guide #25734 (#25739)
Signed-off-by: Quentin Ågren <quentin.agren@gmail.com>
2026-01-10 17:03:44 +01:00
Alexandre Gaudreault
dab6f3bfae
test(e2e): add isolation by ensuring unique name (#25724)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-09 12:15:08 -05:00
Arthur Outhenin-Chalandre
79b0981b05
fix: show pruning button when only Prune=confirm is present (#23326)
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@ledger.fr>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-09 10:40:52 -05:00
OpenGuidou
bb894e8c16
fix(appset): do not trigger reconciliation on appsets not part of allowed namespaces when updating a cluster secret (#25622)
Signed-off-by: OpenGuidou <guillaume.doussin@gmail.com>
2026-01-08 13:21:04 -05:00
Josh Soref
312a841f8c
docs: Use udp to find preferred outbound ip address (#25812)
Signed-off-by: Josh Soref <jsoref@gmail.com>
2026-01-08 09:11:52 -07:00
Barisa Obradovic
abde22229a
docs: Change heading for the complete example for argocd progressive rollout (#25878)
Signed-off-by: Barisa Obradovic  <bbaja42@gmail.com>
Signed-off-by: Barisa Obradovic <barisa.obradovic@autodesk.com>
Signed-off-by: Alex Recuenco <26118630+alexrecuenco@users.noreply.github.com>
Co-authored-by: Alex Recuenco <26118630+alexrecuenco@users.noreply.github.com>
Co-authored-by: Dan Garfield <dan.garfield@octopus.com>
2026-01-08 15:52:11 +00:00
Alexandre Gaudreault
2d19fa0781
test(e2e): CMP test fails locally on Mac (#25901)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-07 21:41:58 -05:00
Alexandre Gaudreault
ee1bf89bf8
test(e2e): fix TestDeletionConfirmation flakiness (#25902)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-07 21:41:21 -05:00
Josh Soref
f6d00b7733
fix: Only show please update resource specification message when spec… (#25066)
Signed-off-by: Josh Soref <jsoref@gmail.com>
2026-01-07 09:38:13 -05:00
Papapetrou Patroklos
08390e21cb
chore: bumps notification engine to the latest (#25887)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-01-07 10:24:03 +02:00
dependabot[bot]
b357063c02
chore(deps): bump library/busybox from d80cd69 to 2383baa in /test/e2e/multiarch-container (#25884)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-07 09:05:37 +02:00
dependabot[bot]
040cc37ad3
chore(deps): bump github.com/Azure/kubelogin from 0.2.13 to 0.2.14 (#25883)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-07 09:05:03 +02:00
Jakub Rudnik
73b4d9884f
feat: add --no-install-recommends in argocd-base #25841 (#25852)
Signed-off-by: Jakub Rudnik <jakub@rudnik.io>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-01-06 16:18:33 -05:00
Alexandre Gaudreault
b0e4e84f23
test(e2e): configurable tmp dir locally (#25780)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Signed-off-by: shubham singh mahar <shubhammahar1306@gmail.com>
Signed-off-by: CI <ci@argoproj.com>
Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: Jakub Rudnik <jakub@rudnik.io>
Signed-off-by: ioleksiuk <ioleksiuk@users.noreply.github.com>
Signed-off-by: Illia Oleksiuk <ilya.oleksiuk@gmail.com>
Signed-off-by: Aya <ayia.hosni@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pasha Kostohrys <pasha.kostohrys@gmail.com>
Co-authored-by: pasha <pasha.k@fyxt.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
Co-authored-by: Shubham Singh <shubhammahar1306@gmail.com>
Co-authored-by: shubham singh mahar <smahar@obmondo.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: Jakub Rudnik <jakub@rudnik.io>
Co-authored-by: Illia Oleksiuk <42911468+ioleksiuk@users.noreply.github.com>
Co-authored-by: Aya Hosni <ayia.hosni@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-01-06 16:15:46 -05:00
Codey Jenkins
e7aa9b099a
docs: Volunteer @FourFifthsCode for v3.4 release champion (#25881)
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
2026-01-06 21:14:46 +00:00
Nitish Kumar
d9b38a8e0e
docs: add faq entry for marshaling error (#25851)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2026-01-06 16:00:30 -05:00
Yuan Tang
726b764f1e
docs: Add Bluesky badge to README (#25880)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2026-01-06 15:59:24 -05:00
Alex Recuenco
4edc1a96d3
docs: Revise TLS settings to include argocd-applicationset-controller and argocd-notifications-controller (#25872)
Signed-off-by: Alex Recuenco <26118630+alexrecuenco@users.noreply.github.com>
2026-01-06 18:47:25 +02:00
Papapetrou Patroklos
5959693845
chore: stop using the deprecated fields of the cluster structure (#25745)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-01-06 18:15:52 +02:00
Alexandre Gaudreault
4aa2ba4715
test(e2e): update local certs so they are valid on MacOS (#25864)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-06 10:21:54 -05:00
Papapetrou Patroklos
ced94022b3
fix: panic during OIDC logout with empty token (#25874)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2026-01-06 14:30:28 +00:00
Peter Jiang
4a5d3a79cc
fix(ci): add gitops-engine unit tests to CI (#25863)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2026-01-06 11:29:01 +01:00
dependabot[bot]
ca82ee11e2
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.10.0 to 1.11.0 (#25867)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-06 08:39:27 +02:00
dependabot[bot]
93205a7a08
chore(deps): bump renovatebot/github-action from 44.2.2 to 44.2.3 (#25868)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-06 08:38:30 +02:00
Alexandre Gaudreault
f8899ee310
test(e2e): unstable CMP e2e test when running locally (#25752)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2026-01-05 15:18:26 -05:00
Regina Voloshin
884b639e1e
ci: test against k8s 1.34.2 (#25856)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2026-01-05 14:45:48 +01:00
Aya Hosni
9213601160
chore: migrate k8s.gcr.io to registry.k8s.io in install manifests (#25802)
Signed-off-by: Aya <ayia.hosni@gmail.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
2026-01-05 10:51:27 +02:00
Josh Soref
93c736cf6a
fix(ui): remove excess dot (#25816)
Signed-off-by: Josh Soref <jsoref@gmail.com>
2026-01-05 10:41:59 +02:00
Illia Oleksiuk
774f48e23e
docs: fix typos in documentation (#25844)
Signed-off-by: ioleksiuk <ioleksiuk@users.noreply.github.com>
Signed-off-by: Illia Oleksiuk <ilya.oleksiuk@gmail.com>
2026-01-05 10:38:31 +02:00
dependabot[bot]
e4a28fa71f
chore(deps): bump library/golang from 31c1e53 to 6cc2338 in /test/remote (#25847)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 10:24:11 +02:00
Jakub Rudnik
d8f9ed90f2
docs: fix help-wanted label link (#25839)
Signed-off-by: Jakub Rudnik <jakub@rudnik.io>
2026-01-05 11:40:20 +05:30
github-actions[bot]
deb79bbfc4
[Bot] docs: Update Snyk report (#25843)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2026-01-04 19:51:28 +02:00
argoproj-renovate[bot]
5598f87d82
chore(deps): update docker.io/library/golang:1.25.5 docker digest to 6cc2338 (#25838)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-04 12:26:19 +02:00
dependabot[bot]
d11d025186
chore(deps): bump qs from 6.11.0 to 6.14.1 in /ui (#25828)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-02 14:36:11 -05:00
argoproj-renovate[bot]
4409ec0ab8
chore(deps): update docker.io/library/golang:1.25.5 docker digest to 31c1e53 (#25831)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2026-01-01 11:30:37 +02:00
dependabot[bot]
20bf53f4a6
chore(deps): bump the otel group with 4 updates (#25553)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-01 11:26:48 +02:00
dependabot[bot]
fa6f5c63c8
chore(deps): bump renovatebot/github-action from 44.2.1 to 44.2.2 (#25818)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-31 14:12:45 -05:00
argoproj-renovate[bot]
5113f820de
chore(deps): update docker.io/library/golang:1.25.5 docker digest to 97be073 (#25820)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2025-12-31 14:12:06 -05:00
dependabot[bot]
23b387f117
chore(deps): bump library/golang from 36b4f45 to 31c1e53 in /test/remote (#25829)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-31 14:11:17 -05:00
Josh Soref
2f9bea6892
docs: link to source hydrator (#25813)
Signed-off-by: Josh Soref <jsoref@gmail.com>
2025-12-29 12:37:33 -05:00
github-actions[bot]
104cd72c77
[Bot] docs: Update Snyk report (#25806)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2025-12-28 01:10:16 +00:00
Shubham Singh
5cce5fe59b
docs: Update Linux host IP detection in Toolchain guide - to avoid hardcoded eth0 (#25800)
Signed-off-by: shubham singh mahar <shubhammahar1306@gmail.com>
Co-authored-by: shubham singh mahar <smahar@obmondo.com>
2025-12-25 23:53:34 +01:00
Regina Voloshin
c34d44ab7f
chore(deps): bump ubuntu in gh actions to 24.04 and ubuntu in test/remote/Dockerfile to 25.10 (#25763)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-24 13:42:43 +02:00
dependabot[bot]
bac8c4bc19
chore(deps): bump google.golang.org/grpc from 1.77.0 to 1.78.0 (#25789)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-24 12:33:11 +02:00
Pasha Kostohrys
da042b7f96
chore(deps): update notifications-engine to v0.5.1-0.20251223091026-8c0c96d8d530 (#25785)
Co-authored-by: pasha <pasha.k@fyxt.com>
2025-12-23 15:03:42 +02:00
dependabot[bot]
28beb3ec42
chore(deps): bump renovatebot/github-action from 44.2.0 to 44.2.1 (#25781)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-23 08:00:18 +02:00
Ankit Pramanik
ef75a2e7a5
feat: limit max certificates and known hosts in stream parsing (#25777)
Signed-off-by: Ankit Pramanik <59945244+ankit98040@users.noreply.github.com>
2025-12-22 21:00:18 +05:30
Yuan Tang
91a1311bbe
chore: Remove unnecessary "CD" suffix in MAINTAINERS.md (#25778)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2025-12-22 16:38:48 +02:00
Regina Voloshin
bbeaa2e359
test: flaky e2e tests with argocd-e2e-external ns not found - removed deletion of shared ns in e2e (#25731)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-22 13:10:17 +02:00
Regina Voloshin
d63aa846c5
ci: Make codecov steps conditional on codecov secret existence and enable running them on forks (#25765)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-21 23:59:01 -10:00
Nitish Kumar
4c77f0c963
chore: add maintainers name in the MAINTAINERS.md file (#25685)
Signed-off-by: nitishfy <justnitish06@gmail.com>
2025-12-21 23:57:51 -10:00
Bryan Stenson
5ec311001b
chore(deps): update to helm 3.19.4 due to cve : https://github.com/helm/helm/releases/tag/v3.19.4 (#25769)
Signed-off-by: Bryan Stenson <bryan@siliconvortex.com>
2025-12-22 11:41:43 +02:00
dependabot[bot]
abf2233426
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.9.1 to 1.10.0 (#25770)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 10:26:01 +02:00
dependabot[bot]
dd9799385d
chore(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#25771)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 09:41:27 +02:00
github-actions[bot]
cc5cd7e30b
[Bot] docs: Update Snyk report (#25761)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2025-12-21 11:09:02 +02:00
Papapetrou Patroklos
b543e18b10
chore: bumps ubuntu base docker image to 25.10 (#25758)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2025-12-21 08:22:05 +02:00
Alexandre Gaudreault
1dc85e564b
fix(engine): always preserve sync status for hooks (#25692)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Afzal Ansari <afzal442@gmail.com>
Signed-off-by: Julie Vogelman <julie_vogelman@intuit.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Regina Voloshin <regina.voloshin@codefresh.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <19544836+reggie-k@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Afzal Ansari <afzal442@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Julie Vogelman <julie_vogelman@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-19 12:05:05 -05:00
Alexandre Gaudreault
0114636cdc
test(e2e): oras binary not found locally if not installed in path (#25751)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-12-19 11:34:06 -05:00
Peter Jiang
5859065650
feat: add ApplicationSet listResourceEvents API (#25537)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
Co-authored-by: Alexy Mantha <alexy@mantha.dev>
2025-12-19 11:04:26 +02:00
Michael Crenshaw
6f21978637
fix(hydrator): git fetch needs creds (#25727) (#25738)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-18 22:24:07 +00:00
Aditya Raj
91e9b22624
fix(ui): show full labels, projects, clusters, and namespaces on hover in sidebar (#7520) (#24723)
Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
Signed-off-by: Aditya Raj <161347394+adityaraj178@users.noreply.github.com>
Co-authored-by: jwinters01 <34199886+jwinters01@users.noreply.github.com>
2025-12-18 09:25:02 -05:00
Alexandre Gaudreault
9a777c63fa
test(engine): cleanup hook tests (#25673)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-12-18 09:07:19 -05:00
Dillen Padhiar
6f0de8b858
feat: update health checks for Numaflow resources (#25698)
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
2025-12-18 09:05:53 -05:00
Papapetrou Patroklos
b1a93b4756
chore: bumps golang version everywhere to the latest 1.25.5 (#25716)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2025-12-18 10:53:28 +00:00
dependabot[bot]
b5a91a18cd
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.9.0 to 1.9.1 (#25725)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 07:46:43 +02:00
dependabot[bot]
4bfd6243a1
chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0 (#25726)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 07:45:04 +02:00
argoproj-renovate[bot]
cc0752d334
chore(deps): update group golang to v1.25.5 (#25723)
Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
2025-12-18 07:36:36 +02:00
Daniel Moran
f3d0c1233e
fix: Toggle automated.enabled to disable auto-sync for rollbacks (#25719)
Signed-off-by: Daniel Moran <danxmoran@gmail.com>
2025-12-18 00:20:13 -05:00
Blake Pettersson
4fabbcebea
fix(metrics): more consistent oci metrics (#25549)
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2025-12-18 07:09:10 +02:00
Nolan Emirot
3b24d33cda
docs: add infos around username for access token with bitbucket (#25588)
Signed-off-by: emirot <emirot.nolan@gmail.com>
2025-12-18 07:02:21 +02:00
Alexandre Gaudreault
13b8b458f4
test: use unique app name per test (#25720)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-12-17 23:58:40 +00:00
Dylan Schlager
b414432ddb
feat: Add application filter for operation status to UI (#25636)
Signed-off-by: Dylan Schlager <dylan.schlager@lattice.com>
2025-12-17 18:54:18 -05:00
Michael Crenshaw
216611ff3b
chore(ci): migrate from deprecated codecov action (#25704)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-17 16:54:02 -05:00
Michael Crenshaw
df3be1cdf0
fix(server): update resourceVersion on Terminate retry (#25650)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-17 16:53:34 -05:00
Michael Crenshaw
0a2ae95be8
fix(hydrator): race when pushing notes (#25700)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-17 11:17:55 -05:00
dependabot[bot]
67d425f237
chore(deps): bump codecov/test-results-action from 1.1.1 to 1.2.1 (#25703)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-17 10:11:00 -05:00
Regina Voloshin
2e6e6cfc12
test: fix flaky create repository test by resyncing informers (#25706)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-17 01:27:31 -10:00
dependabot[bot]
474d9005f4
chore(deps): bump library/golang from a22b2e6 to 36b4f45 in /test/remote (#25680)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-17 08:20:16 +00:00
dependabot[bot]
43a9524d0c
chore(deps): bump renovatebot/github-action from 44.0.5 to 44.2.0 (#25702)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-17 10:10:14 +02:00
Papapetrou Patroklos
b2df60414c
chore: bumps go redis client 9.17.2 (#25643)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-17 09:25:04 +02:00
Shubham Singh
fee1c565c3
fix: update Jsonnet field tag to avoid jsonnet: {} in manifests (#25625)
Signed-off-by: Omar Nasser <omarnasserjr@gmail.com>
Signed-off-by: shubham singh mahar <smahar@obmondo.com>
Co-authored-by: Omar Nasser <omarnasserjr@gmail.com>
Co-authored-by: shubham singh mahar <smahar@obmondo.com>
2025-12-17 11:59:58 +05:30
dependabot[bot]
106acdafec
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.8.2 to 1.9.0 (#25701)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-17 03:37:56 +00:00
Michael Crenshaw
a439c6c5ec
fix(hydrator): hydrated sha missing on no-ops (#25694) (#25695)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-16 17:02:46 -05:00
Alexandre Gaudreault
95d19f2eda
fix(engine): improve operation phase messages (#25668)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-12-16 21:59:10 +00:00
Julie Vogelman
34e8935bf8
docs: clarify that updating customLabels in ArgoCD requires a restart to the Controller to take effect (#25693)
Signed-off-by: Julie Vogelman <julie_vogelman@intuit.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-12-16 19:51:51 +00:00
Alexandre Gaudreault
e8eebd7b12
chore: bump gitops-engine with force+replace test (#24508)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-12-16 14:04:11 -05:00
Alexandre Gaudreault
48f01b5965
test(engine): refactor engine tests to ignore dry-run results (#25674)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-12-16 12:32:05 -05:00
Regina Voloshin
b92b7a6fd8
docs: grafana-org-operator healthcehck to upgrade manual (#25672)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-16 08:16:58 -07:00
Afzal Ansari
4832c5e7a5
docs: improve managedNamespaceMetadata section with details on tracki… (#25536)
Signed-off-by: Afzal Ansari <afzal442@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2025-12-16 04:18:59 -10:00
dependabot[bot]
5b8ce54f9d
chore(deps): bump k8s.io/kubernetes from 1.34.0 to 1.34.2 in /gitops-engine (#25675)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-16 11:17:59 +02:00
renovate[bot]
eedf6cc58e
chore(deps): update module k8s.io/kubernetes to v1.34.2 [security] (#25682)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-16 09:09:29 +02:00
dependabot[bot]
96f1266846
chore(deps): bump github.com/expr-lang/expr from 1.17.6 to 1.17.7 (#25677)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 06:28:24 +00:00
dependabot[bot]
89cd590cb8
chore(deps): bump gitlab.com/gitlab-org/api/client-go from 1.8.1 to 1.8.2 (#25676)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 08:01:46 +02:00
dependabot[bot]
2de45e7532
chore(deps): bump actions/cache from 5.0.0 to 5.0.1 (#25678)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 07:58:51 +02:00
dependabot[bot]
8d24a9a211
chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 (#25679)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 07:58:13 +02:00
github-actions[bot]
f70c47a7fb
chore: Bump version in master (#25670)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <19544836+reggie-k@users.noreply.github.com>
2025-12-15 19:04:12 +00:00
Regina Voloshin
faf0b75a73
docs: added 3.2 to 3.3 upgrade overview section (#25671)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-12-15 18:11:50 +00:00
1075 changed files with 1053511 additions and 55573 deletions

View file

@ -41,6 +41,7 @@ Target GA date: ___. __, ____
Thanks to all the folks who spent their time contributing to this release in any way possible!
```
- [ ] Monitor support channels for issues, cherry-picking bugfixes and docs fixes as appropriate during the RC period (or delegate this task to an Approver and coordinate timing)
- [ ] After creating the RC, open a documentation PR for the next minor version using [this](../../docs/operator-manual/templates/minor_version_upgrade.md) template.
## GA Release Checklist

View file

@ -4,12 +4,14 @@ module.exports = {
autodiscover: false,
allowPostUpgradeCommandTemplating: true,
allowedPostUpgradeCommands: ["make mockgen"],
binarySource: 'install',
extends: [
"github>argoproj/argo-cd//renovate-presets/commons.json5",
"github>argoproj/argo-cd//renovate-presets/custom-managers/shell.json5",
"github>argoproj/argo-cd//renovate-presets/custom-managers/yaml.json5",
"github>argoproj/argo-cd//renovate-presets/fix/disable-all-updates.json5",
"github>argoproj/argo-cd//renovate-presets/devtool.json5",
"github>argoproj/argo-cd//renovate-presets/docs.json5"
"github>argoproj/argo-cd//renovate-presets/docs.json5",
"group:aws-sdk-go-v2Monorepo"
]
}

View file

@ -8,6 +8,9 @@ updates:
ignore:
- dependency-name: k8s.io/*
groups:
aws-sdk-v2:
patterns:
- "github.com/aws/aws-sdk-go-v2*"
otel:
patterns:
- "go.opentelemetry.io/*"

View file

@ -1,15 +1,15 @@
{
"LABEL": {
"name": "title needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["[Bot] docs: "],
"regexp": "^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*"
},
"MESSAGES": {
"success": "PR title is valid",
"failure": "PR title is invalid",
"notice": "PR Title needs to pass regex '^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*"
}
"LABEL": {
"name": "title needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["[Bot] docs: "],
"regexp": "^(refactor|feat|fix|docs|test|ci|chore|revert)!?(\\(.*\\))?!?:.*"
},
"MESSAGES": {
"success": "PR title is valid",
"failure": "PR title is invalid",
"notice": "PR Title needs to pass regex '^(refactor|feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*"
}
}

View file

@ -11,6 +11,7 @@
| release.yaml | Build images, cli-binaries, provenances, and post actions |
| scorecard.yaml | Generate scorecard for supply-chain security |
| update-snyk.yaml | Scheduled snyk reports |
| stale.yaml | Labels stale issues and PRs |
# Reusable workflows

View file

@ -4,16 +4,26 @@ on:
permissions: {}
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
prepare-release:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
name: Automatically update major version
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@ -37,7 +47,7 @@ jobs:
working-directory: /home/runner/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Add ~/go/bin to PATH
@ -74,7 +84,7 @@ jobs:
rsync -a --exclude=.git /home/runner/go/src/github.com/argoproj/argo-cd/ ../argo-cd
- name: Create pull request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
commit-message: "Bump major version to ${{ steps.get-target-version.outputs.TARGET_VERSION }}"
title: "Bump major version to ${{ steps.get-target-version.outputs.TARGET_VERSION }}"
@ -86,4 +96,4 @@ jobs:
- [ ] Add an upgrade guide to the docs for this version
branch: bump-major-version
branch-suffix: random
signoff: true
signoff: true

View file

@ -25,20 +25,30 @@ on:
CHERRYPICK_APP_PRIVATE_KEY:
required: true
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
cherry-pick:
name: Cherry Pick to ${{ inputs.version_number }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
with:
app-id: ${{ secrets.CHERRYPICK_APP_ID }}
private-key: ${{ secrets.CHERRYPICK_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
@ -66,6 +76,7 @@ jobs:
# Create new branch for cherry-pick
CHERRY_PICK_BRANCH="cherry-pick-${{ inputs.pr_number }}-to-${TARGET_BRANCH}"
git checkout -b "$CHERRY_PICK_BRANCH" "origin/$TARGET_BRANCH"
# Perform cherry-pick
@ -75,12 +86,17 @@ jobs:
# Extract Signed-off-by from the cherry-pick commit
SIGNOFF=$(git log -1 --pretty=format:"%B" | grep -E '^Signed-off-by:' || echo "")
# Push the new branch
git push origin "$CHERRY_PICK_BRANCH"
# Push the new branch. Force push to ensure that in case the original cherry-pick branch is stale,
# that the current state of the $TARGET_BRANCH + cherry-pick gets in $CHERRY_PICK_BRANCH.
git push origin -f "$CHERRY_PICK_BRANCH"
# Save data for PR creation
echo "branch_name=$CHERRY_PICK_BRANCH" >> "$GITHUB_OUTPUT"
echo "signoff=$SIGNOFF" >> "$GITHUB_OUTPUT"
{
echo "signoff<<EOF"
echo "$SIGNOFF"
echo "EOF"
} >> "$GITHUB_OUTPUT"
echo "target_branch=$TARGET_BRANCH" >> "$GITHUB_OUTPUT"
else
echo "❌ Cherry-pick failed due to conflicts"

View file

@ -6,6 +6,10 @@ on:
- master
types: ["labeled", "closed"]
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
find-labels:
name: Find Cherry Pick Labels
@ -14,10 +18,16 @@ jobs:
(github.event.action == 'labeled' && startsWith(github.event.label.name, 'cherry-pick/')) ||
(github.event.action == 'closed' && contains(toJSON(github.event.pull_request.labels.*.name), 'cherry-pick/'))
)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
labels: ${{ steps.extract-labels.outputs.labels }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Extract cherry-pick labels
id: extract-labels
run: |
@ -50,4 +60,4 @@ jobs:
pr_title: ${{ github.event.pull_request.title }}
secrets:
CHERRYPICK_APP_ID: ${{ vars.CHERRYPICK_APP_ID }}
CHERRYPICK_APP_PRIVATE_KEY: ${{ secrets.CHERRYPICK_APP_PRIVATE_KEY }}
CHERRYPICK_APP_PRIVATE_KEY: ${{ secrets.CHERRYPICK_APP_PRIVATE_KEY }}

View file

@ -14,7 +14,9 @@ on:
env:
# Golang version to use across CI steps
# renovate: datasource=golang-version packageName=golang
GOLANG_VERSION: '1.25.3'
GOLANG_VERSION: '1.26.2'
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@ -25,14 +27,19 @@ permissions:
jobs:
changes:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
backend: ${{ steps.filter.outputs.backend_any_changed }}
frontend: ${{ steps.filter.outputs.frontend_any_changed }}
docs: ${{ steps.filter.outputs.docs_any_changed }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
id: filter
with:
# Any file which is not under docs/, ui/ or is not a markdown file is counted as a backend file
@ -50,14 +57,19 @@ jobs:
check-go:
name: Ensure Go modules synchronicity
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- changes
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Download all Go modules
@ -70,22 +82,31 @@ jobs:
build-go:
name: Build & cache Go code
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- changes
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Restore go build cache
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
- name: Restore go build and module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Download all Go modules
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-build-v1-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-v1-
- name: Download Go modules
run: |
go mod download
- name: Compile all packages
@ -97,27 +118,32 @@ jobs:
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Lint Go code
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- changes
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
# renovate: datasource=go packageName=github.com/golangci/golangci-lint versioning=regex:^v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)?$
version: v2.5.0
# renovate: datasource=go packageName=github.com/golangci/golangci-lint/v2 versioning=regex:^v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)?$
version: v2.11.4
args: --verbose
test-go:
name: Run unit tests for Go packages
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- build-go
- changes
@ -125,14 +151,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Create checkout directory
run: mkdir -p ~/go/src/github.com/argoproj
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Create symlink in GOPATH
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
@ -151,11 +182,15 @@ jobs:
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
- name: Restore go build and module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-build-v1-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-v1-
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
@ -167,13 +202,13 @@ jobs:
run: |
git config --global user.name "John Doe"
git config --global user.email "john.doe@example.com"
- name: Download and vendor all required packages
- name: Download Go modules
run: |
go mod download
- name: Run all unit tests
run: make test-local
- name: Generate test results artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results
path: test-results
@ -181,7 +216,7 @@ jobs:
test-go-race:
name: Run unit tests with -race for Go packages
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- build-go
- changes
@ -189,14 +224,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Create checkout directory
run: mkdir -p ~/go/src/github.com/argoproj
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Create symlink in GOPATH
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
@ -215,11 +255,15 @@ jobs:
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
- name: Restore go build and module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-build-v1-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-v1-
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
@ -231,13 +275,13 @@ jobs:
run: |
git config --global user.name "John Doe"
git config --global user.email "john.doe@example.com"
- name: Download and vendor all required packages
- name: Download Go modules
run: |
go mod download
- name: Run all unit tests
run: make test-race-local
- name: Generate test results artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: race-results
path: test-results/
@ -245,14 +289,19 @@ jobs:
codegen:
name: Check changes to generated code
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.docs == 'true'}}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- changes
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Create symlink in GOPATH
@ -271,13 +320,13 @@ jobs:
# We need to vendor go modules for codegen yet
go mod download
go mod vendor -v
# generalizing repo name for forks: ${{ github.event.repository.name }}
working-directory: /home/runner/go/src/github.com/argoproj/${{ github.event.repository.name }}
# generalizing repo name for forks: ${{ github.event.repository.name }}
working-directory: /home/runner/go/src/github.com/argoproj/${{ github.event.repository.name }}
- name: Install toolchain for codegen
run: |
make install-codegen-tools-local
make install-go-tools-local
# generalizing repo name for forks: ${{ github.event.repository.name }}
# generalizing repo name for forks: ${{ github.event.repository.name }}
working-directory: /home/runner/go/src/github.com/argoproj/${{ github.event.repository.name }}
# We install kustomize in the dist directory
- name: Add dist to PATH
@ -302,30 +351,35 @@ jobs:
name: Build, test & lint UI code
# We run UI logic for backend changes so that we have a complete set of coverage documents to send to codecov.
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- changes
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
package_json_file: ui/package.json
- name: Setup NodeJS
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
# renovate: datasource=node-version packageName=node versioning=node
node-version: '22.9.0'
- name: Restore node dependency cache
id: cache-dependencies
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
node-version: '24.14.1'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install node dependencies
run: |
cd ui && yarn install --frozen-lockfile --ignore-optional --non-interactive
cd ui && pnpm i --frozen-lockfile
- name: Build UI code
run: |
yarn test
yarn build
pnpm test
pnpm build
env:
NODE_ENV: production
NODE_ONLINE_ENV: online
@ -334,13 +388,13 @@ jobs:
CODECOV_TOKEN: ${{ github.ref == 'refs/heads/master' && secrets.CODECOV_TOKEN || '' }}
working-directory: ui/
- name: Run ESLint
run: yarn lint
run: pnpm lint
working-directory: ui/
shellcheck:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: |
sudo apt-get install shellcheck
shellcheck -e SC2059 -e SC2154 -e SC2034 -e SC2016 -e SC1091 $(find . -type f -name '*.sh' | grep -v './ui/node_modules') | tee sc.log
@ -349,7 +403,7 @@ jobs:
analyze:
name: Process & analyze test artifacts
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- test-go
- build-ui
@ -357,27 +411,24 @@ jobs:
- test-e2e
env:
sonar_secret: ${{ secrets.SONAR_TOKEN }}
codecov_secret: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Restore node dependency cache
id: cache-dependencies
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
- name: Remove other node_modules directory
run: |
rm -rf ui/node_modules/argo-ui/node_modules
- name: Get e2e code coverage
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: e2e-code-coverage
path: e2e-code-coverage
- name: Get unit test code coverage
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: test-results
path: test-results
@ -389,51 +440,52 @@ jobs:
run: |
go tool covdata percent -i=test-results,e2e-code-coverage/applicationset-controller,e2e-code-coverage/repo-server,e2e-code-coverage/app-controller,e2e-code-coverage/commit-server -o test-results/full-coverage.out
- name: Upload code coverage information to codecov.io
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
# Only run when the workflow is for upstream (PR target or push is in argoproj/argo-cd).
if: github.repository == 'argoproj/argo-cd'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: test-results/full-coverage.out
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'argoproj/argo-cd'
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
# Codecov uploads test results to Codecov.io on upstream master branch.
if: github.repository == 'argoproj/argo-cd' && github.ref == 'refs/heads/master' && github.event_name == 'push'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
file: test-results/junit.xml
files: test-results/junit.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
- name: Perform static code analysis using SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0
if: env.sonar_secret != ''
test-e2e:
name: Run end-to-end tests
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ${{ github.repository == 'argoproj/argo-cd' && 'oracle-vm-16cpu-64gb-x86-64' || 'ubuntu-22.04' }}
runs-on: ${{ github.repository == 'argoproj/argo-cd' && 'oracle-vm-16cpu-64gb-x86-64' || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
# latest: true means that this version mush upload the coverage report to codecov.io
# We designate the latest version because we only collect code coverage for that version.
k3s:
- version: v1.33.1
- version: v1.35.0
latest: true
- version: v1.34.2
latest: false
- version: v1.33.1
latest: false
- version: v1.32.1
latest: false
- version: v1.31.0
latest: false
- version: v1.30.4
latest: false
needs:
- build-go
- changes
env:
ARGOCD_FAKE_IN_CLUSTER: 'true'
ARGOCD_SSH_DATA_PATH: '/tmp/argo-e2e/app/config/ssh'
ARGOCD_TLS_DATA_PATH: '/tmp/argo-e2e/app/config/tls'
ARGOCD_E2E_SSH_KNOWN_HOSTS: '../fixture/certs/ssh_known_hosts'
ARGOCD_E2E_K3S: 'true'
ARGOCD_IN_CI: 'true'
ARGOCD_E2E_APISERVER_PORT: '8088'
@ -442,6 +494,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
@ -450,14 +507,23 @@ jobs:
swap-storage: false
tool-cache: false
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Set GOPATH
run: |
echo "GOPATH=$HOME/go" >> $GITHUB_ENV
- name: Setup NodeJS
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
# renovate: datasource=node-version packageName=node versioning=node
node-version: '24.14.1'
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
package_json_file: ui/package.json
- name: GH actions workaround - Kill XSP4 process
run: |
sudo pkill mono || true
@ -473,11 +539,15 @@ jobs:
sudo chown $(whoami) $HOME/.kube/config
sudo chmod go-r $HOME/.kube/config
kubectl version
- name: Restore go build cache
uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v5.0.0
- name: Restore go build and module cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-build-v1-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-v1-
- name: Add ~/go/bin to PATH
run: |
echo "$HOME/go/bin" >> $GITHUB_PATH
@ -487,10 +557,12 @@ jobs:
- name: Add ./dist to PATH
run: |
echo "$(pwd)/dist" >> $GITHUB_PATH
- name: Download Go dependencies
- name: Download Go modules
run: |
go mod download
go install github.com/mattn/goreman@latest
- name: Install goreman
run: |
go install github.com/mattn/goreman@v0.3.17
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
@ -500,7 +572,7 @@ jobs:
git config --global user.email "john.doe@example.com"
- name: Pull Docker image required for tests
run: |
docker pull ghcr.io/dexidp/dex:v2.43.0
docker pull ghcr.io/dexidp/dex:v2.45.0
docker pull argoproj/argo-cd-ci-builder:v1.0.0
docker pull redis:8.2.3-alpine
- name: Create target directory for binaries in the build-process
@ -532,13 +604,13 @@ jobs:
goreman run stop-all || echo "goreman trouble"
sleep 30
- name: Upload e2e coverage report
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: e2e-code-coverage
path: /tmp/coverage
if: ${{ matrix.k3s.latest }}
- name: Upload e2e-server logs
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: e2e-server-k8s${{ matrix.k3s.version }}.log
path: /tmp/e2e-server.log
@ -556,8 +628,13 @@ jobs:
needs:
- test-e2e
- changes
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- run: |
result="${{ needs.test-e2e.result }}"
# mark as successful even if skipped

View file

@ -6,7 +6,18 @@ on:
branches-ignore:
- 'dependabot/**'
- 'cherry-pick-*'
# Skip CodeQL for documentation-only changes
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
# Skip CodeQL for documentation-only changes
paths-ignore:
- '*.md'
- '**/*.md'
- 'docs/assets/**'
schedule:
- cron: '0 19 * * 0'
@ -17,6 +28,10 @@ concurrency:
permissions:
contents: read
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
CodeQL-Build:
permissions:
@ -26,20 +41,26 @@ jobs:
if: github.repository == 'argoproj/argo-cd' || vars.enable_codeql
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Use correct go version. https://github.com/github/codeql-action/issues/1842#issuecomment-1704398087
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
@ -47,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -61,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2

View file

@ -45,38 +45,58 @@ on:
permissions: {}
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
publish:
permissions:
contents: read
packages: write # Used to push images to `ghcr.io` if used.
id-token: write # Needed to create an OIDC token for keyless signing
runs-on: ubuntu-22.04
outputs:
runs-on: ubuntu-24.04
outputs:
image-digest: ${{ steps.image.outputs.digest }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref_type == 'tag'}}
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ github.ref_type != 'tag'}}
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ inputs.go-version }}
cache: false
- name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Setup QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
image: tonistiigi/binfmt@sha256:d3b963f787999e6c0219a48dba02978769286ff61a5f4d26245cb6a6e5567ea3 #qemu-v10.0.4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
with:
# buildkit v0.28.1
driver-opts: |
image=moby/buildkit@sha256:a82d1ab899cda51aade6fe818d71e4b58c4079e047a0cf29dbb93b2b0465ea69
- name: Setup tags for container image as a CSV type
run: |
@ -103,7 +123,7 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
- name: Login to Quay.io
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: quay.io
username: ${{ secrets.quay_username }}
@ -111,7 +131,7 @@ jobs:
if: ${{ inputs.quay_image_name && inputs.push }}
- name: Login to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ secrets.ghcr_username }}
@ -119,7 +139,7 @@ jobs:
if: ${{ inputs.ghcr_image_name && inputs.push }}
- name: Login to dockerhub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
@ -142,7 +162,7 @@ jobs:
- name: Build and push container image
id: image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f #v7.1.0
with:
context: .
platforms: ${{ inputs.platforms }}

View file

@ -15,12 +15,16 @@ concurrency:
permissions: {}
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
set-vars:
permissions:
contents: read
# Always run to calculate variables - other jobs check outputs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
image-tag: ${{ steps.image.outputs.tag}}
platforms: ${{ steps.platforms.outputs.platforms }}
@ -31,7 +35,13 @@ jobs:
ghcr_provenance_image: ${{ steps.image.outputs.ghcr_provenance_image }}
allow_ghcr_publish: ${{ steps.image.outputs.allow_ghcr_publish }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set image tag and names
run: |
@ -86,7 +96,7 @@ jobs:
with:
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
# renovate: datasource=golang-version packageName=golang
go-version: 1.25.3
go-version: 1.26.2
platforms: ${{ needs.set-vars.outputs.platforms }}
push: false
@ -103,7 +113,7 @@ jobs:
ghcr_image_name: ${{ needs.set-vars.outputs.ghcr_image_name }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
# renovate: datasource=golang-version packageName=golang
go-version: 1.25.3
go-version: 1.26.2
platforms: ${{ needs.set-vars.outputs.platforms }}
push: true
secrets:
@ -138,9 +148,9 @@ jobs:
contents: write # for git to push upgrade commit if not already deployed
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
if: ${{ github.repository == 'argoproj/argo-cd' && github.event_name == 'push' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: git clone "https://$TOKEN@github.com/argoproj/argoproj-deployments"
env:
TOKEN: ${{ secrets.TOKEN }}

View file

@ -14,13 +14,17 @@ on:
permissions: {}
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
prepare-release:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
name: Automatically generate version and manifests on ${{ inputs.TARGET_BRANCH }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
# Calculate image names with defaults, this will be used in the make manifests-local command
# to generate the correct image name in the manifests
@ -28,8 +32,14 @@ jobs:
IMAGE_NAMESPACE: ${{ vars.IMAGE_NAMESPACE || 'argoproj' }}
IMAGE_REPOSITORY: ${{ vars.IMAGE_REPOSITORY || 'argocd' }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@ -70,7 +80,7 @@ jobs:
git stash pop
- name: Create pull request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
commit-message: "Bump version to ${{ inputs.TARGET_VERSION }}"
title: "Bump version to ${{ inputs.TARGET_VERSION }} on ${{ inputs.TARGET_BRANCH }} branch"

View file

@ -1,13 +1,15 @@
name: "Lint PR"
on:
pull_request_target:
pull_request:
types: [opened, edited, reopened, synchronize]
# IMPORTANT: No checkout actions, scripts, or builds should be added to this workflow. Permissions should always be used
# with extreme caution. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
permissions: {}
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
# PR updates can happen in quick succession leading to this
# workflow being trigger a number of times. This limits it
# to one run per PR.
@ -21,8 +23,14 @@ jobs:
contents: read
pull-requests: read
name: Validate PR Title
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: thehanimo/pr-title-checker@7fbfe05602bdd86f926d3fb3bccb6f3aed43bc70 # v1.4.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -11,8 +11,10 @@ permissions: {}
env:
# renovate: datasource=golang-version packageName=golang
GOLANG_VERSION: '1.25.3' # Note: go-version must also be set in job argocd-image.with.go-version
GOLANG_VERSION: '1.26.2' # Note: go-version must also be set in job argocd-image.with.go-version
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
argocd-image:
needs: [setup-variables]
@ -26,7 +28,7 @@ jobs:
quay_image_name: ${{ needs.setup-variables.outputs.quay_image_name }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
# renovate: datasource=golang-version packageName=golang
go-version: 1.25.3
go-version: 1.26.2
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
push: true
secrets:
@ -36,7 +38,7 @@ jobs:
setup-variables:
name: Setup Release Variables
if: github.repository == 'argoproj/argo-cd' || (github.repository_owner != 'argoproj' && vars.ENABLE_FORK_RELEASES == 'true' && vars.IMAGE_NAMESPACE && vars.IMAGE_NAMESPACE != 'argoproj')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
is_pre_release: ${{ steps.var.outputs.is_pre_release }}
is_latest_release: ${{ steps.var.outputs.is_latest_release }}
@ -47,8 +49,13 @@ jobs:
provenance_image: ${{ steps.var.outputs.provenance_image }}
allow_fork_release: ${{ steps.var.outputs.allow_fork_release }}
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@ -117,14 +124,14 @@ jobs:
permissions:
contents: write # used for uploading assets
if: github.repository == 'argoproj/argo-cd' || needs.setup-variables.outputs.allow_fork_release == 'true'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
GORELEASER_MAKE_LATEST: ${{ needs.setup-variables.outputs.is_latest_release }}
outputs:
hashes: ${{ steps.hash.outputs.hashes }}
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@ -133,7 +140,7 @@ jobs:
run: git fetch --force --tags
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
cache: false
@ -159,10 +166,10 @@ jobs:
tool-cache: false
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0
id: run-goreleaser
with:
version: latest
version: v2.14.3
args: release --clean --timeout 55m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -210,16 +217,21 @@ jobs:
outputs:
hashes: ${{ steps.sbom-hash.outputs.hashes }}
if: github.repository == 'argoproj/argo-cd' || needs.setup-variables.outputs.allow_fork_release == 'true'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
package_json_file: ui/package.json
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
cache: false
@ -231,28 +243,37 @@ jobs:
SPDX_GEN_VERSION: v0.0.13
# defines the sigs.k8s.io/bom version to use.
SIGS_BOM_VERSION: v0.2.1
# comma delimited list of project relative folders to inspect for package
# managers (gomod, yarn, npm).
PROJECT_FOLDERS: '.,./ui'
# full qualified name of the docker image to be inspected
DOCKER_IMAGE: ${{ needs.setup-variables.outputs.quay_image_name }}
run: |
yarn install --cwd ./ui
set -euo pipefail
pnpm install --dir ./ui --frozen-lockfile
go install github.com/spdx/spdx-sbom-generator/cmd/generator@$SPDX_GEN_VERSION
go install sigs.k8s.io/bom/cmd/bom@$SIGS_BOM_VERSION
# Generate SPDX for project dependencies analyzing package managers
for folder in $(echo $PROJECT_FOLDERS | sed "s/,/ /g")
do
generator -p $folder -o /tmp
done
generator -p . -o /tmp
# Generate SPDX for binaries analyzing the docker image
if [[ ! -z $DOCKER_IMAGE ]]; then
bom generate -o /tmp/bom-docker-image.spdx -i $DOCKER_IMAGE
# When ui/ should use in-repo pnpm for `pnpm sbom` (11+):
# 1. In ui/package.json set "packageManager" to a pnpm 11+ release (e.g. pnpm@11.0.0), then from ./ui run
# `pnpm install` and commit the resulting ui/pnpm-lock.yaml so release CI's pnpm/action-setup matches.
# 2. Delete hack/generate-ui-pnpm-sbom.sh and remove the ./hack/generate-ui-pnpm-sbom.sh line below.
# 3. Uncomment:
# pnpm --dir ./ui sbom --sbom-format spdx --prod > /tmp/bom-ui-pnpm.spdx.json
./hack/generate-ui-pnpm-sbom.sh --write /tmp/bom-ui-pnpm.spdx.json
if [[ -n "${DOCKER_IMAGE:-}" ]]; then
bom generate -o /tmp/bom-docker-image.spdx -i "${DOCKER_IMAGE}"
fi
cd /tmp && tar -zcf sbom.tar.gz *.spdx
cd /tmp
shopt -s nullglob
spdx_files=( *.spdx )
shopt -u nullglob
if [[ ${#spdx_files[@]} -eq 0 ]]; then
echo "No .spdx files produced under /tmp"
exit 1
fi
tar -zcf sbom.tar.gz "${spdx_files[@]}" bom-ui-pnpm.spdx.json
- name: Generate SBOM hash
shell: bash
@ -264,7 +285,7 @@ jobs:
echo "hashes=$(sha256sum /tmp/sbom.tar.gz | base64 -w0)" >> "$GITHUB_OUTPUT"
- name: Upload SBOM
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@ -295,12 +316,12 @@ jobs:
contents: write # Needed to push commit to update stable tag
pull-requests: write # Needed to create PR for VERSION update.
if: github.repository == 'argoproj/argo-cd' || needs.setup-variables.outputs.allow_fork_release == 'true'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
TAG_STABLE: ${{ needs.setup-variables.outputs.is_latest_release }}
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@ -344,7 +365,7 @@ jobs:
if: ${{ env.UPDATE_VERSION == 'true' }}
- name: Create PR to update VERSION on master branch
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
commit-message: Bump version in master
title: 'chore: Bump version in master'

View file

@ -7,33 +7,56 @@ on:
permissions:
contents: read
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
renovate:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: github.repository == 'argoproj/argo-cd'
steps:
- name: Harden the runner (Block unknown outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: block
disable-sudo-and-containers: "false" # renovatebot runs in `docker run`
allowed-endpoints: >
github.com:443
api.github.com:443
raw.githubusercontent.com:443
release-assets.githubusercontent.com:443
ghcr.io:443
pkg-containers.githubusercontent.com:443
hub.docker.com:443
proxy.golang.org:443
nodejs.org:443
pypi.org:443
get.helm.sh
registry.npmjs.org
- name: Get token
id: get_token
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
with:
app-id: ${{ vars.RENOVATE_APP_ID }}
private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
# Some codegen commands require Go to be setup
- name: Setup Golang
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
# renovate: datasource=golang-version packageName=golang
go-version: 1.25.3
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
# Renovate do not pin their docker image versions to SHA, so
# when bumping renovate action version please check if renovate image
# has been updated (see it's numeric version in action.yaml)
# and update `renovate-version` parameter accordingly
- name: Self-hosted Renovate
uses: renovatebot/github-action@5712c6a41dea6cdf32c72d92a763bd417e6606aa #44.0.5
uses: renovatebot/github-action@83ec54fee49ab67d9cd201084c1ff325b4b462e4 #46.1.10
with:
configurationFile: .github/configs/renovate-config.js
token: '${{ steps.get_token.outputs.token }}'
renovate-image: "ghcr.io/renovatebot/renovate@sha256"
renovate-version: "5dfeab680f40edd2713b8fcae574824e60d2c831b8d89cc965e51621894c7084" #43
env:
LOG_LEVEL: 'debug'
RENOVATE_REPOSITORIES: '${{ github.repository }}'

View file

@ -17,7 +17,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
@ -29,8 +29,14 @@ jobs:
if: github.repository == 'argoproj/argo-cd'
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
@ -54,7 +60,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
@ -62,6 +68,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@8fcfedf57053e09257688fce7a0beeb18b1b9ae3 # v2.17.2
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
sarif_file: results.sarif

46
.github/workflows/stale.yaml vendored Normal file
View file

@ -0,0 +1,46 @@
name: "Label stale issues and PRs"
on:
schedule:
- cron: "0 0 * * *" #Runs midnight 12AM UTC
#Added Recommended permissions
permissions:
issues: write
pull-requests: write
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
stale:
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Block unknown outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: block
disable-sudo-and-containers: "true"
allowed-endpoints: >
api.github.com:443
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: >
This issue has been marked as stale because it has had no activity for 90 days. Please comment if this is still relevant.
stale-pr-message: >
This pull request has been marked as stale because it has had no activity for 90 days. Please comment if this is still relevant.
days-before-stale: 90
days-before-close: -1 # Auto-close diabled
exempt-issue-labels: >
bug, security, breaking/high, breaking/medium, breaking/low
# General configuration
operations-per-run: 200
remove-stale-when-updated: true #Remove stale label when issue/pr is updated

View file

@ -7,6 +7,10 @@ on:
permissions:
contents: read
env:
# a workaround to disable harden runner
STEP_SECURITY_HARDEN_RUNNER: ${{ vars.disable_harden_runner }}
jobs:
snyk-report:
permissions:
@ -14,10 +18,16 @@ jobs:
pull-requests: write
if: github.repository == 'argoproj/argo-cd'
name: Update Snyk report in the docs directory
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
if: ${{ vars.disable_harden_runner != 'true' }}
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
agent-enabled: "false"
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build reports

5
.gitignore vendored
View file

@ -16,6 +16,8 @@ coverage.out
test-results
.scannerwork
.scratch
# pnpm SBOM helper (hack/generate-ui-pnpm-sbom.sh) download cache — remove this line when that script is deleted.
hack/.cache/
node_modules/
.kube/
./test/cmp/*.sock
@ -24,6 +26,9 @@ node_modules/
.*.swp
rerunreport.txt
# AI tools support
CLAUDE.local.md
# ignore built binaries
cmd/argocd/argocd
cmd/argocd-application-controller/argocd-application-controller

View file

@ -22,6 +22,7 @@ linters:
- govet
- importas
- misspell
- modernize
- noctx
- perfsprint
- revive
@ -121,6 +122,13 @@ linters:
- pkg: github.com/argoproj/argo-cd/v3/util/io
alias: utilio
modernize:
disable:
# Suggest replacing omitempty with omitzero for struct fields.
- omitzero
# Simplify code by using go1.26's new(expr). - generates lots of false positives.
- newexpr
nolintlint:
require-specific: true
@ -137,16 +145,19 @@ linters:
strconcat: true
revive:
enable-all-rules: false
enable-default-rules: true
max-open-files: 2048
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
rules:
- name: bool-literal-in-expr
- name: blank-imports
disabled: true
- name: bool-literal-in-expr
- name: context-as-argument
arguments:
- allowTypesBefore: '*testing.T,testing.TB'
- allow-types-before: '*testing.T,testing.TB'
- name: context-keys-type
disabled: true
@ -158,14 +169,11 @@ linters:
- name: early-return
arguments:
- preserveScope
- preserve-scope
- name: empty-block
disabled: true
- name: error-naming
disabled: true
- name: error-return
- name: error-strings
@ -173,6 +181,9 @@ linters:
- name: errorf
- name: exported
disabled: true
- name: identical-branches
- name: if-return
@ -181,7 +192,7 @@ linters:
- name: indent-error-flow
arguments:
- preserveScope
- preserve-scope
- name: modifies-parameter
@ -198,7 +209,7 @@ linters:
- name: superfluous-else
arguments:
- preserveScope
- preserve-scope
- name: time-equal
@ -208,6 +219,8 @@ linters:
- name: unexported-return
disabled: true
- name: unnecessary-format
- name: unnecessary-stmt
- name: unreachable-code
@ -224,8 +237,8 @@ linters:
arguments:
- - ID
- - VM
- - skipPackageNameChecks: true
upperCaseConst: true
- - skip-initialism-name-checks: true
upper-case-const: true
staticcheck:
checks:
@ -247,7 +260,4 @@ linters:
usetesting:
os-mkdir-temp: false
output:
show-stats: false
version: "2"

View file

@ -46,7 +46,7 @@ packages:
interfaces:
RepoServerServiceClient: {}
RepoServerService_GenerateManifestWithFilesClient: {}
github.com/argoproj/argo-cd/v3/server/application:
github.com/argoproj/argo-cd/v3/server/broadcast:
interfaces:
Broadcaster: {}
github.com/argoproj/argo-cd/v3/server/extension:
@ -79,10 +79,10 @@ packages:
github.com/argoproj/argo-cd/v3/util/workloadidentity:
interfaces:
TokenProvider: {}
github.com/argoproj/gitops-engine/pkg/cache:
github.com/argoproj/argo-cd/gitops-engine/pkg/cache:
interfaces:
ClusterCache: {}
github.com/argoproj/gitops-engine/pkg/diff:
github.com/argoproj/argo-cd/gitops-engine/pkg/diff:
interfaces:
ServerSideDryRunner: {}
github.com/microsoft/azure-devops-go-api/azuredevops/v7/git:

53
AGENTS.md Normal file
View file

@ -0,0 +1,53 @@
# AI Agent Directives for Argo CD
**ATTENTION AI AGENTS, LLMs, AND AUTONOMOUS CODING TOOLS:**
This repository (argoproj/argo-cd) enforces strict contribution guidelines. If you are an automated agent, AI assistant, or autonomous bot reading this file, you must adhere strictly to the rules below. Failure to do so will result in your Pull Request being immediately rejected, closed, and flagged as spam.
## 1. Zero-Spam & PR Authorization Policy
* **Require an Issue:** DO NOT create a Pull Request unless there is an existing, open, and approved GitHub Issue that explicitly requests this work.
* **No "Drive-By" Refactoring:** Do not submit unsolicited PRs that only contain minor stylistic changes, variable renames, or typo fixes across the codebase unless tied to an approved `chore` issue.
* **No Hallucinated URLs:** Do not include fabricated links, hallucinated documentation, or fake GitHub usernames in the PR description or code comments. Please double-check any link, quote or code block that is included into the PR.
## 2. Argo CD Contribution Requirements
Argo CD is a CNCF Graduated project. All code must meet the following standards:
* **Semantic PR Titles:** You must use Semantic Pull Request formatting for your PR title. Valid prefixes are:
* `ci:` - Updates or improvements for the Continuous Integration workflows
* `fix:` - Bug fixes
* `feat:` - New features
* `test:` - Addition of tests to the code base, or improvements of existing ones
* `docs:` - Documentation improvements
* `chore:` - Internals, build processes, unit tests, etc.
* `refactor:` - Refactoring of the code base, without adding new features or fixing bugs
* `revert:` - Reverts a previous commit
* **PR Templates:** You must fully complete the Argo CD Pull Request template. Do not delete the template sections or leave them blank.
## 3. Tech Stack & Code Rules
* **Backend (Go):** The backend is written in Go. The minimum supported Go version is strictly enforced. You must use `go modules` for dependency management.
* **UI (React/TypeScript):** The frontend is written in React and TypeScript.
* **Kubernetes Manifests:** Argo CD heavily relies on Kubernetes manifests and CRDs. If you modify API structs, you MUST regenerate the manifests and API glue code.
* **Tests** Argo CD relies on automatic tests. If your PR adds new functionality or in any way modifies program behaviour, please add/change relevant unit and e2e tests. In those cases when it is not feasible or possible please document the reasons in the PR comment.
## 4. Required Local Checks (Do This Before Committing)
Do not finalize your code or suggest a commit to your user without ensuring the following `make` targets pass successfully. Argo CD uses a heavy CI pipeline, and failing these basic checks wastes project resources:
1. **Build the Code:** `make build`
2. **Generate API Code & Manifests:** `make codegen` *(CRITICAL: Must be run if any API structs are changed)*
3. **Linting:** `make lint` and `make lint-ui`
4. **Testing:** `make test`
5. **CLI Build:** `make cli`
If any of these commands fail, you must fix the errors before proceeding.
## 5. Documentation (`docs/`)
If you are modifying or adding a feature, you must also update the corresponding documentation.
* Write in clear, direct English.
* Use GitHub style admonition blocks (e.g., `> [!NOTE]`, `> [!WARNING]`) compatible with MkDocs Material.
* Code examples in documentation must be complete, accurate, and include the language identifier for syntax highlighting (e.g., ````yaml`).
## Summary of Agent Workflow
1. Verify an open issue exists.
2. Write code matching Argo CD's Go/React standards.
3. Run `make codegen`, `make lint`, and `make test`.
4. Format the PR title properly (e.g., `fix: resolve OutOfSync bug on PostDelete hook (#12345)`).

1
CLAUDE.md Normal file
View file

@ -0,0 +1 @@
@AGENTS.md

View file

@ -1,10 +1,10 @@
ARG BASE_IMAGE=docker.io/library/ubuntu:25.04@sha256:27771fb7b40a58237c98e8d3e6b9ecdd9289cec69a857fccfb85ff36294dac20
ARG BASE_IMAGE=docker.io/library/ubuntu:25.10@sha256:4a9232cc47bf99defcc8860ef6222c99773330367fcecbf21ba2edb0b810a31e
####################################################################################################
# Builder image
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################
FROM docker.io/library/golang:1.25.3@sha256:6d4e5e74f47db00f7f24da5f53c1b4198ae46862a47395e30477365458347bf2 AS builder
FROM docker.io/library/golang:1.26.2@sha256:5f3787b7f902c07c7ec4f3aa91a301a3eda8133aa32661a3b3a3a86ab3a68a36 AS builder
WORKDIR /tmp
@ -16,7 +16,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
unzip \
fcgiwrap \
git \
git-lfs \
make \
wget \
gcc \
@ -29,7 +28,8 @@ COPY hack/install.sh hack/tool-versions.sh ./
COPY hack/installers installers
RUN ./install.sh helm && \
INSTALL_PATH=/usr/local/bin ./install.sh kustomize
INSTALL_PATH=/usr/local/bin ./install.sh kustomize && \
./install.sh git-lfs
####################################################################################################
# Argo CD Base - used as the base for both the release and dev argocd images
@ -50,10 +50,10 @@ RUN groupadd -g $ARGOCD_USER_ID argocd && \
chmod g=u /home/argocd && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y \
git git-lfs tini gpg tzdata connect-proxy && \
apt-get install --no-install-recommends -y \
git tini ca-certificates gpg gpg-agent tzdata connect-proxy openssh-client && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
COPY hack/gpg-wrapper.sh \
hack/git-verify-wrapper.sh \
@ -61,6 +61,7 @@ COPY hack/gpg-wrapper.sh \
/usr/local/bin/
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm
COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/kustomize
COPY --from=builder /usr/local/bin/git-lfs /usr/local/bin/git-lfs
# keep uid_entrypoint.sh for backward compatibility
RUN ln -s /usr/local/bin/entrypoint.sh /usr/local/bin/uid_entrypoint.sh
@ -79,31 +80,36 @@ RUN mkdir -p tls && \
ENV USER=argocd
# Disable gRPC service config lookups via DNS TXT records to prevent excessive
# DNS queries for _grpc_config.<hostname> which can cause timeouts in dual-stack
# environments. This can be overridden via argocd-cmd-params-cm ConfigMap.
# See https://github.com/argoproj/argo-cd/issues/24991
ENV GRPC_ENABLE_TXT_SERVICE_CONFIG=false
USER $ARGOCD_USER_ID
WORKDIR /home/argocd
####################################################################################################
# Argo CD UI stage
####################################################################################################
FROM --platform=$BUILDPLATFORM docker.io/library/node:23.0.0@sha256:9d09fa506f5b8465c5221cbd6f980e29ae0ce9a3119e2b9bc0842e6a3f37bb59 AS argocd-ui
FROM --platform=$BUILDPLATFORM docker.io/library/node:24.14.1@sha256:80fc934952c8f1b2b4d39907af7211f8a9fff1a4c2cf673fb49099292c251cec AS argocd-ui
WORKDIR /src
COPY ["ui/package.json", "ui/yarn.lock", "./"]
COPY ["ui/package.json", "ui/pnpm-lock.yaml", "./"]
RUN yarn install --network-timeout 200000 && \
yarn cache clean
RUN npm install -g corepack@0.34.6 && corepack enable && pnpm install --frozen-lockfile
COPY ["ui/", "."]
ARG ARGO_VERSION=latest
ENV ARGO_VERSION=$ARGO_VERSION
ARG TARGETARCH
RUN HOST_ARCH=$TARGETARCH NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OPTIONS=--max_old_space_size=8192 yarn build
RUN HOST_ARCH=$TARGETARCH NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OPTIONS=--max_old_space_size=8192 pnpm build
####################################################################################################
# Argo CD Build stage which performs the actual build of Argo CD binaries
####################################################################################################
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.25.3@sha256:6d4e5e74f47db00f7f24da5f53c1b4198ae46862a47395e30477365458347bf2 AS argocd-build
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26.2@sha256:5f3787b7f902c07c7ec4f3aa91a301a3eda8133aa32661a3b3a3a86ab3a68a36 AS argocd-build
WORKDIR /go/src/github.com/argoproj/argo-cd

View file

@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.25.3@sha256:6d4e5e74f47db00f7f24da5f53c1b4198ae46862a47395e30477365458347bf2
FROM docker.io/library/golang:1.26.2@sha256:5f3787b7f902c07c7ec4f3aa91a301a3eda8133aa32661a3b3a3a86ab3a68a36
ENV DEBIAN_FRONTEND=noninteractive
@ -11,7 +11,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
unzip \
fcgiwrap \
git \
git-lfs \
make \
wget \
gcc \
@ -28,7 +27,8 @@ COPY hack/install.sh hack/tool-versions.sh ./
COPY hack/installers installers
RUN ./install.sh helm && \
INSTALL_PATH=/usr/local/bin ./install.sh kustomize
INSTALL_PATH=/usr/local/bin ./install.sh kustomize && \
./install.sh git-lfs
COPY hack/gpg-wrapper.sh \
hack/git-verify-wrapper.sh \

View file

@ -1,9 +1,10 @@
FROM node:20
FROM node:24.14.1@sha256:80fc934952c8f1b2b4d39907af7211f8a9fff1a4c2cf673fb49099292c251cec
WORKDIR /app/ui
COPY ui /app/ui
RUN yarn install
RUN npm install -g corepack@0.34.6 && corepack enable && pnpm install --frozen-lockfile
ENTRYPOINT ["pnpm", "start"]
ENTRYPOINT ["yarn", "start"]

43
MAINTAINERS.md Normal file
View file

@ -0,0 +1,43 @@
# Argo CD Maintainers
This document lists the maintainers of the Argo CD project.
## Maintainers
| Maintainer | GitHub ID | Project Roles | Affiliation |
|---------------------------|---------------------------------------------------------|----------------------|-------------------------------------------------|
| Zach Aller | [zachaller](https://github.com/zachaller) | Reviewer | [Intuit](https://www.github.com/intuit/) |
| Leonardo Luz Almeida | [leoluz](https://github.com/leoluz) | Approver | [Intuit](https://www.github.com/intuit/) |
| Chetan Banavikalmutt | [chetan-rns](https://github.com/chetan-rns) | Reviewer | [Red Hat](https://redhat.com/) |
| Keith Chong | [keithchong](https://github.com/keithchong) | Approver | [Red Hat](https://redhat.com/) |
| Alex Collins | [alexec](https://github.com/alexec) | Approver | [Intuit](https://www.github.com/intuit/) |
| Michael Crenshaw | [crenshaw-dev](https://github.com/crenshaw-dev) | Lead | [Intuit](https://www.github.com/intuit/) |
| Soumya Ghosh Dastidar | [gdsoumya](https://github.com/gdsoumya) | Approver | [Akuity](https://akuity.io/) |
| Eugene Doudine | [dudinea](https://github.com/dudinea) | Reviewer | [Octopus Deploy](https://octopus.com/) |
| Jann Fischer | [jannfis](https://github.com/jannfis) | Approver | [Red Hat](https://redhat.com/) |
| Dan Garfield | [todaywasawesome](https://github.com/todaywasawesome) | Approver(docs) | [Octopus Deploy](https://octopus.com/) |
| Alexandre Gaudreault | [agaudreault](https://github.com/agaudreault) | Approver | [Intuit](https://www.github.com/intuit/) |
| Christian Hernandez | [christianh814](https://github.com/christianh814) | Reviewer(docs) | [Akuity](https://akuity.io/) |
| Peter Jiang | [pjiang-dev](https://github.com/pjiang-dev) | Approver(docs) | [Intuit](https://www.intuit.com/) |
| Andrii Korotkov | [andrii-korotkov](https://github.com/andrii-korotkov) | Reviewer | [Verkada](https://www.verkada.com/) |
| Pasha Kostohrys | [pasha-codefresh](https://github.com/pasha-codefresh) | Approver | [Octopus Deploy](https://octopus.com/) |
| Nitish Kumar | [nitishfy](https://github.com/nitishfy) | Approver(cli,docs) | [Akuity](https://akuity.io/) |
| Justin Marquis | [34fathombelow](https://github.com/34fathombelow) | Approver(docs/ci) | [Akuity](https://akuity.io/) |
| Alexander Matyushentsev | [alexmt](https://github.com/alexmt) | Lead | [Akuity](https://akuity.io/) |
| Nicholas Morey | [morey-tech](https://github.com/morey-tech) | Reviewer(docs) | [Akuity](https://akuity.io/) |
| Papapetrou Patroklos | [ppapapetrou76](https://github.com/ppapapetrou76) | Approver(docs,cli) | [Octopus Deploy](https://octopus.com/) |
| Blake Pettersson | [blakepettersson](https://github.com/blakepettersson) | Approver | [Akuity](https://akuity.io/) |
| Ishita Sequeira | [ishitasequeira](https://github.com/ishitasequeira) | Approver | [Red Hat](https://redhat.com/) |
| Ashutosh Singh | [ashutosh16](https://github.com/ashutosh16) | Approver(docs) | [Intuit](https://www.github.com/intuit/) |
| Linghao Su | [linghaoSu](https://github.com/linghaoSu) | Reviewer | [DaoCloud](https://daocloud.io) |
| Jesse Suen | [jessesuen](https://github.com/jessesuen) | Approver | [Akuity](https://akuity.io/) |
| Yuan Tang | [terrytangyuan](https://github.com/terrytangyuan) | Reviewer | [Red Hat](https://redhat.com/) |
| William Tam | [wtam2018](https://github.com/wtam2018) | Reviewer | [Red Hat](https://redhat.com/) |
| Ryan Umstead | [rumstead](https://github.com/rumstead) | Approver | [Black Rock](https://www.github.com/blackrock/) |
| Regina Voloshin | [reggie-k](https://github.com/reggie-k) | Approver | [Octopus Deploy](https://octopus.com/) |
| Hong Wang | [wanghong230](https://github.com/wanghong230) | Reviewer | [Akuity](https://akuity.io/) |
| Jonathan West | [jgwest](https://github.com/jgwest) | Approver | [Red Hat](https://redhat.com/) |
| Jaewoo Choi | [choejwoo](https://github.com/choejwoo) | Reviewer | [Hyundai-Autoever](https://www.hyundai-autoever.com/eng/) |
| Alexy Mantha | [alexymantha](https://github.com/alexymantha) | Reviewer | GoTo |
| Kanika Rana | [ranakan19](https://github.com/ranakan19) | Reviewer | [Red Hat](https://redhat.com/) |
| Jonathan Winters | [jwinters01](https://github.com/jwinters01) | Reviewer | [Intuit](https://www.github.com/intuit/) |

View file

@ -74,17 +74,17 @@ ARGOCD_E2E_APISERVER_PORT?=8080
ARGOCD_E2E_REPOSERVER_PORT?=8081
ARGOCD_E2E_REDIS_PORT?=6379
ARGOCD_E2E_DEX_PORT?=5556
ARGOCD_E2E_YARN_HOST?=localhost
ARGOCD_E2E_JS_HOST?=localhost
ARGOCD_E2E_DISABLE_AUTH?=
ARGOCD_E2E_DIR?=/tmp/argo-e2e
ARGOCD_E2E_TEST_TIMEOUT?=90m
ARGOCD_E2E_RERUN_FAILS?=5
ARGOCD_IN_CI?=false
ARGOCD_TEST_E2E?=true
ARGOCD_BIN_MODE?=true
ARGOCD_LINT_GOGC?=20
# Depending on where we are (legacy or non-legacy pwd), we need to use
# different Docker volume mounts for our source tree
LEGACY_PATH=$(GOPATH)/src/github.com/argoproj/argo-cd
@ -113,7 +113,7 @@ define run-in-test-server
-e GOCACHE=/tmp/go-build-cache \
-e ARGOCD_IN_CI=$(ARGOCD_IN_CI) \
-e ARGOCD_E2E_TEST=$(ARGOCD_E2E_TEST) \
-e ARGOCD_E2E_YARN_HOST=$(ARGOCD_E2E_YARN_HOST) \
-e ARGOCD_E2E_JS_HOST=$(ARGOCD_E2E_JS_HOST) \
-e ARGOCD_E2E_DISABLE_AUTH=$(ARGOCD_E2E_DISABLE_AUTH) \
-e ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} \
-e ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} \
@ -144,7 +144,6 @@ define run-in-test-client
-e ARGOCD_E2E_K3S=$(ARGOCD_E2E_K3S) \
-e GITHUB_TOKEN \
-e GOCACHE=/tmp/go-build-cache \
-e ARGOCD_LINT_GOGC=$(ARGOCD_LINT_GOGC) \
-v ${DOCKER_SRC_MOUNT} \
-v ${GOPATH}/pkg/mod:/go/pkg/mod${VOLUME_MOUNT} \
-v ${GOCACHE}:/tmp/go-build-cache${VOLUME_MOUNT} \
@ -203,18 +202,35 @@ else
IMAGE_TAG?=latest
endif
# defaults for building images and manifests
ifeq (${DOCKER_PUSH},true)
ifndef IMAGE_NAMESPACE
$(error IMAGE_NAMESPACE must be set to push images (e.g. IMAGE_NAMESPACE=argoproj))
endif
endif
# Consruct prefix for docker image
# Note: keeping same logic as in hacks/update_manifests.sh
ifdef IMAGE_REGISTRY
ifdef IMAGE_NAMESPACE
IMAGE_PREFIX=${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/
else
$(error IMAGE_NAMESPACE must be set when IMAGE_REGISTRY is set (e.g. IMAGE_NAMESPACE=argoproj))
endif
else
ifdef IMAGE_NAMESPACE
# for backwards compatibility with the old way like IMAGE_NAMESPACE='quay.io/argoproj'
IMAGE_PREFIX=${IMAGE_NAMESPACE}/
else
# Neither namespace nor registry given - apply the default values
IMAGE_REGISTRY="quay.io"
IMAGE_NAMESPACE="argoproj"
IMAGE_PREFIX=${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/
endif
endif
ifndef IMAGE_REGISTRY
IMAGE_REGISTRY="quay.io"
ifndef IMAGE_REPOSITORY
IMAGE_REPOSITORY=argocd
endif
.PHONY: all
@ -337,7 +353,7 @@ controller:
build-ui:
DOCKER_BUILDKIT=1 $(DOCKER) build -t argocd-ui --platform=$(TARGET_ARCH) --target argocd-ui .
find ./ui/dist -type f -not -name gitkeep -delete
$(DOCKER) run -v ${CURRENT_DIR}/ui/dist/app:/tmp/app --rm -t argocd-ui sh -c 'cp -r ./dist/app/* /tmp/app/'
$(DOCKER) run -u $(CONTAINER_UID):$(CONTAINER_GID) -v ${CURRENT_DIR}/ui/dist/app:/tmp/app --rm -t argocd-ui sh -c 'cp -r ./dist/app/* /tmp/app/'
.PHONY: image
ifeq ($(DEV_IMAGE), true)
@ -347,23 +363,23 @@ ifeq ($(DEV_IMAGE), true)
IMAGE_TAG="dev-$(shell git describe --always --dirty)"
image: build-ui
DOCKER_BUILDKIT=1 $(DOCKER) build --platform=$(TARGET_ARCH) -t argocd-base --target argocd-base .
CGO_ENABLED=${CGO_FLAG} GOOS=linux GOARCH=amd64 GODEBUG="tarinsecurepath=0,zipinsecurepath=0" go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
GOOS=linux GOARCH=$(TARGET_ARCH:linux/%=%) GODEBUG="tarinsecurepath=0,zipinsecurepath=0" go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-application-controller
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-repo-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-cmp-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-dex
cp Dockerfile.dev dist
DOCKER_BUILDKIT=1 $(DOCKER) build --platform=$(TARGET_ARCH) -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) -f dist/Dockerfile.dev dist
DOCKER_BUILDKIT=1 $(DOCKER) build --platform=$(TARGET_ARCH) -t $(IMAGE_PREFIX)$(IMAGE_REPOSITORY):$(IMAGE_TAG) -f dist/Dockerfile.dev dist
else
image:
DOCKER_BUILDKIT=1 $(DOCKER) build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) --platform=$(TARGET_ARCH) .
DOCKER_BUILDKIT=1 $(DOCKER) build -t $(IMAGE_PREFIX)$(IMAGE_REPOSITORY):$(IMAGE_TAG) --platform=$(TARGET_ARCH) .
endif
@if [ "$(DOCKER_PUSH)" = "true" ] ; then $(DOCKER) push $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) ; fi
@if [ "$(DOCKER_PUSH)" = "true" ] ; then $(DOCKER) push $(IMAGE_PREFIX)$(IMAGE_REPOSITORY):$(IMAGE_TAG) ; fi
.PHONY: armimage
armimage:
$(DOCKER) build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG)-arm .
$(DOCKER) build -t $(IMAGE_PREFIX)(IMAGE_REPOSITORY):$(IMAGE_TAG)-arm .
.PHONY: builder-image
builder-image:
@ -395,9 +411,7 @@ lint: test-tools-image
.PHONY: lint-local
lint-local:
golangci-lint --version
# NOTE: If you get a "Killed" OOM message, try reducing the value of GOGC
# See https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
GOGC=$(ARGOCD_LINT_GOGC) GOMAXPROCS=2 golangci-lint run --fix --verbose
golangci-lint run --fix --verbose
.PHONY: lint-ui
lint-ui: test-tools-image
@ -405,7 +419,7 @@ lint-ui: test-tools-image
.PHONY: lint-ui-local
lint-ui-local:
cd ui && yarn lint
cd ui && pnpm lint
# Build all Go code
.PHONY: build
@ -429,12 +443,24 @@ test: test-tools-image
# Run all unit tests (local version)
.PHONY: test-local
test-local:
test-local: test-gitops-engine
# run if TEST_MODULE is empty or does not point to gitops-engine tests
ifneq ($(if $(TEST_MODULE),,ALL)$(filter-out github.com/argoproj/argo-cd/gitops-engine% ./gitops-engine%,$(TEST_MODULE)),)
if test "$(TEST_MODULE)" = ""; then \
DIST_DIR=${DIST_DIR} RERUN_FAILS=0 PACKAGES=`go list ./... | grep -v 'test/e2e'` ./hack/test.sh -args -test.gocoverdir="$(PWD)/test-results"; \
else \
DIST_DIR=${DIST_DIR} RERUN_FAILS=0 PACKAGES="$(TEST_MODULE)" ./hack/test.sh -args -test.gocoverdir="$(PWD)/test-results" "$(TEST_MODULE)"; \
fi
endif
# Run gitops-engine unit tests
.PHONY: test-gitops-engine
test-gitops-engine:
# run if TEST_MODULE is empty or points to gitops-engine tests
ifneq ($(if $(TEST_MODULE),,ALL)$(filter github.com/argoproj/argo-cd/gitops-engine% ./gitops-engine%,$(TEST_MODULE)),)
mkdir -p $(PWD)/test-results
cd gitops-engine && go test -race -cover ./... -args -test.gocoverdir="$(PWD)/test-results"
endif
.PHONY: test-race
test-race: test-tools-image
@ -461,7 +487,7 @@ test-e2e:
test-e2e-local: cli-local
# NO_PROXY ensures all tests don't go out through a proxy if one is configured on the test system
export GO111MODULE=off
DIST_DIR=${DIST_DIR} RERUN_FAILS=5 PACKAGES="./test/e2e" ARGOCD_E2E_RECORD=${ARGOCD_E2E_RECORD} ARGOCD_CONFIG_DIR=$(HOME)/.config/argocd-e2e ARGOCD_GPG_ENABLED=true NO_PROXY=* ./hack/test.sh -timeout $(ARGOCD_E2E_TEST_TIMEOUT) -v -args -test.gocoverdir="$(PWD)/test-results"
ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_PROGRESSIVE_SYNCS=$${ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_PROGRESSIVE_SYNCS:-true} DIST_DIR=${DIST_DIR} RERUN_FAILS=$(ARGOCD_E2E_RERUN_FAILS) PACKAGES="./test/e2e" ARGOCD_E2E_RECORD=${ARGOCD_E2E_RECORD} ARGOCD_CONFIG_DIR=$(HOME)/.config/argocd-e2e ARGOCD_GPG_ENABLED=true NO_PROXY=* ./hack/test.sh -timeout $(ARGOCD_E2E_TEST_TIMEOUT) -v -args -test.gocoverdir="$(PWD)/test-results"
# Spawns a shell in the test server container for debugging purposes
debug-test-server: test-tools-image
@ -485,13 +511,13 @@ start-e2e-local: mod-vendor-local dep-ui-local cli-local
kubectl create ns argocd-e2e-external || true
kubectl create ns argocd-e2e-external-2 || true
kubectl config set-context --current --namespace=argocd-e2e
kustomize build test/manifests/base | kubectl apply --server-side -f -
kustomize build test/manifests/base | kubectl apply --server-side --force-conflicts -f -
kubectl apply -f https://raw.githubusercontent.com/open-cluster-management/api/a6845f2ebcb186ec26b832f60c988537a58f3859/cluster/v1alpha1/0000_04_clusters.open-cluster-management.io_placementdecisions.crd.yaml
# Create GPG keys and source directories
if test -d /tmp/argo-e2e/app/config/gpg; then rm -rf /tmp/argo-e2e/app/config/gpg/*; fi
mkdir -p /tmp/argo-e2e/app/config/gpg/keys && chmod 0700 /tmp/argo-e2e/app/config/gpg/keys
mkdir -p /tmp/argo-e2e/app/config/gpg/source && chmod 0700 /tmp/argo-e2e/app/config/gpg/source
mkdir -p /tmp/argo-e2e/app/config/plugin && chmod 0700 /tmp/argo-e2e/app/config/plugin
if test -d $(ARGOCD_E2E_DIR)/app/config/gpg; then rm -rf $(ARGOCD_E2E_DIR)/app/config/gpg/*; fi
mkdir -p $(ARGOCD_E2E_DIR)/app/config/gpg/keys && chmod 0700 $(ARGOCD_E2E_DIR)/app/config/gpg/keys
mkdir -p $(ARGOCD_E2E_DIR)/app/config/gpg/source && chmod 0700 $(ARGOCD_E2E_DIR)/app/config/gpg/source
mkdir -p $(ARGOCD_E2E_DIR)/app/config/plugin && chmod 0700 $(ARGOCD_E2E_DIR)/app/config/plugin
# create folders to hold go coverage results for each component
mkdir -p /tmp/coverage/app-controller
mkdir -p /tmp/coverage/api-server
@ -500,13 +526,15 @@ start-e2e-local: mod-vendor-local dep-ui-local cli-local
mkdir -p /tmp/coverage/notification
mkdir -p /tmp/coverage/commit-server
# set paths for locally managed ssh known hosts and tls certs data
ARGOCD_SSH_DATA_PATH=/tmp/argo-e2e/app/config/ssh \
ARGOCD_TLS_DATA_PATH=/tmp/argo-e2e/app/config/tls \
ARGOCD_GPG_DATA_PATH=/tmp/argo-e2e/app/config/gpg/source \
ARGOCD_GNUPGHOME=/tmp/argo-e2e/app/config/gpg/keys \
ARGOCD_E2E_DIR=$(ARGOCD_E2E_DIR) \
ARGOCD_SSH_DATA_PATH=$(ARGOCD_E2E_DIR)/app/config/ssh \
ARGOCD_TLS_DATA_PATH=$(ARGOCD_E2E_DIR)/app/config/tls \
ARGOCD_GPG_DATA_PATH=$(ARGOCD_E2E_DIR)/app/config/gpg/source \
ARGOCD_GNUPGHOME=$(ARGOCD_E2E_DIR)/app/config/gpg/keys \
ARGOCD_GPG_ENABLED=$(ARGOCD_GPG_ENABLED) \
ARGOCD_PLUGINCONFIGFILEPATH=/tmp/argo-e2e/app/config/plugin \
ARGOCD_PLUGINSOCKFILEPATH=/tmp/argo-e2e/app/config/plugin \
ARGOCD_PLUGINCONFIGFILEPATH=$(ARGOCD_E2E_DIR)/app/config/plugin \
ARGOCD_PLUGINSOCKFILEPATH=$(ARGOCD_E2E_DIR)/app/config/plugin \
ARGOCD_GIT_CONFIG=$(PWD)/test/e2e/fixture/gitconfig \
ARGOCD_E2E_DISABLE_AUTH=false \
ARGOCD_ZJWT_FEATURE_FLAG=always \
ARGOCD_IN_CI=$(ARGOCD_IN_CI) \
@ -634,8 +662,17 @@ install-go-tools-local:
dep-ui: test-tools-image
$(call run-in-test-client,make dep-ui-local)
.PHONY: dep-ui-local
dep-ui-local:
cd ui && yarn install
cd ui && pnpm install --frozen-lockfile
.PHONY: run-pnpm
run-pnpm: test-tools-image
$(call run-in-test-client,make 'PNPM_COMMAND=$(PNPM_COMMAND)' run-pnpm-local)
.PHONY: run-pnpm-local
run-pnpm-local:
cd ui && pnpm $(PNPM_COMMAND)
start-test-k8s:
go run ./hack/k8s

View file

@ -1,14 +1,14 @@
controller: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/app-controller} HOSTNAME=testappcontroller-1 FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-application-controller $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --commit-server localhost:${ARGOCD_E2E_COMMITSERVER_PORT:-8086} --otlp-address=${ARGOCD_OTLP_ADDRESS} --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''} --server-side-diff-enabled=${ARGOCD_APPLICATION_CONTROLLER_SERVER_SIDE_DIFF:-'false'} --hydrator-enabled=${ARGOCD_HYDRATOR_ENABLED:='false'}"
api-server: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/api-server} FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-server $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --disable-auth=${ARGOCD_E2E_DISABLE_AUTH:-'true'} --insecure --dex-server http://localhost:${ARGOCD_E2E_DEX_PORT:-5556} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --port ${ARGOCD_E2E_APISERVER_PORT:-8080} --otlp-address=${ARGOCD_OTLP_ADDRESS} --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''} --hydrator-enabled=${ARGOCD_HYDRATOR_ENABLED:='false'}"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v3/cmd gendexcfg -o `pwd`/dist/dex.yaml && (test -f dist/dex.yaml || { echo 'Failed to generate dex configuration'; exit 1; }) && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:$(grep "image: ghcr.io/dexidp/dex" manifests/base/dex/argocd-dex-server-deployment.yaml | cut -d':' -f3) dex serve /dex.yaml"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v3/cmd gendexcfg -o `pwd`/dist/dex.yaml && (test -f dist/dex.yaml || { echo 'Failed to generate dex configuration'; exit 1; }) && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:$(grep "image: ghcr.io/dexidp/dex:v2.45.0" manifests/base/dex/argocd-dex-server-deployment.yaml | cut -d':' -f3) dex serve /dex.yaml"
redis: hack/start-redis-with-password.sh
repo-server: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/repo-server} FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-./test/cmp} ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-repo-server ARGOCD_GPG_ENABLED=${ARGOCD_GPG_ENABLED:-false} $COMMAND --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --otlp-address=${ARGOCD_OTLP_ADDRESS}"
repo-server: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "export PATH=\$(pwd)/dist:\$PATH && [ -n \"\$ARGOCD_GIT_CONFIG\" ] && export GIT_CONFIG_GLOBAL=\$ARGOCD_GIT_CONFIG && export GIT_CONFIG_NOSYSTEM=1; GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/repo-server} FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-./test/cmp} ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-repo-server ARGOCD_GPG_ENABLED=${ARGOCD_GPG_ENABLED:-false} $COMMAND --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --otlp-address=${ARGOCD_OTLP_ADDRESS}"
cmp-server: [ "$ARGOCD_E2E_TEST" = 'true' ] && exit 0 || [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_BINARY_NAME=argocd-cmp-server ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-./test/cmp} $COMMAND --config-dir-path ./test/cmp --loglevel debug --otlp-address=${ARGOCD_OTLP_ADDRESS}"
commit-server: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/commit-server} FORCE_LOG_COLORS=1 ARGOCD_BINARY_NAME=argocd-commit-server $COMMAND --loglevel debug --port ${ARGOCD_E2E_COMMITSERVER_PORT:-8086}"
ui: sh -c 'cd ui && ${ARGOCD_E2E_YARN_CMD:-yarn} start'
ui: sh -c 'cd ui && ${ARGOCD_E2E_PNPM_CMD:-pnpm} start'
git-server: test/fixture/testrepos/start-git.sh
helm-registry: test/fixture/testrepos/start-helm-registry.sh
oci-registry: test/fixture/testrepos/start-authenticated-helm-registry.sh
dev-mounter: [ "$ARGOCD_E2E_TEST" != "true" ] && go run hack/dev-mounter/main.go --configmap argocd-ssh-known-hosts-cm=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} --configmap argocd-tls-certs-cm=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} --configmap argocd-gpg-keys-cm=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source}
applicationset-controller: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/applicationset-controller} FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-applicationset-controller $COMMAND --loglevel debug --metrics-addr localhost:12345 --probe-addr localhost:12346 --argocd-repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
notification: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/notification} FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_BINARY_NAME=argocd-notifications $COMMAND --loglevel debug --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''} --self-service-notification-enabled=${ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED:-'false'}"
applicationset-controller: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/applicationset-controller} FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-applicationset-controller ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_PROGRESSIVE_SYNCS=${ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_PROGRESSIVE_SYNCS:-true} $COMMAND --loglevel debug --metrics-addr localhost:12345 --probe-addr localhost:12346 --argocd-repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
notification: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "GOCOVERDIR=${ARGOCD_COVERAGE_DIR:-/tmp/coverage/notification} FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_BINARY_NAME=argocd-notifications $COMMAND --loglevel debug --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''} --self-service-notification-enabled=${ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED:-'false'}"

View file

@ -13,12 +13,13 @@
[![Twitter Follow](https://img.shields.io/twitter/follow/argoproj?style=social)](https://twitter.com/argoproj)
[![Slack](https://img.shields.io/badge/slack-argoproj-brightgreen.svg?logo=slack)](https://argoproj.github.io/community/join-slack)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-argoproj-blue.svg?logo=linkedin)](https://www.linkedin.com/company/argoproj/)
[![Bluesky](https://img.shields.io/badge/Bluesky-argoproj-blue.svg?style=social&logo=bluesky)](https://bsky.app/profile/argoproj.bsky.social)
# Argo CD - Declarative Continuous Delivery for Kubernetes
## What is Argo CD?
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
Argo CD is a declarative GitOps continuous delivery tool for Kubernetes.
![Argo CD UI](docs/assets/argocd-ui.gif)
@ -44,7 +45,7 @@ Check live demo at https://cd.apps.argoproj.io/.
You can reach the Argo CD community and developers via the following channels:
* Q & A : [Github Discussions](https://github.com/argoproj/argo-cd/discussions)
* Q & A : [GitHub Discussions](https://github.com/argoproj/argo-cd/discussions)
* Chat : [The #argo-cd Slack channel](https://argoproj.github.io/community/join-slack)
* Contributors Office Hours: [Every Thursday](https://calendar.google.com/calendar/u/0/embed?src=argoproj@gmail.com) | [Agenda](https://docs.google.com/document/d/1xkoFkVviB70YBzSEa4bDnu-rUZ1sIFtwKKG1Uw8XsY8)
* User Community meeting: [First Wednesday of the month](https://calendar.google.com/calendar/u/0/embed?src=argoproj@gmail.com) | [Agenda](https://docs.google.com/document/d/1ttgw98MO45Dq7ZUHpIiOIEfbyeitKHNfMjbY5dLLMKQ)

View file

@ -3,9 +3,9 @@ header:
expiration-date: '2024-10-31T00:00:00.000Z' # One year from initial release.
last-updated: '2023-10-27'
last-reviewed: '2023-10-27'
commit-hash: 06ef059f9fc7cf9da2dfaef2a505ee1e3c693485
commit-hash: d91a2ab3bf1b1143fb273fa06f54073fc78f41f1
project-url: https://github.com/argoproj/argo-cd
project-release: v3.3.0
project-release: v3.5.0
changelog: https://github.com/argoproj/argo-cd/releases
license: https://github.com/argoproj/argo-cd/blob/master/LICENSE
project-lifecycle:

View file

@ -48,6 +48,23 @@ otherwise very intrusive, and there's a workaround available, we may decide to
provide a forward-fix only, e.g. to be released the next minor release, instead
of releasing it within a patch branch for the currently supported releases.
## Dependency Upgrade Policy
Argo CD relies on certain binaries and libraries that might appear in security scanners.
Upgrading certain dependencies, such as Helm, Kustomize, and git, may have negative impacts
on users, as they may include breaking changes or changes in behavior. For this reason,
we will only upgrade to new patch versions within the same minor version series within
a supported Argo CD version. For example, if we are currently on Helm 3.12.0 and Argo CD
3.4.0, we will only upgrade to Helm 3.12.x within Argo CD 3.4.x, and not to Helm 3.13.0
or later.
If there is a critical, _exploitable_ vulnerability in a dependency that will not be fixed
in a patch release, we will evaluate the impact of the vulnerability and the risk of not
upgrading the dependency. We ask that, if you believe a version bump is justified, please
open an issue _describing how the vulnerability is exploitable in the context of Argo CD_,
and we will evaluate it and decide whether or not to upgrade the dependency.
## Reporting a Vulnerability
If you find a security related bug in Argo CD, we kindly ask you for responsible
@ -63,24 +80,7 @@ We will publish security advisories using the
feature to keep our community well-informed, and will credit you for your
findings (unless you prefer to stay anonymous, of course).
There are two ways to report a vulnerability to the Argo CD team:
* By opening a draft GitHub security advisory: https://github.com/argoproj/argo-cd/security/advisories/new
* By e-mail to the following address: cncf-argo-security@lists.cncf.io
## Internet Bug Bounty collaboration
We're happy to announce that the Argo project is collaborating with the great
folks over at
[Hacker One](https://hackerone.com/) and their
[Internet Bug Bounty program](https://hackerone.com/ibb)
to reward the awesome people who find security vulnerabilities in the four
main Argo projects (CD, Events, Rollouts and Workflows) and then work with
us to fix and disclose them in a responsible manner.
If you report a vulnerability to us as outlined in this security policy, we
will work together with you to find out whether your finding is eligible for
claiming a bounty, and also on how to claim it.
To report a vulnerability to the Argo CD team a draft GitHub security advisory: https://github.com/argoproj/argo-cd/security/advisories/new
## Securing your Argo CD Instance

View file

@ -1,6 +1,10 @@
load('ext://restart_process', 'docker_build_with_restart')
load('ext://uibutton', 'cmd_button', 'location')
# tilt version should be >= v0.37.0 for k8s_server_side_apply tilt-dev/tilt#6680
update_settings(
k8s_server_side_apply="true",
)
# add ui button in web ui to run make codegen-local (top nav)
cmd_button(
'make codegen-local',
@ -52,6 +56,7 @@ local_resource(
'build',
'CGO_ENABLED=0 GOOS=linux GOARCH=' + arch + ' go build -gcflags="all=-N -l" -mod=readonly -o .tilt-bin/argocd_linux cmd/main.go',
deps = code_deps,
ignore = ['**/*_test.go'],
allow_parallel=True,
)
@ -60,7 +65,7 @@ k8s_yaml(kustomize('manifests/dev-tilt'))
# build dev image
docker_build_with_restart(
'argocd',
'quay.io/argoproj/argocd:latest',
context='.',
dockerfile='Dockerfile.tilt',
entrypoint=[
@ -252,11 +257,11 @@ k8s_resource(
# ui dependencies
local_resource(
'node-modules',
'yarn',
'pnpm install',
dir='ui',
deps = [
'ui/package.json',
'ui/yarn.lock',
'ui/pnpm-lock.yaml',
],
allow_parallel=True,
)
@ -266,11 +271,11 @@ docker_build(
'argocd-ui',
context='.',
dockerfile='Dockerfile.ui.tilt',
entrypoint=['sh', '-c', 'cd /app/ui && yarn start'],
entrypoint=['sh', '-c', 'cd /app/ui && pnpm start'],
only=['ui'],
live_update=[
sync('ui', '/app/ui'),
run('sh -c "cd /app/ui && yarn install"', trigger=['/app/ui/package.json', '/app/ui/yarn.lock']),
run('sh -c "cd /app/ui && pnpm install --frozen-lockfile"', trigger=['/app/ui/package.json', '/app/ui/pnpm-lock.yaml']),
],
)

View file

@ -7,7 +7,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [100ms](https://www.100ms.ai/)
1. [127Labs](https://127labs.com/)
1. [3Rein](https://www.3rein.com/)
1. [3Rein](https://3reinmedia.com/)
1. [42 School](https://42.fr/)
1. [4data](https://4data.ch/)
1. [7shifts](https://www.7shifts.com/)
@ -31,8 +31,8 @@ Currently, the following organizations are **officially** using Argo CD:
1. [ANSTO - Australian Synchrotron](https://www.synchrotron.org.au/)
1. [Ant Group](https://www.antgroup.com/)
1. [AppDirect](https://www.appdirect.com)
1. [Arcadia](https://www.arcadia.io)
1. [Arctiq Inc.](https://www.arctiq.ca)
1. [Arcadia](https://arcadia.io/)
1. [Arctiq Inc.](https://arctiq.com/)
1. [Artemis Health by Nomi Health](https://www.artemishealth.com/)
1. [Arturia](https://www.arturia.com)
1. [ARZ Allgemeines Rechenzentrum GmbH](https://www.arz.at/)
@ -65,6 +65,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Candis](https://www.candis.io)
1. [Capital One](https://www.capitalone.com)
1. [Capptain LTD](https://capptain.co/)
1. [Car & Classic](https://www.carandclassic.com)
1. [CARFAX Europe](https://www.carfax.eu)
1. [CARFAX](https://www.carfax.com)
1. [Carrefour Group](https://www.carrefour.com)
@ -75,6 +76,8 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Chargetrip](https://chargetrip.com)
1. [Chime](https://www.chime.com)
1. [Chronicle Labs](https://chroniclelabs.org)
1. [C.H.Robinson ](https://www.chrobinson.com)
1. [Circle](https://circle.com/)
1. [Cisco ET&I](https://eti.cisco.com/)
1. [Close](https://www.close.com/)
1. [Cloud Posse](https://www.cloudposse.com/)
@ -147,14 +150,14 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Getir](https://getir.com)
1. [GetYourGuide](https://www.getyourguide.com/)
1. [Gitpod](https://www.gitpod.io)
1. [Gllue](https://gllue.com)
1. [Gllue](https://www.gllue.com/)
1. [gloat](https://gloat.com/)
1. [GLOBIS](https://globis.com)
1. [Glovo](https://www.glovoapp.com)
1. [GlueOps](https://glueops.dev)
1. [GMETRI](https://gmetri.com/)
1. [Gojek](https://www.gojek.io/)
1. [GoTo Financial](https://gotofinancial.com/)
1. [GoTo Financial](https://www.gotocompany.com/en/products/goto-financial)
1. [GoTo](https://www.goto.com/)
1. [Greenpass](https://www.greenpass.com.br/)
1. [Gridfuse](https://gridfuse.com/)
@ -165,7 +168,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Healy](https://www.healyworld.net)
1. [Helio](https://helio.exchange)
1. [hetao101](https://www.hetao101.com/)
1. [Hetki](https://hetki.ai)
1. [Hetki](https://hetki.io/)
1. [hipages](https://hipages.com.au/)
1. [Hiya](https://hiya.com)
1. [Honestbank](https://honestbank.com)
@ -177,7 +180,8 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Icelandair](https://www.icelandair.com)
1. [IFS](https://www.ifs.com)
1. [IITS-Consulting](https://iits-consulting.de)
1. [IllumiDesk](https://www.illumidesk.com)
1. [IllumiDesk](https://illumichat.com/)
1. [Imagine Learning](https://www.imaginelearning.com/)
1. [imaware](https://imaware.health)
1. [Indeed](https://indeed.com)
1. [Index Exchange](https://www.indexexchange.com/)
@ -208,10 +212,11 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Kurly](https://www.kurly.com/)
1. [Kvist](https://kvistsolutions.com)
1. [Kyriba](https://www.kyriba.com/)
1. [Lattice](https://lattice.com)
1. [LeFigaro](https://www.lefigaro.fr/)
1. [Lely](https://www.lely.com/)
1. [LexisNexis](https://www.lexisnexis.com/)
1. [Lian Chu Securities](https://lczq.com)
1. [Lian Chu Securities](https://www.lczq.com/)
1. [Liatrio](https://www.liatrio.com)
1. [Lightricks](https://www.lightricks.com/)
1. [Loom](https://www.loom.com/)
@ -237,6 +242,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Mission Lane](https://missionlane.com)
1. [mixi Group](https://mixi.co.jp/)
1. [Moengage](https://www.moengage.com/)
1. [Mollie](https://www.mollie.com/)
1. [Money Forward](https://corp.moneyforward.com/en/)
1. [MongoDB](https://www.mongodb.com/)
1. [MOO Print](https://www.moo.com/)
@ -244,7 +250,8 @@ Currently, the following organizations are **officially** using Argo CD:
1. [MTN Group](https://www.mtn.com/)
1. [Municipality of The Hague](https://www.denhaag.nl/)
1. [My Job Glasses](https://myjobglasses.com)
1. [Natura &Co](https://naturaeco.com/)
1. [Natura &Co](https://ri.natura.com.br/)
1. [Netease Cloud Music](https://music.163.com/)
1. [Nethopper](https://nethopper.io)
1. [New Relic](https://newrelic.com/)
1. [Nextbasket](https://nextbasket.com)
@ -274,7 +281,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Orbital Insight](https://orbitalinsight.com/)
1. [Oscar Health Insurance](https://hioscar.com/)
1. [Outpost24](https://outpost24.com/)
1. [p3r](https://www.p3r.one/)
1. [p3r](https://persona.atlus.com/p3r/)
1. [Packlink](https://www.packlink.com/)
1. [PagerDuty](https://www.pagerduty.com/)
1. [Pandosearch](https://www.pandosearch.com/en/home)
@ -292,6 +299,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Pismo](https://pismo.io/)
1. [PITS Globale Datenrettungsdienste](https://www.pitsdatenrettung.de/)
1. [Platform9 Systems](https://platform9.com/)
1. [Playground Tech](https://playgroundgroup.io)
1. [Polarpoint.io](https://polarpoint.io)
1. [Pollinate](https://www.pollinate.global)
1. [PostFinance](https://github.com/postfinance)
@ -328,6 +336,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Salad Technologies](https://salad.com/)
1. [Saloodo! GmbH](https://www.saloodo.com)
1. [Sap Labs](http://sap.com)
1. [SAP Signavio](https://www.signavio.com)
1. [Sauce Labs](https://saucelabs.com/)
1. [Schneider Electric](https://www.se.com)
1. [Schwarz IT](https://jobs.schwarz/it-mission)
@ -375,6 +384,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Tailor Brands](https://www.tailorbrands.com)
1. [Tamkeen Technologies](https://tamkeentech.sa/)
1. [TBC Bank](https://tbcbank.ge/)
1. [Techcom Securities](https://www.tcbs.com.vn/)
1. [Techcombank](https://www.techcombank.com.vn/trang-chu)
1. [Technacy](https://www.technacy.it/)
1. [Telavita](https://www.telavita.com.br/)
@ -415,18 +425,18 @@ Currently, the following organizations are **officially** using Argo CD:
1. [VSHN - The DevOps Company](https://vshn.ch/)
1. [Wakacje.pl](https://www.wakacje.pl/)
1. [Walkbase](https://www.walkbase.com/)
1. [Webstores](https://www.webstores.nl)
1. [Webstores](https://www.friday.nl/)
1. [Wehkamp](https://www.wehkamp.nl/)
1. [WeMaintain](https://www.wemaintain.com/)
1. [WeMo Scooter](https://www.wemoscooter.com/)
1. [Whitehat Berlin](https://whitehat.berlin) by Guido Maria Serra +Fenaroli
1. [Witick](https://witick.io/)
1. [Witick](https://www.witik.io/en/)
1. [Wolffun Game](https://www.wolffungame.com/)
1. [WooliesX](https://wooliesx.com.au/)
1. [Woolworths Group](https://www.woolworthsgroup.com.au/)
1. [WSpot](https://www.wspot.com.br/)
1. [X3M ads](https://x3mads.com)
1. [Yieldlab](https://www.yieldlab.de/)
1. [Yieldlab](https://virtualminds.com/)
1. [Youverify](https://youverify.co/)
1. [Yubo](https://www.yubo.live/)
1. [Yuno](https://y.uno/)

View file

@ -1 +1 @@
3.3.0
3.5.0

View file

@ -20,14 +20,17 @@ import (
"fmt"
"reflect"
"runtime/debug"
"slices"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
log "github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -37,7 +40,6 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/retry"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
@ -47,7 +49,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/predicate"
"github.com/argoproj/gitops-engine/pkg/health"
"github.com/argoproj/argo-cd/gitops-engine/pkg/health"
"github.com/argoproj/argo-cd/v3/applicationset/controllers/template"
"github.com/argoproj/argo-cd/v3/applicationset/generators"
@ -57,6 +59,7 @@ import (
"github.com/argoproj/argo-cd/v3/common"
applog "github.com/argoproj/argo-cd/v3/util/app/log"
"github.com/argoproj/argo-cd/v3/util/db"
"github.com/argoproj/argo-cd/v3/util/settings"
argov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
argoutil "github.com/argoproj/argo-cd/v3/util/argo"
@ -73,6 +76,9 @@ const (
ReconcileRequeueOnValidationError = time.Minute * 3
ReverseDeletionOrder = "Reverse"
AllAtOnceDeletionOrder = "AllAtOnce"
revisionAndSpecChangedMsg = "Application has pending changes (revision and spec differ), setting status to Waiting"
revisionChangedMsg = "Application has pending changes, setting status to Waiting"
specChangedMsg = "Application has pending changes (spec differs), setting status to Waiting"
)
var defaultPreservedFinalizers = []string{
@ -102,14 +108,16 @@ type ApplicationSetReconciler struct {
Policy argov1alpha1.ApplicationsSyncPolicy
EnablePolicyOverride bool
utils.Renderer
ArgoCDNamespace string
ApplicationSetNamespaces []string
EnableProgressiveSyncs bool
SCMRootCAPath string
GlobalPreservedAnnotations []string
GlobalPreservedLabels []string
Metrics *metrics.ApplicationsetMetrics
MaxResourcesStatusCount int
ArgoCDNamespace string
ApplicationSetNamespaces []string
EnableProgressiveSyncs bool
SCMRootCAPath string
GlobalPreservedAnnotations []string
GlobalPreservedLabels []string
Metrics *metrics.ApplicationsetMetrics
MaxResourcesStatusCount int
ClusterInformer *settings.ClusterInformer
ConcurrentApplicationUpdates int
}
// +kubebuilder:rbac:groups=argoproj.io,resources=applicationsets,verbs=get;list;watch;create;update;patch;delete
@ -241,11 +249,6 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
return ctrl.Result{}, fmt.Errorf("failed to get current applications for application set: %w", err)
}
err = r.updateResourcesStatus(ctx, logCtx, &applicationSetInfo, currentApplications)
if err != nil {
return ctrl.Result{}, fmt.Errorf("failed to get update resources status for application set: %w", err)
}
// appSyncMap tracks which apps will be synced during this reconciliation.
appSyncMap := map[string]bool{}
@ -369,6 +372,16 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
}
}
// Update resources status after create/update/delete so it reflects the actual cluster state.
currentApplications, err = r.getCurrentApplications(ctx, applicationSetInfo)
if err != nil {
return ctrl.Result{}, fmt.Errorf("failed to get current applications for application set: %w", err)
}
err = r.updateResourcesStatus(ctx, logCtx, &applicationSetInfo, currentApplications)
if err != nil {
return ctrl.Result{}, fmt.Errorf("failed to update resources status for application set: %w", err)
}
if applicationSetInfo.RefreshRequired() {
delete(applicationSetInfo.Annotations, common.AnnotationApplicationSetRefresh)
err := r.Update(ctx, &applicationSetInfo)
@ -669,8 +682,9 @@ func (r *ApplicationSetReconciler) SetupWithManager(mgr ctrl.Manager, enableProg
Watches(
&corev1.Secret{},
&clusterSecretEventHandler{
Client: mgr.GetClient(),
Log: log.WithField("type", "createSecretEventHandler"),
Client: mgr.GetClient(),
Log: log.WithField("type", "createSecretEventHandler"),
ApplicationSetNamespaces: r.ApplicationSetNamespaces,
}).
Complete(r)
}
@ -680,108 +694,133 @@ func (r *ApplicationSetReconciler) SetupWithManager(mgr ctrl.Manager, enableProg
// - For existing application, it will call update
// The function also adds owner reference to all applications, and uses it to delete them.
func (r *ApplicationSetReconciler) createOrUpdateInCluster(ctx context.Context, logCtx *log.Entry, applicationSet argov1alpha1.ApplicationSet, desiredApplications []argov1alpha1.Application) error {
var firstError error
// Creates or updates the application in appList
for _, generatedApp := range desiredApplications {
appLog := logCtx.WithFields(applog.GetAppLogFields(&generatedApp))
// Build the diff config once per reconcile.
// Diff config is per applicationset, so generate it once for all applications
diffConfig, err := utils.BuildIgnoreDiffConfig(applicationSet.Spec.IgnoreApplicationDifferences, normalizers.IgnoreNormalizerOpts{})
if err != nil {
return fmt.Errorf("failed to build ignore diff config: %w", err)
}
g, ctx := errgroup.WithContext(ctx)
concurrency := r.concurrency()
g.SetLimit(concurrency)
var appErrorsMu sync.Mutex
appErrors := map[string]error{}
for _, generatedApp := range desiredApplications {
// Normalize to avoid fighting with the application controller.
generatedApp.Spec = *argoutil.NormalizeApplicationSpec(&generatedApp.Spec)
g.Go(func() error {
appLog := logCtx.WithFields(applog.GetAppLogFields(&generatedApp))
found := &argov1alpha1.Application{
ObjectMeta: metav1.ObjectMeta{
Name: generatedApp.Name,
Namespace: generatedApp.Namespace,
},
TypeMeta: metav1.TypeMeta{
Kind: application.ApplicationKind,
APIVersion: "argoproj.io/v1alpha1",
},
}
action, err := utils.CreateOrUpdate(ctx, appLog, r.Client, applicationSet.Spec.IgnoreApplicationDifferences, normalizers.IgnoreNormalizerOpts{}, found, func() error {
// Copy only the Application/ObjectMeta fields that are significant, from the generatedApp
found.Spec = generatedApp.Spec
// allow setting the Operation field to trigger a sync operation on an Application
if generatedApp.Operation != nil {
found.Operation = generatedApp.Operation
found := &argov1alpha1.Application{
ObjectMeta: metav1.ObjectMeta{
Name: generatedApp.Name,
Namespace: generatedApp.Namespace,
},
TypeMeta: metav1.TypeMeta{
Kind: application.ApplicationKind,
APIVersion: "argoproj.io/v1alpha1",
},
}
preservedAnnotations := make([]string, 0)
preservedLabels := make([]string, 0)
action, err := utils.CreateOrUpdate(ctx, appLog, r.Client, diffConfig, found, func() error {
// Copy only the Application/ObjectMeta fields that are significant, from the generatedApp
found.Spec = generatedApp.Spec
if applicationSet.Spec.PreservedFields != nil {
preservedAnnotations = append(preservedAnnotations, applicationSet.Spec.PreservedFields.Annotations...)
preservedLabels = append(preservedLabels, applicationSet.Spec.PreservedFields.Labels...)
}
if len(r.GlobalPreservedAnnotations) > 0 {
preservedAnnotations = append(preservedAnnotations, r.GlobalPreservedAnnotations...)
}
if len(r.GlobalPreservedLabels) > 0 {
preservedLabels = append(preservedLabels, r.GlobalPreservedLabels...)
}
// Preserve specially treated argo cd annotations:
// * https://github.com/argoproj/applicationset/issues/180
// * https://github.com/argoproj/argo-cd/issues/10500
preservedAnnotations = append(preservedAnnotations, defaultPreservedAnnotations...)
for _, key := range preservedAnnotations {
if state, exists := found.Annotations[key]; exists {
if generatedApp.Annotations == nil {
generatedApp.Annotations = map[string]string{}
}
generatedApp.Annotations[key] = state
// allow setting the Operation field to trigger a sync operation on an Application
if generatedApp.Operation != nil {
found.Operation = generatedApp.Operation
}
}
for _, key := range preservedLabels {
if state, exists := found.Labels[key]; exists {
if generatedApp.Labels == nil {
generatedApp.Labels = map[string]string{}
}
generatedApp.Labels[key] = state
preservedAnnotations := make([]string, 0)
preservedLabels := make([]string, 0)
if applicationSet.Spec.PreservedFields != nil {
preservedAnnotations = append(preservedAnnotations, applicationSet.Spec.PreservedFields.Annotations...)
preservedLabels = append(preservedLabels, applicationSet.Spec.PreservedFields.Labels...)
}
}
// Preserve deleting finalizers and avoid diff conflicts
for _, finalizer := range defaultPreservedFinalizers {
for _, f := range found.Finalizers {
// For finalizers, use prefix matching in case it contains "/" stages
if strings.HasPrefix(f, finalizer) {
generatedApp.Finalizers = append(generatedApp.Finalizers, f)
if len(r.GlobalPreservedAnnotations) > 0 {
preservedAnnotations = append(preservedAnnotations, r.GlobalPreservedAnnotations...)
}
if len(r.GlobalPreservedLabels) > 0 {
preservedLabels = append(preservedLabels, r.GlobalPreservedLabels...)
}
// Preserve specially treated argo cd annotations:
// * https://github.com/argoproj/applicationset/issues/180
// * https://github.com/argoproj/argo-cd/issues/10500
preservedAnnotations = append(preservedAnnotations, defaultPreservedAnnotations...)
for _, key := range preservedAnnotations {
if state, exists := found.Annotations[key]; exists {
if generatedApp.Annotations == nil {
generatedApp.Annotations = map[string]string{}
}
generatedApp.Annotations[key] = state
}
}
for _, key := range preservedLabels {
if state, exists := found.Labels[key]; exists {
if generatedApp.Labels == nil {
generatedApp.Labels = map[string]string{}
}
generatedApp.Labels[key] = state
}
}
// Preserve deleting finalizers and avoid diff conflicts
for _, finalizer := range defaultPreservedFinalizers {
for _, f := range found.Finalizers {
// For finalizers, use prefix matching in case it contains "/" stages
if strings.HasPrefix(f, finalizer) {
generatedApp.Finalizers = append(generatedApp.Finalizers, f)
}
}
}
found.Annotations = generatedApp.Annotations
found.Labels = generatedApp.Labels
found.Finalizers = generatedApp.Finalizers
return controllerutil.SetControllerReference(&applicationSet, found, r.Scheme)
})
if err != nil {
appLog.WithError(err).WithField("action", action).Errorf("failed to %s Application", action)
// If the context was canceled or its deadline exceeded, return the error so it propagates through g.Wait().
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return err
}
// For backwards compatibility with sequential behavior: continue processing other applications
// but record the error keyed by app name so we can deterministically return the error from
// the lexicographically first failing app, regardless of goroutine scheduling order.
appErrorsMu.Lock()
appErrors[generatedApp.Name] = err
appErrorsMu.Unlock()
return nil
}
found.Annotations = generatedApp.Annotations
found.Labels = generatedApp.Labels
found.Finalizers = generatedApp.Finalizers
return controllerutil.SetControllerReference(&applicationSet, found, r.Scheme)
if action != controllerutil.OperationResultNone {
// Don't pollute etcd with "unchanged Application" events
r.Recorder.Eventf(&applicationSet, corev1.EventTypeNormal, fmt.Sprint(action), "%s Application %q", action, generatedApp.Name)
appLog.Logf(log.InfoLevel, "%s Application", action)
} else {
// "unchanged Application" can be inferred by Reconcile Complete with no action being listed
// Or enable debug logging
appLog.Logf(log.DebugLevel, "%s Application", action)
}
return nil
})
if err != nil {
appLog.WithError(err).WithField("action", action).Errorf("failed to %s Application", action)
if firstError == nil {
firstError = err
}
continue
}
if action != controllerutil.OperationResultNone {
// Don't pollute etcd with "unchanged Application" events
r.Recorder.Eventf(&applicationSet, corev1.EventTypeNormal, fmt.Sprint(action), "%s Application %q", action, generatedApp.Name)
appLog.Logf(log.InfoLevel, "%s Application", action)
} else {
// "unchanged Application" can be inferred by Reconcile Complete with no action being listed
// Or enable debug logging
appLog.Logf(log.DebugLevel, "%s Application", action)
}
}
return firstError
if err := g.Wait(); errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return err
}
return firstAppError(appErrors)
}
// createInCluster will filter from the desiredApplications only the application that needs to be created
@ -824,7 +863,7 @@ func (r *ApplicationSetReconciler) getCurrentApplications(ctx context.Context, a
// deleteInCluster will delete Applications that are currently on the cluster, but not in appList.
// The function must be called after all generators had been called and generated applications
func (r *ApplicationSetReconciler) deleteInCluster(ctx context.Context, logCtx *log.Entry, applicationSet argov1alpha1.ApplicationSet, desiredApplications []argov1alpha1.Application) error {
clusterList, err := utils.ListClusters(ctx, r.KubeClientset, r.ArgoCDNamespace)
clusterList, err := utils.ListClusters(r.ClusterInformer)
if err != nil {
return fmt.Errorf("error listing clusters: %w", err)
}
@ -841,36 +880,84 @@ func (r *ApplicationSetReconciler) deleteInCluster(ctx context.Context, logCtx *
m[app.Name] = true
}
// Delete apps that are not in m[string]bool
var firstError error
for _, app := range current {
logCtx = logCtx.WithFields(applog.GetAppLogFields(&app))
_, exists := m[app.Name]
g, ctx := errgroup.WithContext(ctx)
concurrency := r.concurrency()
g.SetLimit(concurrency)
if !exists {
var appErrorsMu sync.Mutex
appErrors := map[string]error{}
// Delete apps that are not in m[string]bool
for _, app := range current {
_, exists := m[app.Name]
if exists {
continue
}
appLogCtx := logCtx.WithFields(applog.GetAppLogFields(&app))
g.Go(func() error {
// Removes the Argo CD resources finalizer if the application contains an invalid target (eg missing cluster)
err := r.removeFinalizerOnInvalidDestination(ctx, applicationSet, &app, clusterList, logCtx)
err := r.removeFinalizerOnInvalidDestination(ctx, applicationSet, &app, clusterList, appLogCtx)
if err != nil {
logCtx.WithError(err).Error("failed to update Application")
if firstError != nil {
firstError = err
appLogCtx.WithError(err).Error("failed to update Application")
// If the context was canceled or its deadline exceeded, return the error so it propagates through g.Wait().
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return err
}
continue
// For backwards compatibility with sequential behavior: continue processing other applications
// but record the error keyed by app name so we can deterministically return the error from
// the lexicographically first failing app, regardless of goroutine scheduling order.
appErrorsMu.Lock()
appErrors[app.Name] = err
appErrorsMu.Unlock()
return nil
}
err = r.Delete(ctx, &app)
if err != nil {
logCtx.WithError(err).Error("failed to delete Application")
if firstError != nil {
firstError = err
appLogCtx.WithError(err).Error("failed to delete Application")
// If the context was canceled or its deadline exceeded, return the error so it propagates through g.Wait().
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return err
}
continue
appErrorsMu.Lock()
appErrors[app.Name] = err
appErrorsMu.Unlock()
return nil
}
r.Recorder.Eventf(&applicationSet, corev1.EventTypeNormal, "Deleted", "Deleted Application %q", app.Name)
logCtx.Log(log.InfoLevel, "Deleted application")
}
appLogCtx.Log(log.InfoLevel, "Deleted application")
return nil
})
}
return firstError
if err := g.Wait(); errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return err
}
return firstAppError(appErrors)
}
// concurrency returns the configured number of concurrent application updates, defaulting to 1.
func (r *ApplicationSetReconciler) concurrency() int {
if r.ConcurrentApplicationUpdates <= 0 {
return 1
}
return r.ConcurrentApplicationUpdates
}
// firstAppError returns the error associated with the lexicographically smallest application name
// in the provided map. This gives a deterministic result when multiple goroutines may have
// recorded errors concurrently, matching the behavior of the original sequential loop where the
// first application in iteration order would determine the returned error.
func firstAppError(appErrors map[string]error) error {
if len(appErrors) == 0 {
return nil
}
names := make([]string, 0, len(appErrors))
for name := range appErrors {
names = append(names, name)
}
sort.Strings(names)
return appErrors[names[0]]
}
// removeFinalizerOnInvalidDestination removes the Argo CD resources finalizer if the application contains an invalid target (eg missing cluster)
@ -959,7 +1046,7 @@ func (r *ApplicationSetReconciler) removeOwnerReferencesOnDeleteAppSet(ctx conte
func (r *ApplicationSetReconciler) performProgressiveSyncs(ctx context.Context, logCtx *log.Entry, appset argov1alpha1.ApplicationSet, applications []argov1alpha1.Application, desiredApplications []argov1alpha1.Application) (map[string]bool, error) {
appDependencyList, appStepMap := r.buildAppDependencyList(logCtx, appset, desiredApplications)
_, err := r.updateApplicationSetApplicationStatus(ctx, logCtx, &appset, applications, appStepMap)
_, err := r.updateApplicationSetApplicationStatus(ctx, logCtx, &appset, applications, desiredApplications, appStepMap)
if err != nil {
return nil, fmt.Errorf("failed to update applicationset app status: %w", err)
}
@ -1043,12 +1130,10 @@ func labelMatchedExpression(logCtx *log.Entry, val string, matchExpression argov
// if operator == NotIn, default to true
valueMatched := matchExpression.Operator == "NotIn"
for _, value := range matchExpression.Values {
if val == value {
// first "In" match returns true
// first "NotIn" match returns false
return matchExpression.Operator == "In"
}
if slices.Contains(matchExpression.Values, val) {
// first "In" match returns true
// first "NotIn" match returns false
return matchExpression.Operator == "In"
}
return valueMatched
}
@ -1138,10 +1223,16 @@ func getAppStep(appName string, appStepMap map[string]int) int {
}
// check the status of each Application's status and promote Applications to the next status if needed
func (r *ApplicationSetReconciler) updateApplicationSetApplicationStatus(ctx context.Context, logCtx *log.Entry, applicationSet *argov1alpha1.ApplicationSet, applications []argov1alpha1.Application, appStepMap map[string]int) ([]argov1alpha1.ApplicationSetApplicationStatus, error) {
func (r *ApplicationSetReconciler) updateApplicationSetApplicationStatus(ctx context.Context, logCtx *log.Entry, applicationSet *argov1alpha1.ApplicationSet, applications []argov1alpha1.Application, desiredApplications []argov1alpha1.Application, appStepMap map[string]int) ([]argov1alpha1.ApplicationSetApplicationStatus, error) {
now := metav1.Now()
appStatuses := make([]argov1alpha1.ApplicationSetApplicationStatus, 0, len(applications))
// Build a map of desired applications for quick lookup
desiredAppsMap := make(map[string]*argov1alpha1.Application)
for i := range desiredApplications {
desiredAppsMap[desiredApplications[i].Name] = &desiredApplications[i]
}
for _, app := range applications {
appHealthStatus := app.Status.Health.Status
appSyncStatus := app.Status.Sync.Status
@ -1176,10 +1267,27 @@ func (r *ApplicationSetReconciler) updateApplicationSetApplicationStatus(ctx con
newAppStatus := currentAppStatus.DeepCopy()
newAppStatus.Step = strconv.Itoa(getAppStep(newAppStatus.Application, appStepMap))
if !reflect.DeepEqual(currentAppStatus.TargetRevisions, app.Status.GetRevisions()) {
// A new version is available in the application and we need to re-sync the application
revisionsChanged := !reflect.DeepEqual(currentAppStatus.TargetRevisions, app.Status.GetRevisions())
// Check if the desired Application spec differs from the current Application spec
specChanged := false
if desiredApp, ok := desiredAppsMap[app.Name]; ok {
// Compare the desired spec with the current spec to detect non-Git changes
// This will catch changes to generator parameters like image tags, helm values, etc.
specChanged = !cmp.Equal(desiredApp.Spec, app.Spec, cmpopts.EquateEmpty(), cmpopts.EquateComparable(argov1alpha1.ApplicationDestination{}))
}
if revisionsChanged || specChanged {
newAppStatus.TargetRevisions = app.Status.GetRevisions()
newAppStatus.Message = "Application has pending changes, setting status to Waiting"
switch {
case revisionsChanged && specChanged:
newAppStatus.Message = revisionAndSpecChangedMsg
case revisionsChanged:
newAppStatus.Message = revisionChangedMsg
default:
newAppStatus.Message = specChangedMsg
}
newAppStatus.Status = argov1alpha1.ProgressiveSyncWaiting
newAppStatus.LastTransitionTime = &now
}
@ -1580,8 +1688,8 @@ func (r *ApplicationSetReconciler) syncDesiredApplications(logCtx *log.Entry, ap
// ensure that Applications generated with RollingSync do not have an automated sync policy, since the AppSet controller will handle triggering the sync operation instead
if desiredApplications[i].Spec.SyncPolicy != nil && desiredApplications[i].Spec.SyncPolicy.IsAutomatedSyncEnabled() {
pruneEnabled = desiredApplications[i].Spec.SyncPolicy.Automated.Prune
desiredApplications[i].Spec.SyncPolicy.Automated.Enabled = ptr.To(false)
pruneEnabled = desiredApplications[i].Spec.SyncPolicy.Automated.GetPrune()
desiredApplications[i].Spec.SyncPolicy.Automated.Enabled = new(false)
}
appSetStatusPending := false

File diff suppressed because it is too large Load diff

View file

@ -14,6 +14,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"
"github.com/argoproj/argo-cd/v3/applicationset/utils"
"github.com/argoproj/argo-cd/v3/common"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
@ -22,8 +23,9 @@ import (
// requeue any related ApplicationSets.
type clusterSecretEventHandler struct {
// handler.EnqueueRequestForOwner
Log log.FieldLogger
Client client.Client
Log log.FieldLogger
Client client.Client
ApplicationSetNamespaces []string
}
func (h *clusterSecretEventHandler) Create(ctx context.Context, e event.CreateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
@ -68,6 +70,10 @@ func (h *clusterSecretEventHandler) queueRelatedAppGenerators(ctx context.Contex
h.Log.WithField("count", len(appSetList.Items)).Info("listed ApplicationSets")
for _, appSet := range appSetList.Items {
if !utils.IsNamespaceAllowed(h.ApplicationSetNamespaces, appSet.GetNamespace()) {
// Ignore it as not part of the allowed list of namespaces in which to watch Appsets
continue
}
foundClusterGenerator := false
for _, generator := range appSet.Spec.Generators {
if generator.Clusters != nil {

View file

@ -137,7 +137,7 @@ func TestClusterEventHandler(t *testing.T) {
{
ObjectMeta: metav1.ObjectMeta{
Name: "my-app-set",
Namespace: "another-namespace",
Namespace: "argocd",
},
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
@ -171,9 +171,37 @@ func TestClusterEventHandler(t *testing.T) {
},
},
expectedRequests: []reconcile.Request{
{NamespacedName: types.NamespacedName{Namespace: "another-namespace", Name: "my-app-set"}},
{NamespacedName: types.NamespacedName{Namespace: "argocd", Name: "my-app-set"}},
},
},
{
name: "cluster generators in other namespaces should not match",
items: []argov1alpha1.ApplicationSet{
{
ObjectMeta: metav1.ObjectMeta{
Name: "my-app-set",
Namespace: "my-namespace-not-allowed",
},
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
Clusters: &argov1alpha1.ClusterGenerator{},
},
},
},
},
},
secret: corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Namespace: "argocd",
Name: "my-secret",
Labels: map[string]string{
argocommon.LabelKeySecretType: argocommon.LabelValueSecretTypeCluster,
},
},
},
expectedRequests: []reconcile.Request{},
},
{
name: "non-argo cd secret should not match",
items: []argov1alpha1.ApplicationSet{
@ -552,8 +580,9 @@ func TestClusterEventHandler(t *testing.T) {
fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithLists(&appSetList).Build()
handler := &clusterSecretEventHandler{
Client: fakeClient,
Log: log.WithField("type", "createSecretEventHandler"),
Client: fakeClient,
Log: log.WithField("type", "createSecretEventHandler"),
ApplicationSetNamespaces: []string{"argocd"},
}
mockAddRateLimitingInterface := mockAddRateLimitingInterface{}

View file

@ -19,6 +19,7 @@ import (
appsetmetrics "github.com/argoproj/argo-cd/v3/applicationset/metrics"
"github.com/argoproj/argo-cd/v3/applicationset/services/mocks"
argov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/util/settings"
)
func TestRequeueAfter(t *testing.T) {
@ -57,12 +58,17 @@ func TestRequeueAfter(t *testing.T) {
}
fakeDynClient := dynfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, duckType)
scmConfig := generators.NewSCMConfig("", []string{""}, true, true, nil, true)
clusterInformer, err := settings.NewClusterInformer(appClientset, "argocd")
require.NoError(t, err)
defer startAndSyncInformer(t, clusterInformer)()
terminalGenerators := map[string]generators.Generator{
"List": generators.NewListGenerator(),
"Clusters": generators.NewClusterGenerator(ctx, k8sClient, appClientset, "argocd"),
"Clusters": generators.NewClusterGenerator(k8sClient, "argocd"),
"Git": generators.NewGitGenerator(mockServer, "namespace"),
"SCMProvider": generators.NewSCMProviderGenerator(fake.NewClientBuilder().WithObjects(&corev1.Secret{}).Build(), scmConfig),
"ClusterDecisionResource": generators.NewDuckTypeGenerator(ctx, fakeDynClient, appClientset, "argocd"),
"ClusterDecisionResource": generators.NewDuckTypeGenerator(ctx, fakeDynClient, appClientset, "argocd", clusterInformer),
"PullRequest": generators.NewPullRequestGenerator(k8sClient, scmConfig),
}

View file

@ -96,7 +96,7 @@ func Test_ApplyTemplatePatch(t *testing.T) {
},
SyncPolicy: &appv1.SyncPolicy{
Automated: &appv1.SyncPolicyAutomated{
Prune: true,
Prune: new(true),
},
},
},
@ -172,7 +172,7 @@ spec:
},
SyncPolicy: &appv1.SyncPolicy{
Automated: &appv1.SyncPolicyAutomated{
Prune: true,
Prune: new(true),
},
},
},

View file

@ -9,7 +9,6 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/argoproj/argo-cd/v3/applicationset/utils"
@ -22,19 +21,15 @@ var _ Generator = (*ClusterGenerator)(nil)
// ClusterGenerator generates Applications for some or all clusters registered with ArgoCD.
type ClusterGenerator struct {
client.Client
ctx context.Context
clientset kubernetes.Interface
// namespace is the Argo CD namespace
namespace string
}
var render = &utils.Render{}
func NewClusterGenerator(ctx context.Context, c client.Client, clientset kubernetes.Interface, namespace string) Generator {
func NewClusterGenerator(c client.Client, namespace string) Generator {
g := &ClusterGenerator{
Client: c,
ctx: ctx,
clientset: clientset,
namespace: namespace,
}
return g
@ -64,16 +59,7 @@ func (g *ClusterGenerator) GenerateParams(appSetGenerator *argoappsetv1alpha1.Ap
// - Since local clusters do not have secrets, they do not have labels to match against
ignoreLocalClusters := len(appSetGenerator.Clusters.Selector.MatchExpressions) > 0 || len(appSetGenerator.Clusters.Selector.MatchLabels) > 0
// ListCluster will include the local cluster in the list of clusters
clustersFromArgoCD, err := utils.ListClusters(g.ctx, g.clientset, g.namespace)
if err != nil {
return nil, fmt.Errorf("error listing clusters: %w", err)
}
if clustersFromArgoCD == nil {
return nil, nil
}
// Get cluster secrets using the cached controller-runtime client
clusterSecrets, err := g.getSecretsByClusterName(logCtx, appSetGenerator)
if err != nil {
return nil, fmt.Errorf("error getting cluster secrets: %w", err)
@ -82,32 +68,14 @@ func (g *ClusterGenerator) GenerateParams(appSetGenerator *argoappsetv1alpha1.Ap
paramHolder := &paramHolder{isFlatMode: appSetGenerator.Clusters.FlatList}
logCtx.Debugf("Using flat mode = %t for cluster generator", paramHolder.isFlatMode)
secretsFound := []corev1.Secret{}
for _, cluster := range clustersFromArgoCD {
// If there is a secret for this cluster, then it's a non-local cluster, so it will be
// handled by the next step.
if secretForCluster, exists := clusterSecrets[cluster.Name]; exists {
secretsFound = append(secretsFound, secretForCluster)
} else if !ignoreLocalClusters {
// If there is no secret for the cluster, it's the local cluster, so handle it here.
params := map[string]any{}
params["name"] = cluster.Name
params["nameNormalized"] = cluster.Name
params["server"] = cluster.Server
params["project"] = ""
err = appendTemplatedValues(appSetGenerator.Clusters.Values, params, appSet.Spec.GoTemplate, appSet.Spec.GoTemplateOptions)
if err != nil {
return nil, fmt.Errorf("error appending templated values for local cluster: %w", err)
}
paramHolder.append(params)
logCtx.WithField("cluster", "local cluster").Info("matched local cluster")
}
// Convert map values to slice to check for an in-cluster secret
secretsList := make([]corev1.Secret, 0, len(clusterSecrets))
for _, secret := range clusterSecrets {
secretsList = append(secretsList, secret)
}
// For each matching cluster secret (non-local clusters only)
for _, cluster := range secretsFound {
for _, cluster := range clusterSecrets {
params := g.getClusterParameters(cluster, appSet)
err = appendTemplatedValues(appSetGenerator.Clusters.Values, params, appSet.Spec.GoTemplate, appSet.Spec.GoTemplateOptions)
@ -119,6 +87,23 @@ func (g *ClusterGenerator) GenerateParams(appSetGenerator *argoappsetv1alpha1.Ap
logCtx.WithField("cluster", cluster.Name).Debug("matched cluster secret")
}
// Add the in-cluster last if it doesn't have a secret, and we're not ignoring in-cluster
if !ignoreLocalClusters && !utils.SecretsContainInClusterCredentials(secretsList) {
params := map[string]any{}
params["name"] = argoappsetv1alpha1.KubernetesInClusterName
params["nameNormalized"] = argoappsetv1alpha1.KubernetesInClusterName
params["server"] = argoappsetv1alpha1.KubernetesInternalAPIServerAddr
params["project"] = ""
err = appendTemplatedValues(appSetGenerator.Clusters.Values, params, appSet.Spec.GoTemplate, appSet.Spec.GoTemplateOptions)
if err != nil {
return nil, fmt.Errorf("error appending templated values for local cluster: %w", err)
}
paramHolder.append(params)
logCtx.WithField("cluster", "local cluster").Info("matched local cluster")
}
return paramHolder.consolidate(), nil
}
@ -186,7 +171,7 @@ func (g *ClusterGenerator) getSecretsByClusterName(log *log.Entry, appSetGenerat
return nil, fmt.Errorf("error converting label selector: %w", err)
}
if err := g.List(context.Background(), clusterSecretList, client.MatchingLabelsSelector{Selector: secretSelector}); err != nil {
if err := g.List(context.Background(), clusterSecretList, client.InNamespace(g.namespace), client.MatchingLabelsSelector{Selector: secretSelector}); err != nil {
return nil, err
}
log.Debugf("clusters matching labels: %d", len(clusterSecretList.Items))

View file

@ -7,12 +7,9 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
kubefake "k8s.io/client-go/kubernetes/fake"
"github.com/argoproj/argo-cd/v3/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
@ -299,23 +296,15 @@ func TestGenerateParams(t *testing.T) {
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
clusterGenerator := NewClusterGenerator(t.Context(), cl, appClientset, "namespace")
clusterGenerator := NewClusterGenerator(cl, "namespace")
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
@ -336,12 +325,25 @@ func TestGenerateParams(t *testing.T) {
require.EqualError(t, err, testCase.expectedError.Error())
} else {
require.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
assertEqualParamsFlat(t, testCase.expected, got, testCase.isFlatMode)
}
})
}
}
func assertEqualParamsFlat(t *testing.T, expected, got []map[string]any, isFlatMode bool) {
t.Helper()
if isFlatMode && len(expected) == 1 && len(got) == 1 {
expectedClusters, ok1 := expected[0]["clusters"].([]map[string]any)
gotClusters, ok2 := got[0]["clusters"].([]map[string]any)
if ok1 && ok2 {
assert.ElementsMatch(t, expectedClusters, gotClusters)
return
}
}
assert.ElementsMatch(t, expected, got)
}
func TestGenerateParamsGoTemplate(t *testing.T) {
clusters := []client.Object{
&corev1.Secret{
@ -837,23 +839,15 @@ func TestGenerateParamsGoTemplate(t *testing.T) {
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
clusterGenerator := NewClusterGenerator(t.Context(), cl, appClientset, "namespace")
clusterGenerator := NewClusterGenerator(cl, "namespace")
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
@ -876,7 +870,7 @@ func TestGenerateParamsGoTemplate(t *testing.T) {
require.EqualError(t, err, testCase.expectedError.Error())
} else {
require.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
assertEqualParamsFlat(t, testCase.expected, got, testCase.isFlatMode)
}
})
}

View file

@ -19,24 +19,27 @@ import (
"github.com/argoproj/argo-cd/v3/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/util/settings"
)
var _ Generator = (*DuckTypeGenerator)(nil)
// DuckTypeGenerator generates Applications for some or all clusters registered with ArgoCD.
type DuckTypeGenerator struct {
ctx context.Context
dynClient dynamic.Interface
clientset kubernetes.Interface
namespace string // namespace is the Argo CD namespace
ctx context.Context
dynClient dynamic.Interface
clientset kubernetes.Interface
namespace string // namespace is the Argo CD namespace
clusterInformer *settings.ClusterInformer
}
func NewDuckTypeGenerator(ctx context.Context, dynClient dynamic.Interface, clientset kubernetes.Interface, namespace string) Generator {
func NewDuckTypeGenerator(ctx context.Context, dynClient dynamic.Interface, clientset kubernetes.Interface, namespace string, clusterInformer *settings.ClusterInformer) Generator {
g := &DuckTypeGenerator{
ctx: ctx,
dynClient: dynClient,
clientset: clientset,
namespace: namespace,
ctx: ctx,
dynClient: dynClient,
clientset: clientset,
namespace: namespace,
clusterInformer: clusterInformer,
}
return g
}
@ -65,8 +68,7 @@ func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.A
return nil, ErrEmptyAppSetGenerator
}
// ListCluster from Argo CD's util/db package will include the local cluster in the list of clusters
clustersFromArgoCD, err := utils.ListClusters(g.ctx, g.clientset, g.namespace)
clustersFromArgoCD, err := utils.ListClusters(g.clusterInformer)
if err != nil {
return nil, fmt.Errorf("error listing clusters: %w", err)
}

View file

@ -11,11 +11,13 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
dynfake "k8s.io/client-go/dynamic/fake"
"k8s.io/client-go/dynamic/fake"
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/controller-runtime/pkg/client"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/test"
"github.com/argoproj/argo-cd/v3/util/settings"
)
const (
@ -290,9 +292,14 @@ func TestGenerateParamsForDuckType(t *testing.T) {
Resource: "ducks",
}: "DuckList"}
fakeDynClient := dynfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, testCase.resource)
fakeDynClient := fake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, testCase.resource)
duckTypeGenerator := NewDuckTypeGenerator(t.Context(), fakeDynClient, appClientset, "namespace")
clusterInformer, err := settings.NewClusterInformer(appClientset, "namespace")
require.NoError(t, err)
defer test.StartInformer(clusterInformer)()
duckTypeGenerator := NewDuckTypeGenerator(t.Context(), fakeDynClient, appClientset, "namespace", clusterInformer)
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
@ -586,9 +593,14 @@ func TestGenerateParamsForDuckTypeGoTemplate(t *testing.T) {
Resource: "ducks",
}: "DuckList"}
fakeDynClient := dynfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, testCase.resource)
fakeDynClient := fake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, testCase.resource)
duckTypeGenerator := NewDuckTypeGenerator(t.Context(), fakeDynClient, appClientset, "namespace")
clusterInformer, err := settings.NewClusterInformer(appClientset, "namespace")
require.NoError(t, err)
defer test.StartInformer(clusterInformer)()
duckTypeGenerator := NewDuckTypeGenerator(t.Context(), fakeDynClient, appClientset, "namespace", clusterInformer)
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{

View file

@ -124,7 +124,7 @@ func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSet
}
func flattenParameters(in map[string]any) (map[string]string, error) {
flat, err := flatten.Flatten(in, "", flatten.DotStyle)
flat, err := flatten.Flatten(normalizeMapForFlatten(in), "", flatten.DotStyle)
if err != nil {
return nil, fmt.Errorf("error flatenning parameters: %w", err)
}
@ -137,6 +137,31 @@ func flattenParameters(in map[string]any) (map[string]string, error) {
return out, nil
}
// normalizeMapForFlatten recursively converts map[string]string values to
// map[string]interface{} so that flatten.Flatten can recurse into them.
// flatten.Flatten only recurses into map[string]interface{} and []interface{};
// map[string]string is treated as an opaque leaf, causing individual keys
// (e.g. metadata.labels.environment) to be absent from the flat output and
// silently breaking post-generator selector matching in GoTemplate mode.
func normalizeMapForFlatten(in map[string]any) map[string]any {
out := make(map[string]any, len(in))
for k, v := range in {
switch cast := v.(type) {
case map[string]string:
inner := make(map[string]any, len(cast))
for ik, iv := range cast {
inner[ik] = iv
}
out[k] = inner
case map[string]any:
out[k] = normalizeMapForFlatten(cast)
default:
out[k] = v
}
}
return out
}
func mergeGeneratorTemplate(g Generator, requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetTemplate argoprojiov1alpha1.ApplicationSetTemplate) (argoprojiov1alpha1.ApplicationSetTemplate, error) {
// Make a copy of the value from `GetTemplate()` before merge, rather than copying directly into
// the provided parameter (which will touch the original resource object returned by client-go)

View file

@ -1,7 +1,6 @@
package generators
import (
"context"
"testing"
log "github.com/sirupsen/logrus"
@ -16,8 +15,6 @@ import (
"github.com/stretchr/testify/mock"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
kubefake "k8s.io/client-go/kubernetes/fake"
crtclient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)
@ -223,7 +220,7 @@ func TestTransForm(t *testing.T) {
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
testGenerators := map[string]Generator{
"Clusters": getMockClusterGenerator(t.Context()),
"Clusters": getMockClusterGenerator(),
}
applicationSetInfo := argov1alpha1.ApplicationSet{
@ -252,6 +249,231 @@ func TestTransForm(t *testing.T) {
}
}
func TestTransFormGoTemplate(t *testing.T) {
testCases := []struct {
name string
selector *metav1.LabelSelector
values map[string]string
expected []map[string]any
}{
{
name: "server filter",
selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"server": "https://production-01.example.com"},
},
expected: []map[string]any{{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
}},
},
{
name: "label MatchLabels",
selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"metadata.labels.environment": "staging"},
},
expected: []map[string]any{{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
}},
},
{
name: "label NotIn matchExpression",
selector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: "metadata.labels.environment",
Operator: metav1.LabelSelectorOpNotIn,
Values: []string{"staging"},
},
},
},
// staging-01 is excluded; production-01, some-really-long-server-url, and
// in-cluster (no labels) are all included because NotIn vacuously passes
// when the key is absent.
expected: []map[string]any{
{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
},
{
"name": "some-really-long-server-url",
"nameNormalized": "some-really-long-server-url",
"server": "https://some-really-long-url-that-will-exceed-63-characters.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
},
{
// in-cluster (local cluster) has no labels; NotIn vacuously passes.
"name": "in-cluster",
"nameNormalized": "in-cluster",
"server": "https://kubernetes.default.svc",
"project": "",
},
},
},
{
name: "slash key in label",
selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"metadata.labels.argocd.argoproj.io/secret-type": "cluster"},
},
expected: []map[string]any{
{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
},
{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
},
{
"name": "some-really-long-server-url",
"nameNormalized": "some-really-long-server-url",
"server": "https://some-really-long-url-that-will-exceed-63-characters.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
},
},
},
{
name: "values filter",
selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"values.env": "staging"},
},
values: map[string]string{"env": "{{.metadata.labels.environment}}"},
expected: []map[string]any{{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"project": "",
"metadata": map[string]any{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
"values": map[string]string{
"env": "staging",
},
}},
},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
testGenerators := map[string]Generator{
"Clusters": getMockClusterGenerator(),
}
applicationSetInfo := argov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argov1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}
results, err := Transform(
argov1alpha1.ApplicationSetGenerator{
Selector: testCase.selector,
Clusters: &argov1alpha1.ClusterGenerator{
Selector: metav1.LabelSelector{},
Template: argov1alpha1.ApplicationSetTemplate{},
Values: testCase.values,
},
},
testGenerators,
emptyTemplate(),
&applicationSetInfo, nil, nil)
require.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, results[0].Params)
})
}
}
func emptyTemplate() argov1alpha1.ApplicationSetTemplate {
return argov1alpha1.ApplicationSetTemplate{
Spec: argov1alpha1.ApplicationSpec{
@ -260,7 +482,7 @@ func emptyTemplate() argov1alpha1.ApplicationSetTemplate {
}
}
func getMockClusterGenerator(ctx context.Context) Generator {
func getMockClusterGenerator() Generator {
clusters := []crtclient.Object{
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
@ -335,14 +557,8 @@ func getMockClusterGenerator(ctx context.Context) Generator {
Type: corev1.SecretType("Opaque"),
},
}
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
return NewClusterGenerator(ctx, fakeClient, appClientset, "namespace")
return NewClusterGenerator(fakeClient, "namespace")
}
func getMockGitGenerator() Generator {
@ -354,7 +570,7 @@ func getMockGitGenerator() Generator {
func TestGetRelevantGenerators(t *testing.T) {
testGenerators := map[string]Generator{
"Clusters": getMockClusterGenerator(t.Context()),
"Clusters": getMockClusterGenerator(),
"Git": getMockGitGenerator(),
}
@ -537,7 +753,7 @@ func TestInterpolateGeneratorError(t *testing.T) {
{name: "Error templating", args: args{
requestedGenerator: &argov1alpha1.ApplicationSetGenerator{Git: &argov1alpha1.GitGenerator{
RepoURL: "foo",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "bar/"}},
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "path/{{ index .rmap (default .override .test) }}"}},
Revision: "main",
Values: map[string]string{
"git_test": "{{ toPrettyJson . }}",
@ -551,7 +767,7 @@ func TestInterpolateGeneratorError(t *testing.T) {
},
useGoTemplate: true,
goTemplateOptions: []string{},
}, want: argov1alpha1.ApplicationSetGenerator{}, expectedErrStr: "failed to replace parameters in generator: failed to execute go template {{ index .rmap (default .override .test) }}: template: base:1:3: executing \"base\" at <index .rmap (default .override .test)>: error calling index: index of untyped nil"},
}, want: argov1alpha1.ApplicationSetGenerator{}, expectedErrStr: "failed to replace parameters in generator: failed to execute go template path/{{ index .rmap (default .override .test) }}: template: base:1:8: executing \"base\" at <index .rmap (default .override .test)>: error calling index: index of untyped nil"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@ -565,3 +781,178 @@ func TestInterpolateGeneratorError(t *testing.T) {
})
}
}
func TestInterpolateGeneratorValuesHandling(t *testing.T) {
applicationSetTemplate := argov1alpha1.ApplicationSetTemplate{
ApplicationSetTemplateMeta: argov1alpha1.ApplicationSetTemplateMeta{
Labels: map[string]string{},
Annotations: map[string]string{},
Finalizers: []string{},
},
Spec: argov1alpha1.ApplicationSpec{
IgnoreDifferences: argov1alpha1.IgnoreDifferences{},
Info: []argov1alpha1.Info{},
Sources: argov1alpha1.ApplicationSources{},
},
}
type args struct {
requestedGenerator *argov1alpha1.ApplicationSetGenerator
params map[string]any
useGoTemplate bool
goTemplateOptions []string
}
tests := []struct {
name string
args args
want argov1alpha1.ApplicationSetGenerator
expectedErrStr string
}{
{
name: "Generator with values set",
args: args{
requestedGenerator: &argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/{{.name}}.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{
"appname": "{{ .path.basenameNormalized }}",
},
Template: applicationSetTemplate,
},
},
params: map[string]any{
"name": "in-cluster",
"server": "https://kubernetes.default.svc",
},
useGoTemplate: true,
goTemplateOptions: []string{},
},
want: argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/in-cluster.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{
// must stay not interpolated
"appname": "{{ .path.basenameNormalized }}",
},
Directories: []argov1alpha1.GitDirectoryGeneratorItem{},
Template: applicationSetTemplate,
},
},
expectedErrStr: "",
},
{
name: "Generator with no values set",
args: args{
requestedGenerator: &argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/{{.name}}.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{},
Template: applicationSetTemplate,
},
},
params: map[string]any{
"name": "in-cluster",
"server": "https://kubernetes.default.svc",
},
useGoTemplate: true,
goTemplateOptions: []string{},
},
want: argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/in-cluster.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{},
Directories: []argov1alpha1.GitDirectoryGeneratorItem{},
Template: applicationSetTemplate,
},
},
expectedErrStr: "",
},
{
name: "Generator with values set without go templates",
args: args{
requestedGenerator: &argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/{{name}}.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{
"appname": "{{ .path.basenameNormalized }}",
},
Template: applicationSetTemplate,
},
},
params: map[string]any{
"name": "in-cluster",
"server": "https://kubernetes.default.svc",
},
useGoTemplate: false,
},
want: argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/in-cluster.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{
"appname": "{{ .path.basenameNormalized }}",
},
Directories: []argov1alpha1.GitDirectoryGeneratorItem{},
Template: applicationSetTemplate,
},
},
expectedErrStr: "",
},
{
name: "Generator without values set and no go templates",
args: args{
requestedGenerator: &argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/{{name}}.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{},
Template: applicationSetTemplate,
},
},
params: map[string]any{
"name": "in-cluster",
"server": "https://kubernetes.default.svc",
},
useGoTemplate: false,
},
want: argov1alpha1.ApplicationSetGenerator{
Git: &argov1alpha1.GitGenerator{
RepoURL: "https://somewhere.com/per-cluster/in-cluster.git",
Files: []argov1alpha1.GitFileGeneratorItem{{Path: "somedir/*"}},
Revision: "main",
Values: map[string]string{},
Directories: []argov1alpha1.GitDirectoryGeneratorItem{},
Template: applicationSetTemplate,
},
},
expectedErrStr: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := InterpolateGenerator(tt.args.requestedGenerator, tt.args.params, tt.args.useGoTemplate, tt.args.goTemplateOptions)
if tt.expectedErrStr != "" {
require.EqualError(t, err, tt.expectedErrStr)
} else {
require.NoError(t, err)
}
assert.Equal(t, tt.want.Git.Values, got.Git.Values)
assert.Equal(t, tt.want.Git.Revision, got.Git.Revision)
assert.Equal(t, tt.want.Git.RepoURL, got.Git.RepoURL)
assert.Equal(t, tt.want.Git.Files, got.Git.Files)
assert.Equal(t, tt.want.Git.Directories, got.Git.Directories)
assert.Equal(t, tt.want.Git.Template, got.Git.Template)
})
}
}

View file

@ -3,6 +3,7 @@ package generators
import (
"context"
"fmt"
"maps"
"path"
"sort"
"strconv"
@ -168,9 +169,7 @@ func (g *GitGenerator) generateParamsForGitFiles(appSetGenerator *argoprojiov1al
if err != nil {
return nil, err
}
for absPath, content := range retrievedFiles {
fileContentMap[absPath] = content
}
maps.Copy(fileContentMap, retrievedFiles)
}
// Now remove files matching any exclude pattern
@ -242,9 +241,7 @@ func (g *GitGenerator) generateParamsFromGitFile(filePath string, fileContent []
params := map[string]any{}
if useGoTemplate {
for k, v := range objectFound {
params[k] = v
}
maps.Copy(params, objectFound)
paramPath := map[string]any{}
@ -316,7 +313,7 @@ func (g *GitGenerator) filterApps(directories []argoprojiov1alpha1.GitDirectoryG
appExclude = true
}
}
// Whenever there is a path with exclude: true it wont be included, even if it is included in a different path pattern
// Whenever there is a path with exclude: true it won't be included, even if it is included in a different path pattern
if appInclude && !appExclude {
res = append(res, appPath)
}

View file

@ -9,7 +9,6 @@ import (
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"github.com/argoproj/argo-cd/v3/applicationset/services/mocks"
@ -111,13 +110,18 @@ foo:
{
name: "file parameters are added to params with go template",
args: args{
filePath: "path/dir/file_name.yaml",
fileContent: defaultContent,
values: map[string]string{},
filePath: "path/dir/file_name.yaml",
fileContent: defaultContent,
values: map[string]string{
"somekey": "{{.path.basename}}",
},
useGoTemplate: true,
},
want: []map[string]any{
{
"values": map[string]string{
"somekey": "dir",
},
"foo": map[string]any{
"bar": "baz",
},
@ -165,6 +169,41 @@ foo:
},
},
},
{
name: "path parameter are prefixed with go template and values",
args: args{
filePath: "path/dir/file_name.yaml",
fileContent: defaultContent,
values: map[string]string{
"somekey": "{{.myRepo.path.basename}}",
},
useGoTemplate: true,
pathParamPrefix: "myRepo",
},
want: []map[string]any{
{
"foo": map[string]any{
"bar": "baz",
},
"myRepo": map[string]any{
"path": map[string]any{
"path": "path/dir",
"basename": "dir",
"filename": "file_name.yaml",
"basenameNormalized": "dir",
"filenameNormalized": "file-name.yaml",
"segments": []string{
"path",
"dir",
},
},
},
"values": map[string]string{
"somekey": "dir",
},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@ -2423,7 +2462,7 @@ func TestGitGenerator_GenerateParams(t *testing.T) {
},
},
expected: []map[string]any{{"path": "app1", "path.basename": "app1", "path.basenameNormalized": "app1", "path[0]": "app1", "values.foo": "bar"}},
expectedProject: ptr.To("project"),
expectedProject: new("project"),
expectedError: nil,
},
{
@ -2457,7 +2496,7 @@ func TestGitGenerator_GenerateParams(t *testing.T) {
},
},
expected: []map[string]any{{"path": "app1", "path.basename": "app1", "path.basenameNormalized": "app1", "path[0]": "app1", "values.foo": "bar"}},
expectedProject: ptr.To(""),
expectedProject: new(""),
expectedError: nil,
},
}

View file

@ -8,7 +8,6 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
@ -624,11 +623,6 @@ func TestInterpolatedMatrixGenerate(t *testing.T) {
Type: corev1.SecretType("Opaque"),
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
testCaseCopy := testCase // Since tests may run in parallel
@ -637,13 +631,12 @@ func TestInterpolatedMatrixGenerate(t *testing.T) {
genMock := &generatorsMock.Generator{}
appSet := &v1alpha1.ApplicationSet{}
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
clusterGenerator := NewClusterGenerator(t.Context(), cl, appClientset, "namespace")
clusterGenerator := NewClusterGenerator(cl, "namespace")
for _, g := range testCaseCopy.baseGenerators {
gitGeneratorSpec := v1alpha1.ApplicationSetGenerator{
@ -803,11 +796,6 @@ func TestInterpolatedMatrixGenerateGoTemplate(t *testing.T) {
Type: corev1.SecretType("Opaque"),
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
testCaseCopy := testCase // Since tests may run in parallel
@ -820,13 +808,12 @@ func TestInterpolatedMatrixGenerateGoTemplate(t *testing.T) {
},
}
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
clusterGenerator := NewClusterGenerator(t.Context(), cl, appClientset, "namespace")
clusterGenerator := NewClusterGenerator(cl, "namespace")
for _, g := range testCaseCopy.baseGenerators {
gitGeneratorSpec := v1alpha1.ApplicationSetGenerator{
@ -1113,3 +1100,85 @@ func TestGitGenerator_GenerateParams_list_x_git_matrix_generator(t *testing.T) {
"test": "content",
}}, params)
}
func TestGitGenerator_GenerateParams_list_x_git_matrix_generator_go_templates_values(t *testing.T) {
// Given a matrix generator over a list generator and a git generator with values,
// that contain a template that refers to got generator output parameters.
// This tests for a specific bug where the second generator in the matrix
// failed to evaluate value templates that referred to generator output parameters.
listGeneratorMock := &generatorsMock.Generator{}
listGeneratorMock.EXPECT().GenerateParams(mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator"), mock.AnythingOfType("*v1alpha1.ApplicationSet"), mock.Anything).Return([]map[string]any{
{"some": "value"},
}, nil)
listGeneratorMock.EXPECT().GetTemplate(mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator")).Return(&v1alpha1.ApplicationSetTemplate{})
gitGeneratorSpec := &v1alpha1.GitGenerator{
RepoURL: "https://git.example.com",
Files: []v1alpha1.GitFileGeneratorItem{
{Path: "some/path.json"},
},
Values: map[string]string{
"foo": "{{.path.basename}}",
},
}
repoServiceMock := &servicesMocks.Repos{}
repoServiceMock.EXPECT().GetFiles(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(map[string][]byte{
"some/path.json": []byte("test: content"),
}, nil).Maybe()
gitGenerator := NewGitGenerator(repoServiceMock, "")
matrixGenerator := NewMatrixGenerator(map[string]Generator{
"List": listGeneratorMock,
"Git": gitGenerator,
})
matrixGeneratorSpec := &v1alpha1.MatrixGenerator{
Generators: []v1alpha1.ApplicationSetNestedGenerator{
{
List: &v1alpha1.ListGenerator{
Elements: []apiextensionsv1.JSON{
{
Raw: []byte(`{"some": "value"}`),
},
},
},
},
{
Git: gitGeneratorSpec,
},
},
}
scheme := runtime.NewScheme()
err := v1alpha1.AddToScheme(scheme)
require.NoError(t, err)
appProject := v1alpha1.AppProject{}
client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(&appProject).Build()
params, err := matrixGenerator.GenerateParams(&v1alpha1.ApplicationSetGenerator{
Matrix: matrixGeneratorSpec,
}, &v1alpha1.ApplicationSet{
Spec: v1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}, client)
require.NoError(t, err)
assert.Equal(t, []map[string]any{{
"path": map[string]any{
"basename": "some",
"basenameNormalized": "some",
"filename": "path.json",
"filenameNormalized": "path.json",
"path": "some",
"segments": []string{"some"},
},
"some": "value",
"test": "content",
"values": map[string]string{
"foo": "some",
},
}}, params)
}

View file

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"maps"
"strconv"
"strings"
"time"
@ -115,9 +116,7 @@ func (g *PluginGenerator) generateParams(appSetGenerator *argoprojiov1alpha1.App
params := map[string]any{}
if useGoTemplate {
for k, v := range objectFound {
params[k] = v
}
maps.Copy(params, objectFound)
} else {
flat, err := flatten.Flatten(objectFound, "", flatten.DotStyle)
if err != nil {

View file

@ -96,15 +96,9 @@ func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
var shortSHALength int
var shortSHALength7 int
for _, pull := range pulls {
shortSHALength = 8
if len(pull.HeadSHA) < 8 {
shortSHALength = len(pull.HeadSHA)
}
shortSHALength = min(len(pull.HeadSHA), 8)
shortSHALength7 = 7
if len(pull.HeadSHA) < 7 {
shortSHALength7 = len(pull.HeadSHA)
}
shortSHALength7 = min(len(pull.HeadSHA), 7)
paramMap := map[string]any{
"number": strconv.FormatInt(pull.Number, 10),

View file

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/http"
"slices"
"strings"
"time"
@ -105,10 +106,8 @@ func ScmProviderAllowed(applicationSetInfo *argoprojiov1alpha1.ApplicationSet, g
return nil
}
for _, allowedScmProvider := range allowedScmProviders {
if url == allowedScmProvider {
return nil
}
if slices.Contains(allowedScmProviders, url) {
return nil
}
log.WithFields(log.Fields{
@ -165,7 +164,7 @@ func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
if err != nil {
return nil, fmt.Errorf("error fetching Gitlab token: %w", err)
}
provider, err = scm_provider.NewGitlabProvider(providerConfig.Group, token, providerConfig.API, providerConfig.AllBranches, providerConfig.IncludeSubgroups, providerConfig.WillIncludeSharedProjects(), providerConfig.Insecure, g.scmRootCAPath, providerConfig.Topic, caCerts)
provider, err = scm_provider.NewGitlabProvider(providerConfig.Group, token, providerConfig.API, providerConfig.AllBranches, providerConfig.IncludeSubgroups, providerConfig.WillIncludeSharedProjects(), providerConfig.IncludeArchivedRepos, providerConfig.Insecure, g.scmRootCAPath, providerConfig.Topic, caCerts)
if err != nil {
return nil, fmt.Errorf("error initializing Gitlab service: %w", err)
}
@ -174,7 +173,7 @@ func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
if err != nil {
return nil, fmt.Errorf("error fetching Gitea token: %w", err)
}
provider, err = scm_provider.NewGiteaProvider(providerConfig.Gitea.Owner, token, providerConfig.Gitea.API, providerConfig.Gitea.AllBranches, providerConfig.Gitea.Insecure)
provider, err = scm_provider.NewGiteaProvider(providerConfig.Gitea.Owner, token, providerConfig.Gitea.API, providerConfig.Gitea.AllBranches, providerConfig.Gitea.Insecure, providerConfig.Gitea.ExcludeArchivedRepos)
if err != nil {
return nil, fmt.Errorf("error initializing Gitea service: %w", err)
}
@ -244,15 +243,9 @@ func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
var shortSHALength int
var shortSHALength7 int
for _, repo := range repos {
shortSHALength = 8
if len(repo.SHA) < 8 {
shortSHALength = len(repo.SHA)
}
shortSHALength = min(len(repo.SHA), 8)
shortSHALength7 = 7
if len(repo.SHA) < 7 {
shortSHALength7 = len(repo.SHA)
}
shortSHALength7 = min(len(repo.SHA), 7)
params := map[string]any{
"organization": repo.Organization,
@ -296,9 +289,9 @@ func (g *SCMProviderGenerator) githubProvider(ctx context.Context, github *argop
}
if g.enableGitHubAPIMetrics {
return scm_provider.NewGithubAppProviderFor(ctx, *auth, github.Organization, github.API, github.AllBranches, httpClient)
return scm_provider.NewGithubAppProviderFor(ctx, *auth, github.Organization, github.API, github.AllBranches, github.ExcludeArchivedRepos, httpClient)
}
return scm_provider.NewGithubAppProviderFor(ctx, *auth, github.Organization, github.API, github.AllBranches)
return scm_provider.NewGithubAppProviderFor(ctx, *auth, github.Organization, github.API, github.AllBranches, github.ExcludeArchivedRepos)
}
token, err := utils.GetSecretRef(ctx, g.client, github.TokenRef, applicationSetInfo.Namespace, g.tokenRefStrictMode)
@ -307,7 +300,7 @@ func (g *SCMProviderGenerator) githubProvider(ctx context.Context, github *argop
}
if g.enableGitHubAPIMetrics {
return scm_provider.NewGithubProvider(github.Organization, token, github.API, github.AllBranches, httpClient)
return scm_provider.NewGithubProvider(github.Organization, token, github.API, github.AllBranches, github.ExcludeArchivedRepos, httpClient)
}
return scm_provider.NewGithubProvider(github.Organization, token, github.API, github.AllBranches)
return scm_provider.NewGithubProvider(github.Organization, token, github.API, github.AllBranches, github.ExcludeArchivedRepos)
}

View file

@ -8,15 +8,16 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/argoproj/argo-cd/v3/applicationset/services"
"github.com/argoproj/argo-cd/v3/util/settings"
)
func GetGenerators(ctx context.Context, c client.Client, k8sClient kubernetes.Interface, controllerNamespace string, argoCDService services.Repos, dynamicClient dynamic.Interface, scmConfig SCMConfig) map[string]Generator {
func GetGenerators(ctx context.Context, c client.Client, k8sClient kubernetes.Interface, controllerNamespace string, argoCDService services.Repos, dynamicClient dynamic.Interface, scmConfig SCMConfig, clusterInformer *settings.ClusterInformer) map[string]Generator {
terminalGenerators := map[string]Generator{
"List": NewListGenerator(),
"Clusters": NewClusterGenerator(ctx, c, k8sClient, controllerNamespace),
"Clusters": NewClusterGenerator(c, controllerNamespace),
"Git": NewGitGenerator(argoCDService, controllerNamespace),
"SCMProvider": NewSCMProviderGenerator(c, scmConfig),
"ClusterDecisionResource": NewDuckTypeGenerator(ctx, dynamicClient, k8sClient, controllerNamespace),
"ClusterDecisionResource": NewDuckTypeGenerator(ctx, dynamicClient, k8sClient, controllerNamespace, clusterInformer),
"PullRequest": NewPullRequestGenerator(c, scmConfig),
"Plugin": NewPluginGenerator(c, controllerNamespace),
}

View file

@ -2,6 +2,7 @@ package generators
import (
"fmt"
"maps"
)
func appendTemplatedValues(values map[string]string, params map[string]any, useGoTemplate bool, goTemplateOptions []string) error {
@ -26,9 +27,7 @@ func appendTemplatedValues(values map[string]string, params map[string]any, useG
}
}
for key, value := range tmp {
params[key] = value
}
maps.Copy(params, tmp)
return nil
}

View file

@ -151,9 +151,9 @@ spec:
func newFakeAppsets(fakeAppsetYAML string) []argoappv1.ApplicationSet {
var results []argoappv1.ApplicationSet
appsetRawYamls := strings.Split(fakeAppsetYAML, "---")
appsetRawYamls := strings.SplitSeq(fakeAppsetYAML, "---")
for _, appsetRawYaml := range appsetRawYamls {
for appsetRawYaml := range appsetRawYamls {
var appset argoappv1.ApplicationSet
err := yaml.Unmarshal([]byte(appsetRawYaml), &appset)
if err != nil {

View file

@ -3,6 +3,7 @@ package pull_request
import (
"context"
"fmt"
"slices"
"strings"
"github.com/microsoft/azure-devops-go-api/azuredevops/v7"
@ -136,13 +137,7 @@ func convertLabels(tags *[]core.WebApiTagDefinition) []string {
// containAzureDevOpsLabels returns true if gotLabels contains expectedLabels
func containAzureDevOpsLabels(expectedLabels []string, gotLabels []string) bool {
for _, expected := range expectedLabels {
found := false
for _, got := range gotLabels {
if expected == got {
found = true
break
}
}
found := slices.Contains(gotLabels, expected)
if !found {
return false
}

View file

@ -15,26 +15,6 @@ import (
"github.com/argoproj/argo-cd/v3/applicationset/services/scm_provider/mocks"
)
func createBoolPtr(x bool) *bool {
return &x
}
func createStringPtr(x string) *string {
return &x
}
func createIntPtr(x int) *int {
return &x
}
func createLabelsPtr(x []core.WebApiTagDefinition) *[]core.WebApiTagDefinition {
return &x
}
func createUniqueNamePtr(x string) *string {
return &x
}
func TestListPullRequest(t *testing.T) {
teamProject := "myorg_project"
repoName := "myorg_project_repo"
@ -46,19 +26,19 @@ func TestListPullRequest(t *testing.T) {
pullRequestMock := []git.GitPullRequest{
{
PullRequestId: createIntPtr(prID),
Title: createStringPtr(prTitle),
SourceRefName: createStringPtr("refs/heads/feature-branch"),
TargetRefName: createStringPtr("refs/heads/main"),
PullRequestId: new(prID),
Title: new(prTitle),
SourceRefName: new("refs/heads/feature-branch"),
TargetRefName: new("refs/heads/main"),
LastMergeSourceCommit: &git.GitCommitRef{
CommitId: createStringPtr(prHeadSha),
CommitId: new(prHeadSha),
},
Labels: &[]core.WebApiTagDefinition{},
Repository: &git.GitRepository{
Name: createStringPtr(repoName),
Name: new(repoName),
},
CreatedBy: &webapi.IdentityRef{
UniqueName: createUniqueNamePtr(uniqueName + "@example.com"),
UniqueName: new(uniqueName + "@example.com"),
},
},
}
@ -99,27 +79,27 @@ func TestConvertLabes(t *testing.T) {
}{
{
name: "empty labels",
gotLabels: createLabelsPtr([]core.WebApiTagDefinition{}),
gotLabels: &[]core.WebApiTagDefinition{},
expectedLabels: []string{},
},
{
name: "nil labels",
gotLabels: createLabelsPtr(nil),
gotLabels: nil,
expectedLabels: []string{},
},
{
name: "one label",
gotLabels: createLabelsPtr([]core.WebApiTagDefinition{
{Name: createStringPtr("label1"), Active: createBoolPtr(true)},
}),
gotLabels: &[]core.WebApiTagDefinition{
{Name: new("label1"), Active: new(true)},
},
expectedLabels: []string{"label1"},
},
{
name: "two label",
gotLabels: createLabelsPtr([]core.WebApiTagDefinition{
{Name: createStringPtr("label1"), Active: createBoolPtr(true)},
{Name: createStringPtr("label2"), Active: createBoolPtr(true)},
}),
gotLabels: &[]core.WebApiTagDefinition{
{Name: new("label1"), Active: new(true)},
{Name: new("label2"), Active: new(true)},
},
expectedLabels: []string{"label1", "label2"},
},
}
@ -216,7 +196,7 @@ func TestBuildURL(t *testing.T) {
func TestAzureDevOpsListReturnsRepositoryNotFoundError(t *testing.T) {
args := git.GetPullRequestsByProjectArgs{
Project: createStringPtr("nonexistent"),
Project: new("nonexistent"),
SearchCriteria: &git.GitPullRequestSearchCriteria{},
}

View file

@ -268,7 +268,6 @@ func TestListPullRequestTLS(t *testing.T) {
}
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
defaultHandler(t)(w, r)

View file

@ -83,7 +83,7 @@ func (g *GiteaService) List(ctx context.Context) ([]*PullRequest, error) {
// containLabels returns true if gotLabels contains expectedLabels
func giteaContainLabels(expectedLabels []string, gotLabels []*gitea.Label) bool {
gotLabelNamesMap := make(map[string]bool)
for i := 0; i < len(gotLabels); i++ {
for i := range gotLabels {
gotLabelNamesMap[gotLabels[i].Name] = true
}
for _, expected := range expectedLabels {

View file

@ -10,10 +10,6 @@ import (
"github.com/stretchr/testify/require"
)
func toPtr(s string) *string {
return &s
}
func TestContainLabels(t *testing.T) {
cases := []struct {
Name string
@ -25,9 +21,9 @@ func TestContainLabels(t *testing.T) {
Name: "Match labels",
Labels: []string{"label1", "label2"},
PullLabels: []*github.Label{
{Name: toPtr("label1")},
{Name: toPtr("label2")},
{Name: toPtr("label3")},
{Name: new("label1")},
{Name: new("label2")},
{Name: new("label3")},
},
Expect: true,
},
@ -35,9 +31,9 @@ func TestContainLabels(t *testing.T) {
Name: "Not match labels",
Labels: []string{"label1", "label4"},
PullLabels: []*github.Label{
{Name: toPtr("label1")},
{Name: toPtr("label2")},
{Name: toPtr("label3")},
{Name: new("label1")},
{Name: new("label2")},
{Name: new("label3")},
},
Expect: false,
},
@ -45,9 +41,9 @@ func TestContainLabels(t *testing.T) {
Name: "No specify",
Labels: []string{},
PullLabels: []*github.Label{
{Name: toPtr("label1")},
{Name: toPtr("label2")},
{Name: toPtr("label3")},
{Name: new("label1")},
{Name: new("label2")},
{Name: new("label3")},
},
Expect: true,
},
@ -70,9 +66,9 @@ func TestGetGitHubPRLabelNames(t *testing.T) {
{
Name: "PR has labels",
PullLabels: []*github.Label{
{Name: toPtr("label1")},
{Name: toPtr("label2")},
{Name: toPtr("label3")},
{Name: new("label1")},
{Name: new("label2")},
{Name: new("label3")},
},
ExpectedResult: []string{"label1", "label2", "label3"},
},

View file

@ -158,7 +158,6 @@ func TestListWithStateTLS(t *testing.T) {
}
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
writeMRListResponse(t, w)

View file

@ -9,10 +9,6 @@ import (
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
func strp(s string) *string {
return &s
}
func TestFilterBranchMatchBadRegexp(t *testing.T) {
provider, _ := NewFakeService(
t.Context(),
@ -30,7 +26,7 @@ func TestFilterBranchMatchBadRegexp(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
BranchMatch: strp("("),
BranchMatch: new("("),
},
}
_, err := ListPullRequests(t.Context(), provider, filters)
@ -78,7 +74,7 @@ func TestFilterBranchMatch(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
BranchMatch: strp("w"),
BranchMatch: new("w"),
},
}
pullRequests, err := ListPullRequests(t.Context(), provider, filters)
@ -128,7 +124,7 @@ func TestFilterTargetBranchMatch(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
TargetBranchMatch: strp("1"),
TargetBranchMatch: new("1"),
},
}
pullRequests, err := ListPullRequests(t.Context(), provider, filters)
@ -178,7 +174,7 @@ func TestFilterTitleMatch(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
TitleMatch: strp("\\[filter]"),
TitleMatch: new("\\[filter]"),
},
}
pullRequests, err := ListPullRequests(t.Context(), provider, filters)
@ -228,10 +224,10 @@ func TestMultiFilterOrWithTitle(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
TitleMatch: strp("\\[filter]"),
TitleMatch: new("\\[filter]"),
},
{
TitleMatch: strp("- filter"),
TitleMatch: new("- filter"),
},
}
pullRequests, err := ListPullRequests(t.Context(), provider, filters)
@ -282,10 +278,10 @@ func TestMultiFilterOr(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
BranchMatch: strp("w"),
BranchMatch: new("w"),
},
{
BranchMatch: strp("r"),
BranchMatch: new("r"),
},
}
pullRequests, err := ListPullRequests(t.Context(), provider, filters)
@ -345,19 +341,19 @@ func TestMultiFilterOrWithTargetBranchFilterOrWithTitleFilter(t *testing.T) {
)
filters := []argoprojiov1alpha1.PullRequestGeneratorFilter{
{
BranchMatch: strp("w"),
TargetBranchMatch: strp("1"),
BranchMatch: new("w"),
TargetBranchMatch: new("1"),
},
{
BranchMatch: strp("r"),
TargetBranchMatch: strp("3"),
BranchMatch: new("r"),
TargetBranchMatch: new("3"),
},
{
TitleMatch: strp("two"),
TitleMatch: new("two"),
},
{
BranchMatch: strp("five"),
TitleMatch: strp("PR title is different than branch name"),
BranchMatch: new("five"),
TitleMatch: new("PR title is different than branch name"),
},
}
pullRequests, err := ListPullRequests(t.Context(), provider, filters)

View file

@ -10,16 +10,19 @@ import (
"slices"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/codecommit"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
rgsatypes "github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi/types"
"github.com/aws/aws-sdk-go-v2/service/sts"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/arn"
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
"github.com/aws/aws-sdk-go-v2/service/codecommit"
codecommittypes "github.com/aws/aws-sdk-go-v2/service/codecommit/types"
"github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi"
log "github.com/sirupsen/logrus"
"github.com/aws/aws-sdk-go-v2/config"
application "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
@ -32,16 +35,16 @@ const (
// AWSCodeCommitClient is a lean facade to the codecommitiface.CodeCommitAPI
// it helps to reduce the mockery generated code.
type AWSCodeCommitClient interface {
ListRepositoriesWithContext(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)
GetRepositoryWithContext(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)
ListBranchesWithContext(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)
GetFolderWithContext(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)
ListRepositories(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error)
GetRepository(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error)
ListBranches(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error)
GetFolder(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error)
}
// AWSTaggingClient is a lean facade to the resourcegroupstaggingapiiface.ResourceGroupsTaggingAPIAPI
// it helps to reduce the mockery generated code.
type AWSTaggingClient interface {
GetResourcesWithContext(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)
GetResources(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...func(*resourcegroupstaggingapi.Options)) (*resourcegroupstaggingapi.GetResourcesOutput, error)
}
type AWSCodeCommitProvider struct {
@ -73,7 +76,7 @@ func (p *AWSCodeCommitProvider) ListRepos(ctx context.Context, cloneProtocol str
}
for _, repoName := range repoNames {
repo, err := p.codeCommitClient.GetRepositoryWithContext(ctx, &codecommit.GetRepositoryInput{
repo, err := p.codeCommitClient.GetRepository(ctx, &codecommit.GetRepositoryInput{
RepositoryName: aws.String(repoName),
})
if err != nil {
@ -85,7 +88,7 @@ func (p *AWSCodeCommitProvider) ListRepos(ctx context.Context, cloneProtocol str
log.Warnf("codecommit returned invalid response for repository %s, skipped", repoName)
continue
}
if aws.StringValue(repo.RepositoryMetadata.DefaultBranch) == "" {
if aws.ToString(repo.RepositoryMetadata.DefaultBranch) == "" {
// if a codecommit repo doesn't have default branch, it's uninitialized. not going to bother with it.
log.Warnf("repository %s does not have default branch, skipped", repoName)
continue
@ -94,11 +97,11 @@ func (p *AWSCodeCommitProvider) ListRepos(ctx context.Context, cloneProtocol str
switch cloneProtocol {
// default to SSH if unspecified (i.e. if "").
case "", "ssh":
url = aws.StringValue(repo.RepositoryMetadata.CloneUrlSsh)
url = aws.ToString(repo.RepositoryMetadata.CloneUrlSsh)
case "https":
url = aws.StringValue(repo.RepositoryMetadata.CloneUrlHttp)
url = aws.ToString(repo.RepositoryMetadata.CloneUrlHttp)
case "https-fips":
url, err = getCodeCommitFIPSEndpoint(aws.StringValue(repo.RepositoryMetadata.CloneUrlHttp))
url, err = getCodeCommitFIPSEndpoint(aws.ToString(repo.RepositoryMetadata.CloneUrlHttp))
if err != nil {
return nil, fmt.Errorf("https-fips is provided but repoUrl can't be transformed to FIPS endpoint: %w", err)
}
@ -108,13 +111,13 @@ func (p *AWSCodeCommitProvider) ListRepos(ctx context.Context, cloneProtocol str
repos = append(repos, &Repository{
// there's no "organization" level at codecommit.
// we are just using AWS accountId for now.
Organization: aws.StringValue(repo.RepositoryMetadata.AccountId),
Repository: aws.StringValue(repo.RepositoryMetadata.RepositoryName),
Organization: aws.ToString(repo.RepositoryMetadata.AccountId),
Repository: aws.ToString(repo.RepositoryMetadata.RepositoryName),
URL: url,
Branch: aws.StringValue(repo.RepositoryMetadata.DefaultBranch),
Branch: aws.ToString(repo.RepositoryMetadata.DefaultBranch),
// we could propagate repo tag keys, but without value not sure if it's any useful.
Labels: []string{},
RepositoryId: aws.StringValue(repo.RepositoryMetadata.RepositoryId),
RepositoryId: aws.ToString(repo.RepositoryMetadata.RepositoryId),
})
}
@ -142,13 +145,9 @@ func (p *AWSCodeCommitProvider) RepoHasPath(ctx context.Context, repo *Repositor
FolderPath: aws.String(parentPath),
RepositoryName: aws.String(repo.Repository),
}
output, err := p.codeCommitClient.GetFolderWithContext(ctx, input)
output, err := p.codeCommitClient.GetFolder(ctx, input)
if err != nil {
if hasAwsError(err,
codecommit.ErrCodeRepositoryDoesNotExistException,
codecommit.ErrCodeCommitDoesNotExistException,
codecommit.ErrCodeFolderDoesNotExistException,
) {
if hasAwsError(err) {
return false, nil
}
// unhandled exception, propagate out
@ -157,22 +156,22 @@ func (p *AWSCodeCommitProvider) RepoHasPath(ctx context.Context, repo *Repositor
// anything that matches.
for _, submodule := range output.SubModules {
if basePath == aws.StringValue(submodule.RelativePath) {
if basePath == aws.ToString(submodule.RelativePath) {
return true, nil
}
}
for _, subpath := range output.SubFolders {
if basePath == aws.StringValue(subpath.RelativePath) {
if basePath == aws.ToString(subpath.RelativePath) {
return true, nil
}
}
for _, subpath := range output.Files {
if basePath == aws.StringValue(subpath.RelativePath) {
if basePath == aws.ToString(subpath.RelativePath) {
return true, nil
}
}
for _, subpath := range output.SymbolicLinks {
if basePath == aws.StringValue(subpath.RelativePath) {
if basePath == aws.ToString(subpath.RelativePath) {
return true, nil
}
}
@ -182,7 +181,7 @@ func (p *AWSCodeCommitProvider) RepoHasPath(ctx context.Context, repo *Repositor
func (p *AWSCodeCommitProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error) {
repos := make([]*Repository, 0)
if !p.allBranches {
output, err := p.codeCommitClient.GetRepositoryWithContext(ctx, &codecommit.GetRepositoryInput{
output, err := p.codeCommitClient.GetRepository(ctx, &codecommit.GetRepositoryInput{
RepositoryName: aws.String(repo.Repository),
})
if err != nil {
@ -192,7 +191,7 @@ func (p *AWSCodeCommitProvider) GetBranches(ctx context.Context, repo *Repositor
Organization: repo.Organization,
Repository: repo.Repository,
URL: repo.URL,
Branch: aws.StringValue(output.RepositoryMetadata.DefaultBranch),
Branch: aws.ToString(output.RepositoryMetadata.DefaultBranch),
RepositoryId: repo.RepositoryId,
Labels: repo.Labels,
// getting SHA of the branch requires a separate GetBranch call.
@ -204,7 +203,7 @@ func (p *AWSCodeCommitProvider) GetBranches(ctx context.Context, repo *Repositor
RepositoryName: aws.String(repo.Repository),
}
for {
output, err := p.codeCommitClient.ListBranchesWithContext(ctx, input)
output, err := p.codeCommitClient.ListBranches(ctx, input)
if err != nil {
return nil, err
}
@ -213,7 +212,7 @@ func (p *AWSCodeCommitProvider) GetBranches(ctx context.Context, repo *Repositor
Organization: repo.Organization,
Repository: repo.Repository,
URL: repo.URL,
Branch: aws.StringValue(branch),
Branch: branch,
RepositoryId: repo.RepositoryId,
Labels: repo.Labels,
// getting SHA of the branch requires a separate GetBranch call.
@ -222,7 +221,7 @@ func (p *AWSCodeCommitProvider) GetBranches(ctx context.Context, repo *Repositor
})
}
input.NextToken = output.NextToken
if aws.StringValue(output.NextToken) == "" {
if aws.ToString(output.NextToken) == "" {
break
}
}
@ -241,32 +240,32 @@ func (p *AWSCodeCommitProvider) listRepoNames(ctx context.Context) ([]string, er
listReposInput := &codecommit.ListRepositoriesInput{}
var output *codecommit.ListRepositoriesOutput
for {
output, err = p.codeCommitClient.ListRepositoriesWithContext(ctx, listReposInput)
output, err = p.codeCommitClient.ListRepositories(ctx, listReposInput)
if err != nil {
break
}
for _, repo := range output.Repositories {
repoNames = append(repoNames, aws.StringValue(repo.RepositoryName))
repoNames = append(repoNames, aws.ToString(repo.RepositoryName))
}
listReposInput.NextToken = output.NextToken
if aws.StringValue(output.NextToken) == "" {
if aws.ToString(output.NextToken) == "" {
break
}
}
} else {
log.Debugf("tag filer is specified, calling tagging api to list repos")
discoveryInput := &resourcegroupstaggingapi.GetResourcesInput{
ResourceTypeFilters: aws.StringSlice([]string{resourceTypeCodeCommitRepository}),
ResourceTypeFilters: []string{resourceTypeCodeCommitRepository},
TagFilters: tagFilters,
}
var output *resourcegroupstaggingapi.GetResourcesOutput
for {
output, err = p.taggingClient.GetResourcesWithContext(ctx, discoveryInput)
output, err = p.taggingClient.GetResources(ctx, discoveryInput)
if err != nil {
break
}
for _, resource := range output.ResourceTagMappingList {
repoArn := aws.StringValue(resource.ResourceARN)
repoArn := aws.ToString(resource.ResourceARN)
log.Debugf("discovered codecommit repo with arn %s", repoArn)
repoName, extractErr := getCodeCommitRepoName(repoArn)
if extractErr != nil {
@ -276,7 +275,7 @@ func (p *AWSCodeCommitProvider) listRepoNames(ctx context.Context) ([]string, er
repoNames = append(repoNames, repoName)
}
discoveryInput.PaginationToken = output.PaginationToken
if aws.StringValue(output.PaginationToken) == "" {
if aws.ToString(output.PaginationToken) == "" {
break
}
}
@ -284,19 +283,20 @@ func (p *AWSCodeCommitProvider) listRepoNames(ctx context.Context) ([]string, er
return repoNames, err
}
func (p *AWSCodeCommitProvider) getTagFilters() []*resourcegroupstaggingapi.TagFilter {
filters := make(map[string]*resourcegroupstaggingapi.TagFilter)
// getTagFilters filters by tag
func (p *AWSCodeCommitProvider) getTagFilters() []rgsatypes.TagFilter {
filters := make(map[string]rgsatypes.TagFilter)
for _, tagFilter := range p.tagFilters {
filter, hasKey := filters[tagFilter.Key]
if !hasKey {
filter = &resourcegroupstaggingapi.TagFilter{
filter := filters[tagFilter.Key]
if filter.Key == nil {
filter = rgsatypes.TagFilter{
Key: aws.String(tagFilter.Key),
}
filters[tagFilter.Key] = filter
}
if tagFilter.Value != "" {
filter.Values = append(filter.Values, aws.String(tagFilter.Value))
filter.Values = append(filter.Values, tagFilter.Value)
}
filters[tagFilter.Key] = filter
}
return slices.Collect(maps.Values(filters))
}
@ -326,12 +326,15 @@ func getCodeCommitFIPSEndpoint(repoURL string) (string, error) {
return strings.Replace(repoURL, prefixGitURLHTTPS, prefixGitURLHTTPSFIPS, 1), nil
}
func hasAwsError(err error, codes ...string) bool {
var awsErr awserr.Error
if errors.As(err, &awsErr) {
return slices.Contains(codes, awsErr.Code())
}
return false
func hasAwsError(err error) bool {
// Check for common CodeCommit exceptions using SDK v2 typed errors
var repoNotFound *codecommittypes.RepositoryDoesNotExistException
var commitNotFound *codecommittypes.CommitDoesNotExistException
var folderNotFound *codecommittypes.FolderDoesNotExistException
return errors.As(err, &repoNotFound) ||
errors.As(err, &commitNotFound) ||
errors.As(err, &folderNotFound)
}
// toAbsolutePath transforms a path input to absolute path, as required by AWS CodeCommit
@ -343,37 +346,32 @@ func toAbsolutePath(path string) string {
return filepath.ToSlash(filepath.Join("/", path)) //nolint:gocritic // Prepend slash to have an absolute path
}
func createAWSDiscoveryClients(_ context.Context, role string, region string) (*resourcegroupstaggingapi.ResourceGroupsTaggingAPI, *codecommit.CodeCommit, error) {
podSession, err := session.NewSession()
if err != nil {
return nil, nil, fmt.Errorf("error creating new AWS pod session: %w", err)
}
discoverySession := podSession
// assume role if provided - this allows cross account CodeCommit repo discovery.
if role != "" {
log.Debugf("role %s is provided for AWS CodeCommit discovery", role)
assumeRoleCreds := stscreds.NewCredentials(podSession, role)
discoverySession, err = session.NewSession(&aws.Config{
Credentials: assumeRoleCreds,
})
if err != nil {
return nil, nil, fmt.Errorf("error creating new AWS discovery session: %w", err)
}
} else {
log.Debugf("role is not provided for AWS CodeCommit discovery, using pod role")
}
// use region explicitly if provided - this allows cross region CodeCommit repo discovery.
// createAWSDiscoveryClients creates AWS clients
func createAWSDiscoveryClients(ctx context.Context, role string, region string) (*resourcegroupstaggingapi.Client, *codecommit.Client, error) {
var configOpts []func(*config.LoadOptions) error
if region != "" {
log.Debugf("region %s is provided for AWS CodeCommit discovery", region)
discoverySession = discoverySession.Copy(&aws.Config{
Region: aws.String(region),
})
configOpts = append(configOpts, config.WithRegion(region))
} else {
log.Debugf("region is not provided for AWS CodeCommit discovery, using pod region")
}
// Load the default config based on config options
cfg, err := config.LoadDefaultConfig(ctx, configOpts...)
if err != nil {
return nil, nil, fmt.Errorf("error loading default config: %w", err)
}
client := sts.NewFromConfig(cfg)
// assume role if provided - this allows cross account CodeCommit repo discovery.
if role != "" {
log.Debugf("role %s is provided for AWS CodeCommit discovery", role)
assumeRoleCreds := stscreds.NewAssumeRoleProvider(client, role)
cfg.Credentials = aws.NewCredentialsCache(assumeRoleCreds)
} else {
log.Debugf("role is not provided for AWS CodeCommit discovery, using pod role")
}
taggingClient := resourcegroupstaggingapi.New(discoverySession)
codeCommitClient := codecommit.New(discoverySession)
taggingClient := resourcegroupstaggingapi.NewFromConfig(cfg)
codeCommitClient := codecommit.NewFromConfig(cfg)
return taggingClient, codeCommitClient, nil
}

View file

@ -5,10 +5,13 @@ import (
"sort"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/codecommit"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/codecommit"
codecommittypes "github.com/aws/aws-sdk-go-v2/service/codecommit/types"
"github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi"
rgsatypes "github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi/types"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
@ -34,7 +37,7 @@ func TestAWSCodeCommitListRepos(t *testing.T) {
repositories []*awsCodeCommitTestRepository
cloneProtocol string
tagFilters []*v1alpha1.TagFilter
expectTagFilters []*resourcegroupstaggingapi.TagFilter
expectTagFilters []rgsatypes.TagFilter
listRepositoryError error
expectOverallError bool
expectListAtCodeCommit bool
@ -57,8 +60,8 @@ func TestAWSCodeCommitListRepos(t *testing.T) {
{Key: "key1", Value: "value2"},
{Key: "key2"},
},
expectTagFilters: []*resourcegroupstaggingapi.TagFilter{
{Key: aws.String("key1"), Values: aws.StringSlice([]string{"value1", "value2"})},
expectTagFilters: []rgsatypes.TagFilter{
{Key: aws.String("key1"), Values: []string{"value1", "value2"}},
{Key: aws.String("key2")},
},
expectOverallError: false,
@ -80,7 +83,7 @@ func TestAWSCodeCommitListRepos(t *testing.T) {
tagFilters: []*v1alpha1.TagFilter{
{Key: "key1"},
},
expectTagFilters: []*resourcegroupstaggingapi.TagFilter{
expectTagFilters: []rgsatypes.TagFilter{
{Key: aws.String("key1")},
},
expectOverallError: false,
@ -160,12 +163,12 @@ func TestAWSCodeCommitListRepos(t *testing.T) {
codeCommitClient := mocks.NewAWSCodeCommitClient(t)
taggingClient := mocks.NewAWSTaggingClient(t)
ctx := t.Context()
codecommitRepoNameIdPairs := make([]*codecommit.RepositoryNameIdPair, 0)
resourceTaggings := make([]*resourcegroupstaggingapi.ResourceTagMapping, 0)
codecommitRepoNameIdPairs := make([]codecommittypes.RepositoryNameIdPair, 0)
resourceTaggings := make([]rgsatypes.ResourceTagMapping, 0)
validRepositories := make([]*awsCodeCommitTestRepository, 0)
for _, repo := range testCase.repositories {
repoMetadata := &codecommit.RepositoryMetadata{
repoMetadata := &codecommittypes.RepositoryMetadata{
AccountId: aws.String(repo.accountId),
Arn: aws.String(repo.arn),
CloneUrlHttp: aws.String("https://git-codecommit.us-east-1.amazonaws.com/v1/repos/" + repo.name),
@ -177,13 +180,13 @@ func TestAWSCodeCommitListRepos(t *testing.T) {
if repo.getRepositoryNilMetadata {
repoMetadata = nil
}
codeCommitClient.EXPECT().GetRepositoryWithContext(mock.Anything, &codecommit.GetRepositoryInput{RepositoryName: aws.String(repo.name)}).
codeCommitClient.EXPECT().GetRepository(mock.Anything, &codecommit.GetRepositoryInput{RepositoryName: aws.String(repo.name)}).
Return(&codecommit.GetRepositoryOutput{RepositoryMetadata: repoMetadata}, repo.getRepositoryError).Maybe()
codecommitRepoNameIdPairs = append(codecommitRepoNameIdPairs, &codecommit.RepositoryNameIdPair{
codecommitRepoNameIdPairs = append(codecommitRepoNameIdPairs, codecommittypes.RepositoryNameIdPair{
RepositoryId: aws.String(repo.id),
RepositoryName: aws.String(repo.name),
})
resourceTaggings = append(resourceTaggings, &resourcegroupstaggingapi.ResourceTagMapping{
resourceTaggings = append(resourceTaggings, rgsatypes.ResourceTagMapping{
ResourceARN: aws.String(repo.arn),
})
if repo.valid {
@ -192,14 +195,14 @@ func TestAWSCodeCommitListRepos(t *testing.T) {
}
if testCase.expectListAtCodeCommit {
codeCommitClient.EXPECT().ListRepositoriesWithContext(mock.Anything, &codecommit.ListRepositoriesInput{}).
codeCommitClient.EXPECT().ListRepositories(mock.Anything, &codecommit.ListRepositoriesInput{}).
Return(&codecommit.ListRepositoriesOutput{
Repositories: codecommitRepoNameIdPairs,
}, testCase.listRepositoryError).Maybe()
} else {
taggingClient.EXPECT().GetResourcesWithContext(mock.Anything, mock.MatchedBy(equalIgnoringTagFilterOrder(&resourcegroupstaggingapi.GetResourcesInput{
taggingClient.EXPECT().GetResources(mock.Anything, mock.MatchedBy(equalIgnoringTagFilterOrder(&resourcegroupstaggingapi.GetResourcesInput{
TagFilters: testCase.expectTagFilters,
ResourceTypeFilters: aws.StringSlice([]string{resourceTypeCodeCommitRepository}),
ResourceTypeFilters: []string{resourceTypeCodeCommitRepository},
}))).
Return(&resourcegroupstaggingapi.GetResourcesOutput{
ResourceTagMappingList: resourceTaggings,
@ -249,7 +252,7 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
path: "lib/config.yaml",
expectedGetFolderPath: "/lib",
getFolderOutput: &codecommit.GetFolderOutput{
Files: []*codecommit.File{
Files: []codecommittypes.File{
{RelativePath: aws.String("config.yaml")},
},
},
@ -261,7 +264,7 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
path: "lib/config",
expectedGetFolderPath: "/lib",
getFolderOutput: &codecommit.GetFolderOutput{
SubFolders: []*codecommit.Folder{
SubFolders: []codecommittypes.Folder{
{RelativePath: aws.String("config")},
},
},
@ -273,7 +276,7 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
path: "/lib/submodule/",
expectedGetFolderPath: "/lib",
getFolderOutput: &codecommit.GetFolderOutput{
SubModules: []*codecommit.SubModule{
SubModules: []codecommittypes.SubModule{
{RelativePath: aws.String("submodule")},
},
},
@ -285,7 +288,7 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
path: "./lib/service.json",
expectedGetFolderPath: "/lib",
getFolderOutput: &codecommit.GetFolderOutput{
SymbolicLinks: []*codecommit.SymbolicLink{
SymbolicLinks: []codecommittypes.SymbolicLink{
{RelativePath: aws.String("service.json")},
},
},
@ -297,16 +300,16 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
path: "no-match.json",
expectedGetFolderPath: "/",
getFolderOutput: &codecommit.GetFolderOutput{
Files: []*codecommit.File{
Files: []codecommittypes.File{
{RelativePath: aws.String("config.yaml")},
},
SubFolders: []*codecommit.Folder{
SubFolders: []codecommittypes.Folder{
{RelativePath: aws.String("config")},
},
SubModules: []*codecommit.SubModule{
SubModules: []codecommittypes.SubModule{
{RelativePath: aws.String("submodule")},
},
SymbolicLinks: []*codecommit.SymbolicLink{
SymbolicLinks: []codecommittypes.SymbolicLink{
{RelativePath: aws.String("service.json")},
},
},
@ -317,7 +320,7 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
name: "RepoHasPath when parent folder not found",
path: "lib/submodule",
expectedGetFolderPath: "/lib",
getFolderError: &codecommit.FolderDoesNotExistException{},
getFolderError: &codecommittypes.FolderDoesNotExistException{},
expectOverallError: false,
},
{
@ -347,7 +350,7 @@ func TestAWSCodeCommitRepoHasPath(t *testing.T) {
taggingClient := mocks.NewAWSTaggingClient(t)
ctx := t.Context()
if testCase.expectedGetFolderPath != "" {
codeCommitClient.EXPECT().GetFolderWithContext(mock.Anything, &codecommit.GetFolderInput{
codeCommitClient.EXPECT().GetFolder(mock.Anything, &codecommit.GetFolderInput{
CommitSpecifier: aws.String(branch),
FolderPath: aws.String(testCase.expectedGetFolderPath),
RepositoryName: aws.String(repoName),
@ -419,13 +422,15 @@ func TestAWSCodeCommitGetBranches(t *testing.T) {
taggingClient := mocks.NewAWSTaggingClient(t)
ctx := t.Context()
if testCase.allBranches {
codeCommitClient.EXPECT().ListBranchesWithContext(mock.Anything, &codecommit.ListBranchesInput{
branches := make([]string, len(testCase.branches))
copy(branches, testCase.branches)
codeCommitClient.EXPECT().ListBranches(mock.Anything, &codecommit.ListBranchesInput{
RepositoryName: aws.String(name),
}).
Return(&codecommit.ListBranchesOutput{Branches: aws.StringSlice(testCase.branches)}, testCase.apiError).Maybe()
Return(&codecommit.ListBranchesOutput{Branches: branches}, testCase.apiError).Maybe()
} else {
codeCommitClient.EXPECT().GetRepositoryWithContext(mock.Anything, &codecommit.GetRepositoryInput{RepositoryName: aws.String(name)}).
Return(&codecommit.GetRepositoryOutput{RepositoryMetadata: &codecommit.RepositoryMetadata{
codeCommitClient.EXPECT().GetRepository(mock.Anything, &codecommit.GetRepositoryInput{RepositoryName: aws.String(name)}).
Return(&codecommit.GetRepositoryOutput{RepositoryMetadata: &codecommittypes.RepositoryMetadata{
AccountId: aws.String(organization),
DefaultBranch: aws.String(defaultBranch),
}}, testCase.apiError).Maybe()
@ -470,8 +475,22 @@ func TestAWSCodeCommitGetBranches(t *testing.T) {
func equalIgnoringTagFilterOrder(expected *resourcegroupstaggingapi.GetResourcesInput) func(*resourcegroupstaggingapi.GetResourcesInput) bool {
return func(actual *resourcegroupstaggingapi.GetResourcesInput) bool {
sort.Slice(actual.TagFilters, func(i, j int) bool {
return *actual.TagFilters[i].Key < *actual.TagFilters[j].Key
keyI := ""
keyJ := ""
if actual.TagFilters[i].Key != nil {
keyI = *actual.TagFilters[i].Key
}
if actual.TagFilters[j].Key != nil {
keyJ = *actual.TagFilters[j].Key
}
return keyI < keyJ
})
return cmp.Equal(expected, actual)
// Ignore unexported fields in AWS SDK v2 types
return cmp.Equal(expected, actual,
cmpopts.IgnoreUnexported(
rgsatypes.TagFilter{},
resourcegroupstaggingapi.GetResourcesInput{},
),
)
}
}

View file

@ -9,7 +9,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"k8s.io/utils/ptr"
"github.com/microsoft/azure-devops-go-api/azuredevops/v7"
azureGit "github.com/microsoft/azure-devops-go-api/azuredevops/v7/git"
@ -18,10 +17,6 @@ import (
"github.com/argoproj/argo-cd/v3/applicationset/services/scm_provider/mocks"
)
func s(input string) *string {
return ptr.To(input)
}
func TestAzureDevopsRepoHasPath(t *testing.T) {
organization := "myorg"
teamProject := "myorg_project"
@ -51,12 +46,12 @@ func TestAzureDevopsRepoHasPath(t *testing.T) {
{
name: "RepoHasPath when no path found returns false",
pathFound: false,
azureDevopsError: azuredevops.WrappedError{TypeKey: s(AzureDevOpsErrorsTypeKeyValues.GitItemNotFound)},
azureDevopsError: azuredevops.WrappedError{TypeKey: new(AzureDevOpsErrorsTypeKeyValues.GitItemNotFound)},
},
{
name: "RepoHasPath when unknown Azure DevOps WrappedError occurs returns error",
pathFound: false,
azureDevopsError: azuredevops.WrappedError{TypeKey: s("OtherAzureDevopsException")},
azureDevopsError: azuredevops.WrappedError{TypeKey: new("OtherAzureDevopsException")},
returnError: true,
errorMessage: "failed to check for path existence",
},
@ -124,12 +119,12 @@ func TestGetDefaultBranchOnDisabledRepo(t *testing.T) {
}{
{
name: "azure devops error when disabled repo causes empty return value",
azureDevOpsError: azuredevops.WrappedError{TypeKey: s(AzureDevOpsErrorsTypeKeyValues.GitRepositoryNotFound)},
azureDevOpsError: azuredevops.WrappedError{TypeKey: new(AzureDevOpsErrorsTypeKeyValues.GitRepositoryNotFound)},
shouldReturnError: false,
},
{
name: "azure devops error with unknown error type returns error",
azureDevOpsError: azuredevops.WrappedError{TypeKey: s("OtherError")},
azureDevOpsError: azuredevops.WrappedError{TypeKey: new("OtherError")},
shouldReturnError: true,
},
{
@ -181,12 +176,12 @@ func TestGetAllBranchesOnDisabledRepo(t *testing.T) {
}{
{
name: "azure devops error when disabled repo causes empty return value",
azureDevOpsError: azuredevops.WrappedError{TypeKey: s(AzureDevOpsErrorsTypeKeyValues.GitRepositoryNotFound)},
azureDevOpsError: azuredevops.WrappedError{TypeKey: new(AzureDevOpsErrorsTypeKeyValues.GitRepositoryNotFound)},
shouldReturnError: false,
},
{
name: "azure devops error with unknown error type returns error",
azureDevOpsError: azuredevops.WrappedError{TypeKey: s("OtherError")},
azureDevOpsError: azuredevops.WrappedError{TypeKey: new("OtherError")},
shouldReturnError: true,
},
{
@ -234,7 +229,7 @@ func TestAzureDevOpsGetDefaultBranchStripsRefsName(t *testing.T) {
strippedBranchName := "somebranch"
defaultBranch := fmt.Sprintf("refs/heads/%v", strippedBranchName)
branchReturn := &azureGit.GitBranchStats{Name: &strippedBranchName, Commit: &azureGit.GitCommitRef{CommitId: s("abc123233223")}}
branchReturn := &azureGit.GitBranchStats{Name: &strippedBranchName, Commit: &azureGit.GitCommitRef{CommitId: new("abc123233223")}}
repo := &Repository{Organization: organization, Repository: repoName, RepositoryId: uuid, Branch: defaultBranch}
gitClientMock := &azureMock.Client{}
@ -273,7 +268,7 @@ func TestAzureDevOpsGetBranchesDefultBranchOnly(t *testing.T) {
}{
{
name: "GetBranches AllBranches false when single branch returned returns branch",
expectedBranch: &azureGit.GitBranchStats{Name: &defaultBranch, Commit: &azureGit.GitCommitRef{CommitId: s("abc123233223")}},
expectedBranch: &azureGit.GitBranchStats{Name: &defaultBranch, Commit: &azureGit.GitCommitRef{CommitId: new("abc123233223")}},
},
{
name: "GetBranches AllBranches false when request fails returns error and empty result",
@ -285,7 +280,7 @@ func TestAzureDevOpsGetBranchesDefultBranchOnly(t *testing.T) {
},
{
name: "GetBranches AllBranches false when branch returned with long commit SHA",
expectedBranch: &azureGit.GitBranchStats{Name: &defaultBranch, Commit: &azureGit.GitCommitRef{CommitId: s("53863052ADF24229AB72154B4D83DAB7")}},
expectedBranch: &azureGit.GitBranchStats{Name: &defaultBranch, Commit: &azureGit.GitCommitRef{CommitId: new("53863052ADF24229AB72154B4D83DAB7")}},
},
}
@ -344,7 +339,7 @@ func TestAzureDevopsGetBranches(t *testing.T) {
}{
{
name: "GetBranches when single branch returned returns this branch info",
expectedBranches: &[]azureGit.GitBranchStats{{Name: s("feature-feat1"), Commit: &azureGit.GitCommitRef{CommitId: s("abc123233223")}}},
expectedBranches: &[]azureGit.GitBranchStats{{Name: new("feature-feat1"), Commit: &azureGit.GitCommitRef{CommitId: new("abc123233223")}}},
allBranches: true,
},
{
@ -365,9 +360,9 @@ func TestAzureDevopsGetBranches(t *testing.T) {
{
name: "GetBranches when multiple branches returned returns branch info for all branches",
expectedBranches: &[]azureGit.GitBranchStats{
{Name: s("feature-feat1"), Commit: &azureGit.GitCommitRef{CommitId: s("abc123233223")}},
{Name: s("feature/feat2"), Commit: &azureGit.GitCommitRef{CommitId: s("4334")}},
{Name: s("feature/feat2"), Commit: &azureGit.GitCommitRef{CommitId: s("53863052ADF24229AB72154B4D83DAB7")}},
{Name: new("feature-feat1"), Commit: &azureGit.GitCommitRef{CommitId: new("abc123233223")}},
{Name: new("feature/feat2"), Commit: &azureGit.GitCommitRef{CommitId: new("4334")}},
{Name: new("feature/feat2"), Commit: &azureGit.GitCommitRef{CommitId: new("53863052ADF24229AB72154B4D83DAB7")}},
},
allBranches: true,
},
@ -434,12 +429,12 @@ func TestGetAzureDevopsRepositories(t *testing.T) {
}{
{
name: "ListRepos when single repo found returns repo info",
repositories: []azureGit.GitRepository{{Name: s("repo1"), DefaultBranch: s("main"), RemoteUrl: s("https://remoteurl.u"), Id: repoId}},
repositories: []azureGit.GitRepository{{Name: new("repo1"), DefaultBranch: new("main"), RemoteUrl: new("https://remoteurl.u"), Id: repoId}},
expectedNumberOfRepos: 1,
},
{
name: "ListRepos when repo has no default branch returns empty list",
repositories: []azureGit.GitRepository{{Name: s("repo2"), RemoteUrl: s("https://remoteurl.u"), Id: repoId}},
repositories: []azureGit.GitRepository{{Name: new("repo2"), RemoteUrl: new("https://remoteurl.u"), Id: repoId}},
},
{
name: "ListRepos when Azure DevOps request fails returns error",
@ -447,24 +442,24 @@ func TestGetAzureDevopsRepositories(t *testing.T) {
},
{
name: "ListRepos when repo has no name returns empty list",
repositories: []azureGit.GitRepository{{DefaultBranch: s("main"), RemoteUrl: s("https://remoteurl.u"), Id: repoId}},
repositories: []azureGit.GitRepository{{DefaultBranch: new("main"), RemoteUrl: new("https://remoteurl.u"), Id: repoId}},
},
{
name: "ListRepos when repo has no remote URL returns empty list",
repositories: []azureGit.GitRepository{{DefaultBranch: s("main"), Name: s("repo_name"), Id: repoId}},
repositories: []azureGit.GitRepository{{DefaultBranch: new("main"), Name: new("repo_name"), Id: repoId}},
},
{
name: "ListRepos when repo has no ID returns empty list",
repositories: []azureGit.GitRepository{{DefaultBranch: s("main"), Name: s("repo_name"), RemoteUrl: s("https://remoteurl.u")}},
repositories: []azureGit.GitRepository{{DefaultBranch: new("main"), Name: new("repo_name"), RemoteUrl: new("https://remoteurl.u")}},
},
{
name: "ListRepos when multiple repos returned returns list of eligible repos only",
repositories: []azureGit.GitRepository{
{Name: s("returned1"), DefaultBranch: s("main"), RemoteUrl: s("https://remoteurl.u"), Id: repoId},
{Name: s("missing_default_branch"), RemoteUrl: s("https://remoteurl.u"), Id: repoId},
{DefaultBranch: s("missing_name"), RemoteUrl: s("https://remoteurl.u"), Id: repoId},
{Name: s("missing_remote_url"), DefaultBranch: s("main"), Id: repoId},
{Name: s("missing_id"), DefaultBranch: s("main"), RemoteUrl: s("https://remoteurl.u")},
{Name: new("returned1"), DefaultBranch: new("main"), RemoteUrl: new("https://remoteurl.u"), Id: repoId},
{Name: new("missing_default_branch"), RemoteUrl: new("https://remoteurl.u"), Id: repoId},
{DefaultBranch: new("missing_name"), RemoteUrl: new("https://remoteurl.u"), Id: repoId},
{Name: new("missing_remote_url"), DefaultBranch: new("main"), Id: repoId},
{Name: new("missing_id"), DefaultBranch: new("main"), RemoteUrl: new("https://remoteurl.u")},
},
expectedNumberOfRepos: 1,
},
@ -473,7 +468,7 @@ func TestGetAzureDevopsRepositories(t *testing.T) {
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
gitClientMock := azureMock.NewClient(t)
gitClientMock.EXPECT().GetRepositories(mock.Anything, azureGit.GetRepositoriesArgs{Project: s(teamProject)}).Return(&testCase.repositories, testCase.getRepositoriesError)
gitClientMock.EXPECT().GetRepositories(mock.Anything, azureGit.GetRepositoriesArgs{Project: new(teamProject)}).Return(&testCase.repositories, testCase.getRepositoriesError)
clientFactoryMock := &mocks.AzureDevOpsClientFactory{}
clientFactoryMock.EXPECT().GetClient(mock.Anything).Return(gitClientMock, nil)

View file

@ -445,7 +445,6 @@ func TestListReposTLS(t *testing.T) {
}
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
defaultHandler(t)(w, r)

View file

@ -12,14 +12,15 @@ import (
)
type GiteaProvider struct {
client *gitea.Client
owner string
allBranches bool
client *gitea.Client
owner string
allBranches bool
excludeArchivedRepos bool
}
var _ SCMProviderService = &GiteaProvider{}
func NewGiteaProvider(owner, token, url string, allBranches, insecure bool) (*GiteaProvider, error) {
func NewGiteaProvider(owner, token, url string, allBranches, insecure, excludeArchivedRepos bool) (*GiteaProvider, error) {
if token == "" {
token = os.Getenv("GITEA_TOKEN")
}
@ -40,9 +41,10 @@ func NewGiteaProvider(owner, token, url string, allBranches, insecure bool) (*Gi
return nil, fmt.Errorf("error creating a new gitea client: %w", err)
}
return &GiteaProvider{
client: client,
owner: owner,
allBranches: allBranches,
client: client,
owner: owner,
allBranches: allBranches,
excludeArchivedRepos: excludeArchivedRepos,
}, nil
}
@ -114,6 +116,11 @@ func (g *GiteaProvider) ListRepos(_ context.Context, cloneProtocol string) ([]*R
for _, label := range giteaLabels {
labels = append(labels, label.Name)
}
if g.excludeArchivedRepos && repo.Archived {
continue
}
repos = append(repos, &Repository{
Organization: g.owner,
Repository: repo.Name,

View file

@ -100,17 +100,96 @@ func giteaMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"repo_transfer": null
}]`)
},
{
"id": 21619,
"owner": {
"id": 31480,
"login": "test-argocd",
"full_name": "",
"email": "",
"avatar_url": "https://gitea.com/avatars/22d1b1d3f61abf95951c4a958731d848",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2022-04-06T02:28:06+08:00",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "test-argocd"
},
"name": "another-repo",
"full_name": "test-argocd/another-repo",
"description": "",
"empty": false,
"private": false,
"fork": false,
"template": false,
"parent": null,
"mirror": false,
"size": 28,
"language": "",
"languages_url": "https://gitea.com/api/v1/repos/test-argocd/another-repo/languages",
"html_url": "https://gitea.com/test-argocd/another-repo",
"ssh_url": "git@gitea.com:test-argocd/another-repo.git",
"clone_url": "https://gitea.com/test-argocd/another-repo.git",
"original_url": "",
"website": "",
"stars_count": 0,
"forks_count": 0,
"watchers_count": 1,
"open_issues_count": 0,
"open_pr_counter": 1,
"release_counter": 0,
"default_branch": "main",
"archived": true,
"created_at": "2022-04-06T02:32:09+08:00",
"updated_at": "2022-04-06T02:33:12+08:00",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"has_issues": true,
"internal_tracker": {
"enable_time_tracker": true,
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true
},
"has_wiki": true,
"has_pull_requests": true,
"has_projects": true,
"ignore_whitespace_conflicts": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_squash_merge": true,
"default_merge_style": "merge",
"avatar_url": "",
"internal": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"repo_transfer": null
}
]`)
if err != nil {
t.Fail()
}
case "/api/v1/repos/test-argocd/pr-test/branches/main":
case "/api/v1/repos/test-argocd/another-repo/branches/main":
_, err := io.WriteString(w, `{
"name": "main",
"commit": {
"id": "72687815ccba81ef014a96201cc2e846a68789d8",
"id": "1fa33898cf84e89836863e3a5e76eee45777b4b0",
"message": "initial commit\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/72687815ccba81ef014a96201cc2e846a68789d8",
"url": "https://gitea.com/test-argocd/pr-test/commit/1fa33898cf84e89836863e3a5e76eee45777b4b0",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
@ -144,13 +223,209 @@ func giteaMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
if err != nil {
t.Fail()
}
case "/api/v1/repos/test-argocd/pr-test/branches/test":
_, err := io.WriteString(w, `{
"name": "test",
"commit": {
"id": "28c3b329933f6fefd9b55225535123bbffec5a46",
"message": "initial commit\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/28c3b329933f6fefd9b55225535123bbffec5a46",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"committer": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"verification": {
"verified": false,
"reason": "gpg.error.no_gpg_keys_found",
"signature": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEXYAkwEBRpXzXgHFWlgCr7m50zBMFAmJMiqUACgkQlgCr7m50\nzBPSmQgAiVVEIxC42tuks4iGFNURrtYvypZAEIc+hJgt2kBpmdCrAphYPeAj+Wtr\n9KT7dDscCZIba2wx39HEXO2S7wNCXESvAzrA8rdfbXjR4L2miZ1urfBkEoqK5i/F\noblWGuAyjurX4KPa2ARROd0H4AXxt6gNAXaFPgZO+xXCyNKZfad/lkEP1AiPRknD\nvTTMbEkIzFHK9iVwZ9DORGpfF1wnLzxWmMfhYatZnBgFNnoeJNtFhCJo05rHBgqc\nqVZWXt1iF7nysBoXSzyx1ZAsmBr/Qerkuj0nonh0aPVa6NKJsdmeJyPX4zXXoi6E\ne/jpxX2UQJkpFezg3IjUpvE5FvIiYg==\n=3Af2\n-----END PGP SIGNATURE-----\n",
"signer": null,
"payload": "tree 64d47c7fc6e31dcf00654223ec4ab749dd0a464e\nauthor Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\ncommitter Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\n\ninitial commit\n"
},
"timestamp": "2022-04-05T14:29:51-04:00",
"added": null,
"removed": null,
"modified": null
},
"protected": false,
"required_approvals": 0,
"enable_status_check": false,
"status_check_contexts": [],
"user_can_push": false,
"user_can_merge": false,
"effective_branch_protection_name": ""
}`)
if err != nil {
t.Fail()
}
case "/api/v1/repos/test-argocd/another-repo/branches/test":
_, err := io.WriteString(w, `{
"name": "test",
"commit": {
"id": "32cdcf613b259a9439ceabd4d1745d43f163ea70",
"message": "initial commit\n",
"url": "https://gitea.com/test-argocd/another-repo/commit/32cdcf613b259a9439ceabd4d1745d43f163ea70",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"committer": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"verification": {
"verified": false,
"reason": "gpg.error.no_gpg_keys_found",
"signature": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEXYAkwEBRpXzXgHFWlgCr7m50zBMFAmJMiqUACgkQlgCr7m50\nzBPSmQgAiVVEIxC42tuks4iGFNURrtYvypZAEIc+hJgt2kBpmdCrAphYPeAj+Wtr\n9KT7dDscCZIba2wx39HEXO2S7wNCXESvAzrA8rdfbXjR4L2miZ1urfBkEoqK5i/F\noblWGuAyjurX4KPa2ARROd0H4AXxt6gNAXaFPgZO+xXCyNKZfad/lkEP1AiPRknD\nvTTMbEkIzFHK9iVwZ9DORGpfF1wnLzxWmMfhYatZnBgFNnoeJNtFhCJo05rHBgqc\nqVZWXt1iF7nysBoXSzyx1ZAsmBr/Qerkuj0nonh0aPVa6NKJsdmeJyPX4zXXoi6E\ne/jpxX2UQJkpFezg3IjUpvE5FvIiYg==\n=3Af2\n-----END PGP SIGNATURE-----\n",
"signer": null,
"payload": "tree 64d47c7fc6e31dcf00654223ec4ab749dd0a464e\nauthor Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\ncommitter Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\n\ninitial commit\n"
},
"timestamp": "2022-04-05T14:29:51-04:00",
"added": null,
"removed": null,
"modified": null
},
"protected": false,
"required_approvals": 0,
"enable_status_check": false,
"status_check_contexts": [],
"user_can_push": false,
"user_can_merge": false,
"effective_branch_protection_name": ""
}`)
if err != nil {
t.Fail()
}
case "/api/v1/repos/test-argocd/pr-test/branches/main":
_, err := io.WriteString(w, `{
"name": "main",
"commit": {
"id": "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
"message": "initial commit\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/75f6fceff80f6aaf12b65a2cf6a89190b866625b",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"committer": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"verification": {
"verified": false,
"reason": "gpg.error.no_gpg_keys_found",
"signature": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEXYAkwEBRpXzXgHFWlgCr7m50zBMFAmJMiqUACgkQlgCr7m50\nzBPSmQgAiVVEIxC42tuks4iGFNURrtYvypZAEIc+hJgt2kBpmdCrAphYPeAj+Wtr\n9KT7dDscCZIba2wx39HEXO2S7wNCXESvAzrA8rdfbXjR4L2miZ1urfBkEoqK5i/F\noblWGuAyjurX4KPa2ARROd0H4AXxt6gNAXaFPgZO+xXCyNKZfad/lkEP1AiPRknD\nvTTMbEkIzFHK9iVwZ9DORGpfF1wnLzxWmMfhYatZnBgFNnoeJNtFhCJo05rHBgqc\nqVZWXt1iF7nysBoXSzyx1ZAsmBr/Qerkuj0nonh0aPVa6NKJsdmeJyPX4zXXoi6E\ne/jpxX2UQJkpFezg3IjUpvE5FvIiYg==\n=3Af2\n-----END PGP SIGNATURE-----\n",
"signer": null,
"payload": "tree 64d47c7fc6e31dcf00654223ec4ab749dd0a464e\nauthor Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\ncommitter Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\n\ninitial commit\n"
},
"timestamp": "2022-04-05T14:29:51-04:00",
"added": null,
"removed": null,
"modified": null
},
"protected": false,
"required_approvals": 0,
"enable_status_check": false,
"status_check_contexts": [],
"user_can_push": false,
"user_can_merge": false,
"effective_branch_protection_name": ""
}`)
if err != nil {
t.Fail()
}
case "/api/v1/repos/test-argocd/another-repo/branches?limit=0&page=1":
_, err := io.WriteString(w, `[{
"name": "main",
"commit": {
"id": "1fa33898cf84e89836863e3a5e76eee45777b4b0",
"message": "initial commit\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/1fa33898cf84e89836863e3a5e76eee45777b4b0",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"committer": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"verification": {
"verified": false,
"reason": "gpg.error.no_gpg_keys_found",
"signature": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEXYAkwEBRpXzXgHFWlgCr7m50zBMFAmJMiqUACgkQlgCr7m50\nzBPSmQgAiVVEIxC42tuks4iGFNURrtYvypZAEIc+hJgt2kBpmdCrAphYPeAj+Wtr\n9KT7dDscCZIba2wx39HEXO2S7wNCXESvAzrA8rdfbXjR4L2miZ1urfBkEoqK5i/F\noblWGuAyjurX4KPa2ARROd0H4AXxt6gNAXaFPgZO+xXCyNKZfad/lkEP1AiPRknD\nvTTMbEkIzFHK9iVwZ9DORGpfF1wnLzxWmMfhYatZnBgFNnoeJNtFhCJo05rHBgqc\nqVZWXt1iF7nysBoXSzyx1ZAsmBr/Qerkuj0nonh0aPVa6NKJsdmeJyPX4zXXoi6E\ne/jpxX2UQJkpFezg3IjUpvE5FvIiYg==\n=3Af2\n-----END PGP SIGNATURE-----\n",
"signer": null,
"payload": "tree 64d47c7fc6e31dcf00654223ec4ab749dd0a464e\nauthor Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\ncommitter Dan Molik \u003cdan@danmolik.com\u003e 1649183391 -0400\n\ninitial commit\n"
},
"timestamp": "2022-04-05T14:29:51-04:00",
"added": null,
"removed": null,
"modified": null
},
"protected": false,
"required_approvals": 0,
"enable_status_check": false,
"status_check_contexts": [],
"user_can_push": false,
"user_can_merge": false,
"effective_branch_protection_name": ""
},
{
"name": "test",
"commit": {
"id": "32cdcf613b259a9439ceabd4d1745d43f163ea70",
"message": "add an empty file\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/32cdcf613b259a9439ceabd4d1745d43f163ea70",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"committer": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
"username": "graytshirt"
},
"verification": {
"verified": false,
"reason": "gpg.error.no_gpg_keys_found",
"signature": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEXYAkwEBRpXzXgHFWlgCr7m50zBMFAmJMiugACgkQlgCr7m50\nzBN+7wgAkCHD3KfX3Ffkqv2qPwqgHNYM1bA6Hmffzhv0YeD9jWCI3tp0JulP4iFZ\ncQ7jqx9xP9tCQMSFCaijLRHaE6Js1xrVtf0OKRkbpdlvkyrIM3sQhqyQgAsISrDG\nLzSqeoQQjglzeWESYh2Tjn1CgqQNKjI6LLepSwvF1pIeV4pJpJobaEbIfTgStdzM\nWEk8o0I+EZaYqK0C0vU9N0LK/LR/jnlaHsb4OUjvk+S7lRjZwBkrsg7P/QsqtCVd\nw5nkxDiCx1J58zKMnQ7ZinJEK9A5WYdnMYc6aBn7ARgZrblXPPBkkKUhEv3ZSPeW\nKv9i4GQy838xkVSTFkHNj1+a5o6zEA==\n=JiFw\n-----END PGP SIGNATURE-----\n",
"signer": null,
"payload": "tree cdddf3e1d6a8a7e6899a044d0e1bc73bf798e2f5\nparent 72687815ccba81ef014a96201cc2e846a68789d8\nauthor Dan Molik \u003cdan@danmolik.com\u003e 1649183458 -0400\ncommitter Dan Molik \u003cdan@danmolik.com\u003e 1649183458 -0400\n\nadd an empty file\n"
},
"timestamp": "2022-04-05T14:30:58-04:00",
"added": null,
"removed": null,
"modified": null
},
"protected": false,
"required_approvals": 0,
"enable_status_check": false,
"status_check_contexts": [],
"user_can_push": false,
"user_can_merge": false,
"effective_branch_protection_name": ""
}]`)
if err != nil {
t.Fail()
}
case "/api/v1/repos/test-argocd/pr-test/branches?limit=0&page=1":
_, err := io.WriteString(w, `[{
"name": "main",
"commit": {
"id": "72687815ccba81ef014a96201cc2e846a68789d8",
"id": "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
"message": "initial commit\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/72687815ccba81ef014a96201cc2e846a68789d8",
"url": "https://gitea.com/test-argocd/pr-test/commit/75f6fceff80f6aaf12b65a2cf6a89190b866625b",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
@ -183,9 +458,9 @@ func giteaMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
}, {
"name": "test",
"commit": {
"id": "7bbaf62d92ddfafd9cc8b340c619abaec32bc09f",
"id": "28c3b329933f6fefd9b55225535123bbffec5a46",
"message": "add an empty file\n",
"url": "https://gitea.com/test-argocd/pr-test/commit/7bbaf62d92ddfafd9cc8b340c619abaec32bc09f",
"url": "https://gitea.com/test-argocd/pr-test/commit/28c3b329933f6fefd9b55225535123bbffec5a46",
"author": {
"name": "Dan Molik",
"email": "dan@danmolik.com",
@ -261,40 +536,270 @@ func giteaMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
func TestGiteaListRepos(t *testing.T) {
cases := []struct {
name, proto, url string
name, proto string
hasError, allBranches, includeSubgroups bool
excludeArchivedRepos bool
branches []string
expectedRepos []*Repository
filters []v1alpha1.SCMProviderGeneratorFilter
}{
{
name: "blank protocol",
allBranches: false,
url: "git@gitea.com:test-argocd/pr-test.git",
branches: []string{"main"},
name: "blank protocol",
allBranches: false,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"main"},
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
RepositoryId: 21618,
Labels: []string{},
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "main",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "1fa33898cf84e89836863e3a5e76eee45777b4b0",
RepositoryId: 21619,
Labels: []string{},
},
},
},
{
name: "ssh protocol",
allBranches: false,
proto: "ssh",
url: "git@gitea.com:test-argocd/pr-test.git",
name: "ssh protocol",
allBranches: false,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
proto: "ssh",
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
RepositoryId: 21618,
Labels: []string{},
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "main",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "1fa33898cf84e89836863e3a5e76eee45777b4b0",
RepositoryId: 21619,
Labels: []string{},
},
},
},
{
name: "https protocol",
allBranches: false,
proto: "https",
url: "https://gitea.com/test-argocd/pr-test",
name: "https protocol",
allBranches: false,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
proto: "https",
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "https://gitea.com/test-argocd/pr-test",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
RepositoryId: 21618,
Labels: []string{},
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "main",
URL: "https://gitea.com/test-argocd/another-repo",
SHA: "1fa33898cf84e89836863e3a5e76eee45777b4b0",
RepositoryId: 21619,
Labels: []string{},
},
},
},
{
name: "other protocol",
allBranches: false,
proto: "other",
hasError: true,
name: "other protocol",
allBranches: false,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
proto: "other",
hasError: true,
expectedRepos: []*Repository{},
},
{
name: "all branches",
allBranches: true,
url: "git@gitea.com:test-argocd/pr-test.git",
branches: []string{"main"},
name: "all branches including archived repos",
allBranches: true,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "main",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "1fa33898cf84e89836863e3a5e76eee45777b4b0",
Labels: []string{},
RepositoryId: 21619,
},
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "test",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "28c3b329933f6fefd9b55225535123bbffec5a46",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "test",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "32cdcf613b259a9439ceabd4d1745d43f163ea70",
Labels: []string{},
RepositoryId: 21619,
},
},
},
{
name: "all branches",
allBranches: true,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "main",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "1fa33898cf84e89836863e3a5e76eee45777b4b0",
Labels: []string{},
RepositoryId: 21619,
},
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "test",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "28c3b329933f6fefd9b55225535123bbffec5a46",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "test",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "32cdcf613b259a9439ceabd4d1745d43f163ea70",
Labels: []string{},
RepositoryId: 21619,
},
},
},
{
name: "all branches",
allBranches: true,
excludeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"main"},
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "main",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "1fa33898cf84e89836863e3a5e76eee45777b4b0",
Labels: []string{},
RepositoryId: 21619,
},
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "test",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "28c3b329933f6fefd9b55225535123bbffec5a46",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "another-repo",
Branch: "test",
URL: "git@gitea.com:test-argocd/another-repo.git",
SHA: "32cdcf613b259a9439ceabd4d1745d43f163ea70",
Labels: []string{},
RepositoryId: 21619,
},
},
},
{
name: "all branches with no archived repos",
allBranches: true,
excludeArchivedRepos: true,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"main"},
expectedRepos: []*Repository{
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "main",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "75f6fceff80f6aaf12b65a2cf6a89190b866625b",
Labels: []string{},
RepositoryId: 21618,
},
{
Organization: "test-argocd",
Repository: "pr-test",
Branch: "test",
URL: "git@gitea.com:test-argocd/pr-test.git",
SHA: "28c3b329933f6fefd9b55225535123bbffec5a46",
Labels: []string{},
RepositoryId: 21618,
},
},
},
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@ -303,26 +808,19 @@ func TestGiteaListRepos(t *testing.T) {
defer ts.Close()
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
provider, _ := NewGiteaProvider("test-argocd", "", ts.URL, c.allBranches, false)
provider, _ := NewGiteaProvider("test-argocd", "", ts.URL, c.allBranches, false, c.excludeArchivedRepos)
rawRepos, err := ListRepos(t.Context(), provider, c.filters, c.proto)
if c.hasError {
require.Error(t, err)
} else {
require.NoError(t, err)
// Just check that this one project shows up. Not a great test but better thing nothing?
repos := []*Repository{}
branches := []string{}
for _, r := range rawRepos {
if r.Repository == "pr-test" {
repos = append(repos, r)
branches = append(branches, r.Branch)
}
}
repos = append(rawRepos, repos...)
assert.NotEmpty(t, repos)
assert.Equal(t, c.url, repos[0].URL)
for _, b := range c.branches {
assert.Contains(t, branches, b)
}
assert.Len(t, repos, len(c.expectedRepos))
assert.ElementsMatch(t, c.expectedRepos, repos)
}
})
}
@ -333,7 +831,7 @@ func TestGiteaHasPath(t *testing.T) {
giteaMockHandler(t)(w, r)
}))
defer ts.Close()
host, _ := NewGiteaProvider("gitea", "", ts.URL, false, false)
host, _ := NewGiteaProvider("gitea", "", ts.URL, false, false, false)
repo := &Repository{
Organization: "gitea",
Repository: "go-sdk",

View file

@ -12,14 +12,15 @@ import (
)
type GithubProvider struct {
client *github.Client
organization string
allBranches bool
client *github.Client
organization string
allBranches bool
excludeArchivedRepos bool
}
var _ SCMProviderService = &GithubProvider{}
func NewGithubProvider(organization string, token string, url string, allBranches bool, optionalHTTPClient ...*http.Client) (*GithubProvider, error) {
func NewGithubProvider(organization string, token string, url string, allBranches bool, excludeArchivedRepos bool, optionalHTTPClient ...*http.Client) (*GithubProvider, error) {
// Undocumented environment variable to set a default token, to be used in testing to dodge anonymous rate limits.
if token == "" {
token = os.Getenv("GITHUB_TOKEN")
@ -45,7 +46,7 @@ func NewGithubProvider(organization string, token string, url string, allBranche
return nil, err
}
}
return &GithubProvider{client: client, organization: organization, allBranches: allBranches}, nil
return &GithubProvider{client: client, organization: organization, allBranches: allBranches, excludeArchivedRepos: excludeArchivedRepos}, nil
}
func (g *GithubProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error) {
@ -90,6 +91,11 @@ func (g *GithubProvider) ListRepos(ctx context.Context, cloneProtocol string) ([
default:
return nil, fmt.Errorf("unknown clone protocol for GitHub %v", cloneProtocol)
}
if g.excludeArchivedRepos && githubRepo.GetArchived() {
continue
}
repos = append(repos, &Repository{
Organization: githubRepo.Owner.GetLogin(),
Repository: githubRepo.GetName(),

View file

@ -9,11 +9,11 @@ import (
appsetutils "github.com/argoproj/argo-cd/v3/applicationset/utils"
)
func NewGithubAppProviderFor(ctx context.Context, g github_app_auth.Authentication, organization string, url string, allBranches bool, optionalHTTPClient ...*http.Client) (*GithubProvider, error) {
func NewGithubAppProviderFor(ctx context.Context, g github_app_auth.Authentication, organization string, url string, allBranches bool, excludeArchivedRepos bool, optionalHTTPClient ...*http.Client) (*GithubProvider, error) {
httpClient := appsetutils.GetOptionalHTTPClient(optionalHTTPClient...)
client, err := github_app.Client(ctx, g, url, organization, httpClient)
if err != nil {
return nil, err
}
return &GithubProvider{client: client, organization: organization, allBranches: allBranches}, nil
return &GithubProvider{client: client, organization: organization, allBranches: allBranches, excludeArchivedRepos: excludeArchivedRepos}, nil
}

View file

@ -122,6 +122,110 @@ func githubMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
"pull": true
},
"template_repository": null
},
{
"id": 1296270,
"node_id": "MDEwOlJlcGsddRvcnkxMjk2MjY5",
"name": "another-repo",
"full_name": "argoproj/another-repo",
"owner": {
"login": "argoproj",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/argoproj_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/argoproj",
"html_url": "https://github.com/argoproj",
"followers_url": "https://api.github.com/users/argoproj/followers",
"following_url": "https://api.github.com/users/argoproj/following{/other_user}",
"gists_url": "https://api.github.com/users/argoproj/gists{/gist_id}",
"starred_url": "https://api.github.com/users/argoproj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/argoproj/subscriptions",
"organizations_url": "https://api.github.com/users/argoproj/orgs",
"repos_url": "https://api.github.com/users/argoproj/repos",
"events_url": "https://api.github.com/users/argoproj/events{/privacy}",
"received_events_url": "https://api.github.com/users/argoproj/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/argoproj/another-repo",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/argoproj/another-repo",
"archive_url": "https://api.github.com/repos/argoproj/another-repo/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/argoproj/another-repo/assignees{/user}",
"blobs_url": "https://api.github.com/repos/argoproj/another-repo/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/argoproj/another-repo/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/argoproj/another-repo/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/argoproj/another-repo/comments{/number}",
"commits_url": "https://api.github.com/repos/argoproj/another-repo/commits{/sha}",
"compare_url": "https://api.github.com/repos/argoproj/another-repo/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/argoproj/another-repo/contents/{path}",
"contributors_url": "https://api.github.com/repos/argoproj/another-repo/contributors",
"deployments_url": "https://api.github.com/repos/argoproj/another-repo/deployments",
"downloads_url": "https://api.github.com/repos/argoproj/another-repo/downloads",
"events_url": "https://api.github.com/repos/argoproj/another-repo/events",
"forks_url": "https://api.github.com/repos/argoproj/another-repo/forks",
"git_commits_url": "https://api.github.com/repos/argoproj/another-repo/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/argoproj/another-repo/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/argoproj/another-repo/git/tags{/sha}",
"git_url": "git:github.com/argoproj/another-repo.git",
"issue_comment_url": "https://api.github.com/repos/argoproj/another-repo/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/argoproj/another-repo/issues/events{/number}",
"issues_url": "https://api.github.com/repos/argoproj/another-repo/issues{/number}",
"keys_url": "https://api.github.com/repos/argoproj/another-repo/keys{/key_id}",
"labels_url": "https://api.github.com/repos/argoproj/another-repo/labels{/name}",
"languages_url": "https://api.github.com/repos/argoproj/another-repo/languages",
"merges_url": "https://api.github.com/repos/argoproj/another-repo/merges",
"milestones_url": "https://api.github.com/repos/argoproj/another-repo/milestones{/number}",
"notifications_url": "https://api.github.com/repos/argoproj/another-repo/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/argoproj/another-repo/pulls{/number}",
"releases_url": "https://api.github.com/repos/argoproj/another-repo/releases{/id}",
"ssh_url": "git@github.com:argoproj/another-repo.git",
"stargazers_url": "https://api.github.com/repos/argoproj/another-repo/stargazers",
"statuses_url": "https://api.github.com/repos/argoproj/another-repo/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/argoproj/another-repo/subscribers",
"subscription_url": "https://api.github.com/repos/argoproj/another-repo/subscription",
"tags_url": "https://api.github.com/repos/argoproj/another-repo/tags",
"teams_url": "https://api.github.com/repos/argoproj/another-repo/teams",
"trees_url": "https://api.github.com/repos/argoproj/another-repo/git/trees{/sha}",
"clone_url": "https://github.com/argoproj/another-repo.git",
"mirror_url": "git:git.example.com/argoproj/another-repo",
"hooks_url": "https://api.github.com/repos/argoproj/another-repo/hooks",
"svn_url": "https://svn.github.com/argoproj/another-repo",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": false,
"topics": [
"argoproj",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": true,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"template_repository": null
}
]`)
if err != nil {
@ -146,12 +250,55 @@ func githubMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
}
},
"protection_url": "https://api.github.com/repos/argoproj/hello-world/branches/master/protection"
},
{
"name": "test",
"commit": {
"sha": "80a6e93f16e8093e24091b03c614362df3fb9b92",
"url": "https://api.github.com/repos/argoproj/argo-cd/commits/80a6e93f16e8093e24091b03c614362df3fb9b92"
},
"protected": true,
"protection": {
"required_status_checks": {
"enforcement_level": "non_admins",
"contexts": [
"ci-test",
"linter"
]
}
},
"protection_url": "https://api.github.com/repos/argoproj/hello-world/branches/master/protection"
}
]
`)
if err != nil {
t.Fail()
}
case "/api/v3/repos/argoproj/another-repo/branches?per_page=100":
_, err := io.WriteString(w, `[
{
"name": "main",
"commit": {
"sha": "19b016818bc0e0a44ddeaab345838a2a6c97fa67",
"url": "https://api.github.com/repos/argoproj/another-repo/commits/19b016818bc0e0a44ddeaab345838a2a6c97fa67"
},
"protected": true,
"protection": {
"required_status_checks": {
"enforcement_level": "non_admins",
"contexts": [
"ci-test",
"linter"
]
}
},
"protection_url": "https://api.github.com/repos/argoproj/hello-world/branches/master/protection"
}
]
`)
if err != nil {
t.Fail()
}
case "/api/v3/repos/argoproj/argo-cd/contents/pkg?ref=master":
_, err := io.WriteString(w, `{
"type": "file",
@ -196,6 +343,50 @@ func githubMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
if err != nil {
t.Fail()
}
case "/api/v3/repos/argoproj/argo-cd/branches/test":
_, err := io.WriteString(w, `{
"name": "test",
"commit": {
"sha": "80a6e93f16e8093e24091b03c614362df3fb9b92",
"url": "https://api.github.com/repos/octocat/Hello-World/commits/80a6e93f16e8093e24091b03c614362df3fb9b92"
},
"protected": true,
"protection": {
"required_status_checks": {
"enforcement_level": "non_admins",
"contexts": [
"ci-test",
"linter"
]
}
},
"protection_url": "https://api.github.com/repos/octocat/hello-world/branches/test/protection"
}`)
if err != nil {
t.Fail()
}
case "/api/v3/repos/argoproj/another-repo/branches/main":
_, err := io.WriteString(w, `{
"name": "main",
"commit": {
"sha": "19b016818bc0e0a44ddeaab345838a2a6c97fa67",
"url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
},
"protected": true,
"protection": {
"required_status_checks": {
"enforcement_level": "non_admins",
"contexts": [
"ci-test",
"linter"
]
}
},
"protection_url": "https://api.github.com/repos/octocat/hello-world/branches/master/protection"
}`)
if err != nil {
t.Fail()
}
default:
w.WriteHeader(http.StatusNotFound)
}
@ -203,37 +394,276 @@ func githubMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
}
func TestGithubListRepos(t *testing.T) {
idptr := func(i int64) *int64 {
return &i
}
// Test cases for ListRepos
cases := []struct {
name, proto, url string
name, proto string
hasError, allBranches bool
branches []string
excludeArchivedRepos bool
expectedRepos []*Repository
filters []v1alpha1.SCMProviderGeneratorFilter
}{
{
name: "blank protocol",
url: "git@github.com:argoproj/argo-cd.git",
branches: []string{"master"},
name: "blank protocol",
allBranches: true,
excludeArchivedRepos: false,
expectedRepos: []*Repository{
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "master",
URL: "git@github.com:argoproj/argo-cd.git",
SHA: "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "test",
URL: "git@github.com:argoproj/argo-cd.git",
SHA: "80a6e93f16e8093e24091b03c614362df3fb9b92",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "another-repo",
Branch: "main",
URL: "git@github.com:argoproj/another-repo.git",
SHA: "19b016818bc0e0a44ddeaab345838a2a6c97fa67",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296270),
},
},
filters: []v1alpha1.SCMProviderGeneratorFilter{
{},
},
},
{
name: "ssh protocol",
proto: "ssh",
url: "git@github.com:argoproj/argo-cd.git",
name: "ssh protocol",
proto: "ssh",
allBranches: true,
excludeArchivedRepos: false,
expectedRepos: []*Repository{
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "master",
URL: "git@github.com:argoproj/argo-cd.git",
SHA: "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "test",
URL: "git@github.com:argoproj/argo-cd.git",
SHA: "80a6e93f16e8093e24091b03c614362df3fb9b92",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "another-repo",
Branch: "main",
URL: "git@github.com:argoproj/another-repo.git",
SHA: "19b016818bc0e0a44ddeaab345838a2a6c97fa67",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296270),
},
},
filters: []v1alpha1.SCMProviderGeneratorFilter{
{},
},
},
{
name: "https protocol",
proto: "https",
url: "https://github.com/argoproj/argo-cd.git",
name: "https protocol",
proto: "https",
allBranches: true,
excludeArchivedRepos: false,
expectedRepos: []*Repository{
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "master",
URL: "https://github.com/argoproj/argo-cd.git",
SHA: "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "test",
URL: "https://github.com/argoproj/argo-cd.git",
SHA: "80a6e93f16e8093e24091b03c614362df3fb9b92",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "another-repo",
Branch: "main",
URL: "https://github.com/argoproj/another-repo.git",
SHA: "19b016818bc0e0a44ddeaab345838a2a6c97fa67",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296270),
},
},
filters: []v1alpha1.SCMProviderGeneratorFilter{
{},
},
},
{
name: "other protocol",
proto: "other",
hasError: true,
name: "other protocol",
proto: "other",
hasError: true,
excludeArchivedRepos: false,
expectedRepos: []*Repository{},
filters: []v1alpha1.SCMProviderGeneratorFilter{
{},
},
},
{
name: "all branches",
allBranches: true,
url: "git@github.com:argoproj/argo-cd.git",
branches: []string{"master"},
name: "all branches with archived repos",
allBranches: true,
proto: "ssh",
excludeArchivedRepos: false,
expectedRepos: []*Repository{
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "master",
URL: "git@github.com:argoproj/argo-cd.git",
SHA: "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "test",
URL: "git@github.com:argoproj/argo-cd.git",
SHA: "80a6e93f16e8093e24091b03c614362df3fb9b92",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "another-repo",
Branch: "main",
URL: "git@github.com:argoproj/another-repo.git",
SHA: "19b016818bc0e0a44ddeaab345838a2a6c97fa67",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296270),
},
},
filters: []v1alpha1.SCMProviderGeneratorFilter{
{},
},
},
{
name: "test repo all branches without archived repos",
allBranches: true,
excludeArchivedRepos: true,
proto: "https",
expectedRepos: []*Repository{
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "master",
URL: "https://github.com/argoproj/argo-cd.git",
SHA: "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
{
Organization: "argoproj",
Repository: "argo-cd",
Branch: "test",
URL: "https://github.com/argoproj/argo-cd.git",
SHA: "80a6e93f16e8093e24091b03c614362df3fb9b92",
Labels: []string{
"argoproj",
"atom",
"electron",
"api",
},
RepositoryId: idptr(1296269),
},
},
filters: []v1alpha1.SCMProviderGeneratorFilter{
{},
},
},
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@ -242,26 +672,18 @@ func TestGithubListRepos(t *testing.T) {
defer ts.Close()
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
provider, _ := NewGithubProvider("argoproj", "", ts.URL, c.allBranches)
provider, _ := NewGithubProvider("argoproj", "", ts.URL, c.allBranches, c.excludeArchivedRepos)
rawRepos, err := ListRepos(t.Context(), provider, c.filters, c.proto)
if c.hasError {
require.Error(t, err)
} else {
require.NoError(t, err)
// Just check that this one project shows up. Not a great test but better thing nothing?
repos := []*Repository{}
branches := []string{}
for _, r := range rawRepos {
if r.Repository == "argo-cd" {
repos = append(repos, r)
branches = append(branches, r.Branch)
}
}
repos = append(rawRepos, repos...)
assert.NotEmpty(t, repos)
assert.Equal(t, c.url, repos[0].URL)
for _, b := range c.branches {
assert.Contains(t, branches, b)
}
assert.Len(t, repos, len(c.expectedRepos))
assert.ElementsMatch(t, c.expectedRepos, repos)
}
})
}
@ -280,7 +702,7 @@ func TestGithubHasPath(t *testing.T) {
githubMockHandler(t)(w, r)
}))
defer ts.Close()
host, _ := NewGithubProvider("argoproj", "", ts.URL, false)
host, _ := NewGithubProvider("argoproj", "", ts.URL, false, false)
repo := &Repository{
Organization: "argoproj",
Repository: "argo-cd",
@ -300,7 +722,7 @@ func TestGithubGetBranches(t *testing.T) {
githubMockHandler(t)(w, r)
}))
defer ts.Close()
host, _ := NewGithubProvider("argoproj", "", ts.URL, false)
host, _ := NewGithubProvider("argoproj", "", ts.URL, false, false)
repo := &Repository{
Organization: "argoproj",
Repository: "argo-cd",
@ -328,6 +750,6 @@ func TestGithubGetBranches(t *testing.T) {
require.NoError(t, err)
} else {
// considering master branch to exist.
assert.Len(t, repos, 1)
assert.Len(t, repos, 2)
}
}

View file

@ -19,12 +19,13 @@ type GitlabProvider struct {
allBranches bool
includeSubgroups bool
includeSharedProjects bool
includeArchivedRepos bool
topic string
}
var _ SCMProviderService = &GitlabProvider{}
func NewGitlabProvider(organization string, token string, url string, allBranches, includeSubgroups, includeSharedProjects, insecure bool, scmRootCAPath, topic string, caCerts []byte) (*GitlabProvider, error) {
func NewGitlabProvider(organization string, token string, url string, allBranches, includeSubgroups, includeSharedProjects, includeArchivedRepos, insecure bool, scmRootCAPath, topic string, caCerts []byte) (*GitlabProvider, error) {
// Undocumented environment variable to set a default token, to be used in testing to dodge anonymous rate limits.
if token == "" {
token = os.Getenv("GITLAB_TOKEN")
@ -51,7 +52,15 @@ func NewGitlabProvider(organization string, token string, url string, allBranche
}
}
return &GitlabProvider{client: client, organization: organization, allBranches: allBranches, includeSubgroups: includeSubgroups, includeSharedProjects: includeSharedProjects, topic: topic}, nil
return &GitlabProvider{
client: client,
organization: organization,
allBranches: allBranches,
includeSubgroups: includeSubgroups,
includeSharedProjects: includeSharedProjects,
includeArchivedRepos: includeArchivedRepos,
topic: topic,
}, nil
}
func (g *GitlabProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error) {
@ -88,6 +97,11 @@ func (g *GitlabProvider) ListRepos(_ context.Context, cloneProtocol string) ([]*
Topic: &g.topic,
}
// gitlab does not include Archived repos by default
if g.includeArchivedRepos {
opt.Archived = gitlab.Ptr(true)
}
repos := []*Repository{}
for {
gitlabRepos, resp, err := g.client.Groups.ListGroupProjects(g.organization, opt)

View file

@ -3,7 +3,6 @@ package scm_provider
import (
"crypto/x509"
"encoding/pem"
"fmt"
"io"
"net/http"
"net/http/httptest"
@ -19,12 +18,9 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
t.Helper()
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
fmt.Println(r.RequestURI)
switch r.RequestURI {
case "/api/v4":
fmt.Println("here1")
case "/api/v4/groups/test-argocd-proton/projects?include_subgroups=false&per_page=100", "/api/v4/groups/test-argocd-proton/projects?include_subgroups=false&per_page=100&topic=&with_shared=false":
fmt.Println("here")
case "/api/v4/groups/test-argocd-proton/projects?include_subgroups=false&per_page=100", "/api/v4/groups/test-argocd-proton/projects?include_subgroups=false&per_page=100&topic=&with_shared=false", "/api/v4/groups/test-argocd-proton/projects?archived=false&include_subgroups=false&per_page=100", "/api/v4/groups/test-argocd-proton/projects?archived=false&include_subgroups=false&per_page=100&topic=&with_shared=false":
_, err := io.WriteString(w, `[{
"id": 27084533,
"description": "",
@ -151,8 +147,253 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
if err != nil {
t.Fail()
}
case "/api/v4/groups/test-argocd-proton/projects?archived=true&include_subgroups=false&per_page=100", "/api/v4/groups/test-argocd-proton/projects?archived=true&include_subgroups=false&per_page=100&topic=&with_shared=false":
_, err := io.WriteString(w, `[{
"id": 27084533,
"description": "",
"name": "argocd",
"name_with_namespace": "test argocd proton / argocd",
"path": "argocd",
"path_with_namespace": "test-argocd-proton/argocd",
"created_at": "2021-06-01T17:30:44.724Z",
"default_branch": "master",
"tag_list": [],
"topics": [],
"ssh_url_to_repo": "git@gitlab.com:test-argocd-proton/argocd.git",
"http_url_to_repo": "https://gitlab.com/test-argocd-proton/argocd.git",
"web_url": "https://gitlab.com/test-argocd-proton/argocd",
"readme_url": null,
"avatar_url": null,
"forks_count": 0,
"star_count": 0,
"last_activity_at": "2021-06-04T08:19:51.656Z",
"namespace": {
"id": 12258515,
"name": "test argocd proton",
"path": "test-argocd-proton",
"kind": "gro* Connection #0 to host gitlab.com left intact up ",
"full_path ": "test - argocd - proton ",
"parent_id ": null,
"avatar_url ": null,
"web_url ": "https: //gitlab.com/groups/test-argocd-proton"
},
"container_registry_image_prefix": "registry.gitlab.com/test-argocd-proton/argocd",
"_links": {
"self": "https://gitlab.com/api/v4/projects/27084533",
"issues": "https://gitlab.com/api/v4/projects/27084533/issues",
"merge_requests": "https://gitlab.com/api/v4/projects/27084533/merge_requests",
"repo_branches": "https://gitlab.com/api/v4/projects/27084533/repository/branches",
"labels": "https://gitlab.com/api/v4/projects/27084533/labels",
"events": "https://gitlab.com/api/v4/projects/27084533/events",
"members": "https://gitlab.com/api/v4/projects/27084533/members",
"cluster_agents": "https://gitlab.com/api/v4/projects/27084533/cluster_agents"
},
"packages_enabled": true,
"empty_repo": false,
"archived": false,
"visibility": "public",
"resolve_outdated_diff_discussions": false,
"container_expiration_policy": {
"cadence": "1d",
"enabled": false,
"keep_n": 10,
"older_than": "90d",
"name_regex": ".*",
"name_regex_keep": null,
"next_run_at": "2021-06-02T17:30:44.740Z"
},
"issues_enabled": true,
"merge_requests_enabled": true,
"wiki_enabled": true,
"jobs_enabled": true,
"snippets_enabled": true,
"container_registry_enabled": true,
"service_desk_enabled": true,
"can_create_merge_request_in": false,
"issues_access_level": "enabled",
"repository_access_level": "enabled",
"merge_requests_access_level": "enabled",
"forking_access_level": "enabled",
"wiki_access_level": "enabled",
"builds_access_level": "enabled",
"snippets_access_level": "enabled",
"pages_access_level": "enabled",
"operations_access_level": "enabled",
"analytics_access_level": "enabled",
"container_registry_access_level": "enabled",
"security_and_compliance_access_level": "private",
"emails_disabled": null,
"shared_runners_enabled": true,
"lfs_enabled": true,
"creator_id": 2378866,
"import_status": "none",
"open_issues_count": 0,
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_job_token_scope_enabled": false,
"public_jobs": true,
"build_timeout": 3600,
"auto_cancel_pending_pipelines": "enabled",
"ci_config_path": "",
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": null,
"restrict_user_defined_variables": false,
"request_access_enabled": true,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": true,
"printing_merge_request_link_enabled": true,
"merge_method": "merge",
"squash_option": "default_off",
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"auto_devops_enabled": false,
"auto_devops_deploy_strategy": "continuous",
"autoclose_referenced_issues": true,
"keep_latest_artifact": true,
"runner_token_expiration_interval": null,
"approvals_before_merge": 0,
"mirror": false,
"external_authorization_classification_label": "",
"marked_for_deletion_at": null,
"marked_for_deletion_on": null,
"requirements_enabled": true,
"requirements_access_level": "enabled",
"security_and_compliance_enabled": false,
"compliance_frameworks": [],
"issues_template": null,
"merge_requests_template": null,
"merge_pipelines_enabled": false,
"merge_trains_enabled": false
},
{
"id": 56522142,
"description": "",
"name": "another-repo",
"name_with_namespace": "test argocd proton / another-repo",
"path": "another-repo",
"path_with_namespace": "test-argocd-proton/another-repo",
"created_at": "2022-09-13T12:10:14.722Z",
"default_branch": "master",
"tag_list": [
"test-topic"
],
"topics": [
"test-topic"
],
"ssh_url_to_repo": "git@gitlab.com:test-argocd-proton/another-repo.git",
"http_url_to_repo": "https://gitlab.com/test-argocd-proton/another-repo.git",
"web_url": "https://gitlab.com/test-argocd-proton/another-repo",
"readme_url": null,
"avatar_url": null,
"forks_count": 0,
"star_count": 0,
"last_activity_at": "2021-06-04T08:19:51.656Z",
"namespace": {
"id": 12258515,
"name": "test argocd proton",
"path": "test-argocd-proton",
"kind": "gro* Connection #0 to host gitlab.com left intact up ",
"full_path ": "test - argocd - proton ",
"parent_id ": null,
"avatar_url ": null,
"web_url ": "https: //gitlab.com/groups/test-argocd-proton"
},
"container_registry_image_prefix": "registry.gitlab.com/test-argocd-proton/another-repo",
"_links": {
"self": "https://gitlab.com/api/v4/projects/56522142",
"issues": "https://gitlab.com/api/v4/projects/56522142/issues",
"merge_requests": "https://gitlab.com/api/v4/projects/56522142/merge_requests",
"repo_branches": "https://gitlab.com/api/v4/projects/56522142/repository/branches",
"labels": "https://gitlab.com/api/v4/projects/56522142/labels",
"events": "https://gitlab.com/api/v4/projects/56522142/events",
"members": "https://gitlab.com/api/v4/projects/56522142/members",
"cluster_agents": "https://gitlab.com/api/v4/projects/56522142/cluster_agents"
},
"packages_enabled": true,
"empty_repo": false,
"archived": true,
"visibility": "public",
"resolve_outdated_diff_discussions": false,
"container_expiration_policy": {
"cadence": "1d",
"enabled": false,
"keep_n": 10,
"older_than": "90d",
"name_regex": ".*",
"name_regex_keep": null,
"next_run_at": "2021-06-02T17:30:44.740Z"
},
"issues_enabled": true,
"merge_requests_enabled": true,
"wiki_enabled": true,
"jobs_enabled": true,
"snippets_enabled": true,
"container_registry_enabled": true,
"service_desk_enabled": true,
"can_create_merge_request_in": false,
"issues_access_level": "enabled",
"repository_access_level": "enabled",
"merge_requests_access_level": "enabled",
"forking_access_level": "enabled",
"wiki_access_level": "enabled",
"builds_access_level": "enabled",
"snippets_access_level": "enabled",
"pages_access_level": "enabled",
"operations_access_level": "enabled",
"analytics_access_level": "enabled",
"container_registry_access_level": "enabled",
"security_and_compliance_access_level": "private",
"emails_disabled": null,
"shared_runners_enabled": true,
"lfs_enabled": true,
"creator_id": 2378866,
"import_status": "none",
"open_issues_count": 0,
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_job_token_scope_enabled": false,
"public_jobs": true,
"build_timeout": 3600,
"auto_cancel_pending_pipelines": "enabled",
"ci_config_path": "",
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
"allow_merge_on_skipped_pipeline": null,
"restrict_user_defined_variables": false,
"request_access_enabled": true,
"only_allow_merge_if_all_discussions_are_resolved": false,
"remove_source_branch_after_merge": true,
"printing_merge_request_link_enabled": true,
"merge_method": "merge",
"squash_option": "default_off",
"suggestion_commit_message": null,
"merge_commit_template": null,
"squash_commit_template": null,
"auto_devops_enabled": false,
"auto_devops_deploy_strategy": "continuous",
"autoclose_referenced_issues": true,
"keep_latest_artifact": true,
"runner_token_expiration_interval": null,
"approvals_before_merge": 0,
"mirror": false,
"external_authorization_classification_label": "",
"marked_for_deletion_at": null,
"marked_for_deletion_on": null,
"requirements_enabled": true,
"requirements_access_level": "enabled",
"security_and_compliance_enabled": false,
"compliance_frameworks": [],
"issues_template": null,
"merge_requests_template": null,
"merge_pipelines_enabled": false,
"merge_trains_enabled": false
}]`)
if err != nil {
t.Fail()
}
case "/api/v4/groups/test-argocd-proton/projects?include_subgroups=true&per_page=100&topic=&with_shared=false":
fmt.Println("here")
_, err := io.WriteString(w, `[{
"id": 27084533,
"description": "",
@ -406,7 +647,6 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
t.Fail()
}
case "/api/v4/groups/test-argocd-proton/projects?include_subgroups=false&per_page=100&topic=specific-topic&with_shared=false":
fmt.Println("here")
_, err := io.WriteString(w, `[{
"id": 27084533,
"description": "",
@ -537,7 +777,6 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
t.Fail()
}
case "/api/v4/groups/test-argocd-proton/projects?include_subgroups=true&per_page=100&topic=&with_shared=true":
fmt.Println("here")
_, err := io.WriteString(w, `[{
"id": 27084533,
"description": "",
@ -796,7 +1035,6 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
t.Fail()
}
case "/api/v4/projects/27084533/repository/branches/master":
fmt.Println("returning")
_, err := io.WriteString(w, `{
"name": "master",
"commit": {
@ -826,6 +1064,36 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
if err != nil {
t.Fail()
}
case "/api/v4/projects/56522142/repository/branches/master":
_, err := io.WriteString(w, `{
"name": "master",
"commit": {
"id": "9998d7999fc99dd0fd578650b58b244fc63f6b53",
"short_id": "9998d799",
"created_at": "2023-08-04T08:14:14.000+00:00",
"parent_ids": ["5d9d50be1ef949ad28674e238c7e12a17b1e9706", "99482e001731640b4123cf177e51c696f08a3005"],
"title": "Merge branch 'pipeline-4547911429' into 'master'",
"message": "Merge branch 'pipeline-4547911429' into 'master'\n\n[testapp-ci] manifests/demo/test-app.yaml: release v1.2.0\n\nSee merge request test-argocd-proton/argocd!3",
"author_name": "Martin Vozník",
"author_email": "martin@voznik.cz",
"authored_date": "2023-08-04T08:14:14.000+00:00",
"committer_name": "Martin Vozník",
"committer_email": "martin@voznik.cz",
"committed_date": "2023-08-04T08:14:14.000+00:00",
"trailers": {},
"web_url": "https://gitlab.com/test-argocd-proton/argocd/-/commit/9998d7999fc99dd0fd578650b58b244fc63f6b53"
},
"merged": false,
"protected": true,
"developers_can_push": false,
"developers_can_merge": false,
"can_push": false,
"default": true,
"web_url": "https://gitlab.com/test-argocd-proton/argocd/-/tree/master"
}`)
if err != nil {
t.Fail()
}
case "/api/v4/projects/27084533/repository/branches?per_page=100":
_, err := io.WriteString(w, `[{
"name": "master",
@ -991,8 +1259,62 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
if err != nil {
t.Fail()
}
case "/api/v4/projects/56522142/repository/branches?per_page=100":
_, err := io.WriteString(w, `[{
"name": "master",
"commit": {
"id": "8898d8889fc99dd0fd578650b58b244fc63f6b58",
"short_id": "8898d801",
"created_at": "2021-06-04T08:24:44.000+00:00",
"parent_ids": null,
"title": "Merge branch 'pipeline-1317911429' into 'master'",
"message": "Merge branch 'pipeline-1317911429' into 'master'",
"author_name": "Martin Vozník",
"author_email": "martin@voznik.cz",
"authored_date": "2021-06-04T08:24:44.000+00:00",
"committer_name": "Martin Vozník",
"committer_email": "martin@voznik.cz",
"committed_date": "2021-06-04T08:24:44.000+00:00",
"trailers": null,
"web_url": "https://gitlab.com/test-argocd-proton/subgroup/argocd-subgroup/-/commit/8898d7999fc99dd0fd578650b58b244fc63f6b53"
},
"merged": false,
"protected": true,
"developers_can_push": false,
"developers_can_merge": false,
"can_push": false,
"default": true,
"web_url": "https://gitlab.com/test-argocd-proton/subgroup/argocd-subgroup/-/tree/master"
}, {
"name": "pipeline-2310077506",
"commit": {
"id": "0f92540e5f396ba960adea4ed0aa905baf3f73d1",
"short_id": "0f92540e",
"created_at": "2021-06-01T18:39:59.000+00:00",
"parent_ids": null,
"title": "[testapp-ci] manifests/demo/test-app.yaml: release v1.0.1",
"message": "[testapp-ci] manifests/demo/test-app.yaml: release v1.0.1",
"author_name": "ci-test-app",
"author_email": "mvoznik+cicd@protonmail.com",
"authored_date": "2021-06-01T18:39:59.000+00:00",
"committer_name": "ci-test-app",
"committer_email": "mvoznik+cicd@protonmail.com",
"committed_date": "2021-06-01T18:39:59.000+00:00",
"trailers": null,
"web_url": "https://gitlab.com/test-argocd-proton/subgroup/argocd-subgroup/-/commit/0f92540e5f396ba960adea4ed0aa905baf3f73d1"
},
"merged": false,
"protected": false,
"developers_can_push": false,
"developers_can_merge": false,
"can_push": false,
"default": false,
"web_url": "https://gitlab.com/test-argocd-proton/subgroup/argocd-subgroup/-/tree/pipeline-1310077506"
}]`)
if err != nil {
t.Fail()
}
case "/api/v4/projects/test-argocd-proton%2Fargocd":
fmt.Println("auct")
_, err := io.WriteString(w, `{
"id": 27084533,
"description": "",
@ -1079,35 +1401,94 @@ func gitlabMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
func TestGitlabListRepos(t *testing.T) {
cases := []struct {
name, proto, url, topic string
hasError, allBranches, includeSubgroups, includeSharedProjects, insecure bool
branches []string
filters []v1alpha1.SCMProviderGeneratorFilter
name, proto, topic string
hasError, allBranches, includeSubgroups, includeSharedProjects, includeArchivedRepos, insecure bool
branches []string
expectedRepos []*Repository
filters []v1alpha1.SCMProviderGeneratorFilter
}{
{
name: "blank protocol",
url: "git@gitlab.com:test-argocd-proton/argocd.git",
name: "blank protocol",
allBranches: false,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"master"},
},
{
name: "ssh protocol",
proto: "ssh",
url: "git@gitlab.com:test-argocd-proton/argocd.git",
},
{
name: "labelmatch",
proto: "ssh",
url: "git@gitlab.com:test-argocd-proton/argocd.git",
filters: []v1alpha1.SCMProviderGeneratorFilter{
expectedRepos: []*Repository{
{
LabelMatch: strp("test-topic"),
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic"},
},
},
},
{
name: "https protocol",
proto: "https",
url: "https://gitlab.com/test-argocd-proton/argocd.git",
name: "ssh protocol",
proto: "ssh",
allBranches: false,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"master"},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic"},
},
},
},
{
name: "https protocol",
proto: "https",
allBranches: false,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"master"},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "https://gitlab.com/test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic"},
},
},
},
{
name: "labelmatch",
proto: "ssh",
allBranches: false,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{
{
LabelMatch: new("test-topic"),
},
},
branches: []string{"master"},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic"},
},
},
},
{
name: "other protocol",
@ -1115,34 +1496,133 @@ func TestGitlabListRepos(t *testing.T) {
hasError: true,
},
{
name: "all branches",
allBranches: true,
url: "git@gitlab.com:test-argocd-proton/argocd.git",
branches: []string{"master"},
name: "all branches",
allBranches: true,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
branches: []string{"master"},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic"},
},
},
},
{
name: "all subgroups",
allBranches: true,
url: "git@gitlab.com:test-argocd-proton/argocd.git",
branches: []string{"master"},
includeSharedProjects: false,
includeSubgroups: true,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic", "specific-topic"},
},
{
Organization: "",
Repository: "argocd-subgroup",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/subgroup/argocd-subgroup.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b58",
RepositoryId: int64(27084538),
Labels: []string{"test-topic"},
},
},
},
{
name: "all subgroups and shared projects",
allBranches: true,
url: "git@gitlab.com:test-argocd-proton/argocd.git",
branches: []string{"master"},
includeSharedProjects: true,
includeSubgroups: true,
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic"},
},
{
Organization: "",
Repository: "shared-argocd",
Branch: "master",
URL: "git@gitlab.com:test-shared-argocd-proton/shared-argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084534),
Labels: []string{"test-topic"},
},
},
},
{
name: "specific topic",
allBranches: true,
url: "git@gitlab.com:test-argocd-proton/argocd.git",
branches: []string{"master"},
includeSubgroups: false,
topic: "specific-topic",
name: "specific topic",
allBranches: true,
branches: []string{"master"},
includeSubgroups: false,
topic: "specific-topic",
includeArchivedRepos: false,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{"test-topic", "specific-topic"},
},
},
},
{
name: "all branches with archived repos",
allBranches: true,
branches: []string{"master"},
includeSubgroups: false,
includeArchivedRepos: true,
filters: []v1alpha1.SCMProviderGeneratorFilter{},
expectedRepos: []*Repository{
{
Organization: "",
Repository: "argocd",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/argocd.git",
SHA: "8898d7999fc99dd0fd578650b58b244fc63f6b53",
RepositoryId: int64(27084533),
Labels: []string{},
},
{
Organization: "",
Repository: "another-repo",
Branch: "master",
URL: "git@gitlab.com:test-argocd-proton/another-repo.git",
SHA: "8898d8889fc99dd0fd578650b58b244fc63f6b58",
RepositoryId: int64(56522142),
Labels: []string{"test-topic"},
},
},
},
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@ -1150,28 +1630,24 @@ func TestGitlabListRepos(t *testing.T) {
}))
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
provider, _ := NewGitlabProvider("test-argocd-proton", "", ts.URL, c.allBranches, c.includeSubgroups, c.includeSharedProjects, c.insecure, "", c.topic, nil)
provider, _ := NewGitlabProvider("test-argocd-proton", "", ts.URL, c.allBranches, c.includeSubgroups, c.includeSharedProjects, c.includeArchivedRepos, c.insecure, "", c.topic, nil)
rawRepos, err := ListRepos(t.Context(), provider, c.filters, c.proto)
if c.hasError {
require.Error(t, err)
} else {
require.NoError(t, err)
// Just check that this one project shows up. Not a great test but better than nothing?
repos := []*Repository{}
uniqueRepos := map[string]int{}
branches := []string{}
for _, r := range rawRepos {
if r.Repository == "argocd" {
if _, ok := uniqueRepos[r.Repository]; !ok {
repos = append(repos, r)
branches = append(branches, r.Branch)
}
uniqueRepos[r.Repository]++
}
assert.NotEmpty(t, repos)
assert.Equal(t, c.url, repos[0].URL)
for _, b := range c.branches {
assert.Contains(t, branches, b)
}
// In case of listing subgroups, validate the number of returned projects
if c.includeSubgroups || c.includeSharedProjects {
assert.Len(t, uniqueRepos, 2)
@ -1180,6 +1656,8 @@ func TestGitlabListRepos(t *testing.T) {
if c.topic != "" {
assert.Len(t, uniqueRepos, 1)
}
assert.Len(t, repos, len(c.expectedRepos))
assert.ElementsMatch(t, c.expectedRepos, repos)
}
})
}
@ -1189,7 +1667,7 @@ func TestGitlabHasPath(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
gitlabMockHandler(t)(w, r)
}))
host, _ := NewGitlabProvider("test-argocd-proton", "", ts.URL, false, true, true, false, "", "", nil)
host, _ := NewGitlabProvider("test-argocd-proton", "", ts.URL, false, true, true, false, false, "", "", nil)
repo := &Repository{
Organization: "test-argocd-proton",
Repository: "argocd",
@ -1245,10 +1723,10 @@ func TestGitlabGetBranches(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
gitlabMockHandler(t)(w, r)
}))
host, _ := NewGitlabProvider("test-argocd-proton", "", ts.URL, false, true, true, false, "", "", nil)
host, _ := NewGitlabProvider("test-argocd-proton", "", ts.URL, false, true, true, false, false, "", "", nil)
repo := &Repository{
RepositoryId: 27084533,
RepositoryId: int64(27084533),
Branch: "master",
}
t.Run("branch exists", func(t *testing.T) {
@ -1258,7 +1736,7 @@ func TestGitlabGetBranches(t *testing.T) {
})
repo2 := &Repository{
RepositoryId: 27084533,
RepositoryId: int64(27084533),
Branch: "foo",
}
t.Run("unknown branch", func(t *testing.T) {
@ -1301,7 +1779,6 @@ func TestGetBranchesTLS(t *testing.T) {
}
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
gitlabMockHandler(t)(w, r)
@ -1322,10 +1799,10 @@ func TestGetBranchesTLS(t *testing.T) {
}
}
host, err := NewGitlabProvider("test-argocd-proton", "", ts.URL, false, true, true, test.tlsInsecure, "", "", certs)
host, err := NewGitlabProvider("test-argocd-proton", "", ts.URL, false, true, true, false, test.tlsInsecure, "", "", certs)
require.NoError(t, err)
repo := &Repository{
RepositoryId: 27084533,
RepositoryId: int64(27084533),
Branch: "master",
}
_, err = host.GetBranches(t.Context(), repo)

View file

@ -5,9 +5,9 @@
package mocks
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/codecommit"
"context"
"github.com/aws/aws-sdk-go-v2/service/codecommit"
mock "github.com/stretchr/testify/mock"
)
@ -38,71 +38,71 @@ func (_m *AWSCodeCommitClient) EXPECT() *AWSCodeCommitClient_Expecter {
return &AWSCodeCommitClient_Expecter{mock: &_m.Mock}
}
// GetFolderWithContext provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) GetFolderWithContext(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option) (*codecommit.GetFolderOutput, error) {
// request.Option
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
// GetFolder provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) GetFolder(context1 context.Context, getFolderInput *codecommit.GetFolderInput, fns ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error) {
// func(*codecommit.Options)
_va := make([]interface{}, len(fns))
for _i := range fns {
_va[_i] = fns[_i]
}
var _ca []interface{}
_ca = append(_ca, v, getFolderInput)
_ca = append(_ca, context1, getFolderInput)
_ca = append(_ca, _va...)
ret := _mock.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetFolderWithContext")
panic("no return value specified for GetFolder")
}
var r0 *codecommit.GetFolderOutput
var r1 error
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)); ok {
return returnFunc(v, getFolderInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error)); ok {
return returnFunc(context1, getFolderInput, fns...)
}
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) *codecommit.GetFolderOutput); ok {
r0 = returnFunc(v, getFolderInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) *codecommit.GetFolderOutput); ok {
r0 = returnFunc(context1, getFolderInput, fns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*codecommit.GetFolderOutput)
}
}
if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.GetFolderInput, ...request.Option) error); ok {
r1 = returnFunc(v, getFolderInput, options...)
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.GetFolderInput, ...func(*codecommit.Options)) error); ok {
r1 = returnFunc(context1, getFolderInput, fns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// AWSCodeCommitClient_GetFolderWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFolderWithContext'
type AWSCodeCommitClient_GetFolderWithContext_Call struct {
// AWSCodeCommitClient_GetFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFolder'
type AWSCodeCommitClient_GetFolder_Call struct {
*mock.Call
}
// GetFolderWithContext is a helper method to define mock.On call
// - v aws.Context
// GetFolder is a helper method to define mock.On call
// - context1 context.Context
// - getFolderInput *codecommit.GetFolderInput
// - options ...request.Option
func (_e *AWSCodeCommitClient_Expecter) GetFolderWithContext(v interface{}, getFolderInput interface{}, options ...interface{}) *AWSCodeCommitClient_GetFolderWithContext_Call {
return &AWSCodeCommitClient_GetFolderWithContext_Call{Call: _e.mock.On("GetFolderWithContext",
append([]interface{}{v, getFolderInput}, options...)...)}
// - fns ...func(*codecommit.Options)
func (_e *AWSCodeCommitClient_Expecter) GetFolder(context1 interface{}, getFolderInput interface{}, fns ...interface{}) *AWSCodeCommitClient_GetFolder_Call {
return &AWSCodeCommitClient_GetFolder_Call{Call: _e.mock.On("GetFolder",
append([]interface{}{context1, getFolderInput}, fns...)...)}
}
func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option)) *AWSCodeCommitClient_GetFolderWithContext_Call {
func (_c *AWSCodeCommitClient_GetFolder_Call) Run(run func(context1 context.Context, getFolderInput *codecommit.GetFolderInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_GetFolder_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 aws.Context
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(aws.Context)
arg0 = args[0].(context.Context)
}
var arg1 *codecommit.GetFolderInput
if args[1] != nil {
arg1 = args[1].(*codecommit.GetFolderInput)
}
var arg2 []request.Option
variadicArgs := make([]request.Option, len(args)-2)
var arg2 []func(*codecommit.Options)
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(request.Option)
variadicArgs[i] = a.(func(*codecommit.Options))
}
}
arg2 = variadicArgs
@ -115,81 +115,81 @@ func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Run(run func(v aws.Cont
return _c
}
func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) Return(getFolderOutput *codecommit.GetFolderOutput, err error) *AWSCodeCommitClient_GetFolderWithContext_Call {
func (_c *AWSCodeCommitClient_GetFolder_Call) Return(getFolderOutput *codecommit.GetFolderOutput, err error) *AWSCodeCommitClient_GetFolder_Call {
_c.Call.Return(getFolderOutput, err)
return _c
}
func (_c *AWSCodeCommitClient_GetFolderWithContext_Call) RunAndReturn(run func(v aws.Context, getFolderInput *codecommit.GetFolderInput, options ...request.Option) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolderWithContext_Call {
func (_c *AWSCodeCommitClient_GetFolder_Call) RunAndReturn(run func(context1 context.Context, getFolderInput *codecommit.GetFolderInput, fns ...func(*codecommit.Options)) (*codecommit.GetFolderOutput, error)) *AWSCodeCommitClient_GetFolder_Call {
_c.Call.Return(run)
return _c
}
// GetRepositoryWithContext provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) GetRepositoryWithContext(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option) (*codecommit.GetRepositoryOutput, error) {
// request.Option
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
// GetRepository provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) GetRepository(context1 context.Context, getRepositoryInput *codecommit.GetRepositoryInput, fns ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error) {
// func(*codecommit.Options)
_va := make([]interface{}, len(fns))
for _i := range fns {
_va[_i] = fns[_i]
}
var _ca []interface{}
_ca = append(_ca, v, getRepositoryInput)
_ca = append(_ca, context1, getRepositoryInput)
_ca = append(_ca, _va...)
ret := _mock.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetRepositoryWithContext")
panic("no return value specified for GetRepository")
}
var r0 *codecommit.GetRepositoryOutput
var r1 error
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) (*codecommit.GetRepositoryOutput, error)); ok {
return returnFunc(v, getRepositoryInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error)); ok {
return returnFunc(context1, getRepositoryInput, fns...)
}
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) *codecommit.GetRepositoryOutput); ok {
r0 = returnFunc(v, getRepositoryInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) *codecommit.GetRepositoryOutput); ok {
r0 = returnFunc(context1, getRepositoryInput, fns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*codecommit.GetRepositoryOutput)
}
}
if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.GetRepositoryInput, ...request.Option) error); ok {
r1 = returnFunc(v, getRepositoryInput, options...)
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.GetRepositoryInput, ...func(*codecommit.Options)) error); ok {
r1 = returnFunc(context1, getRepositoryInput, fns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// AWSCodeCommitClient_GetRepositoryWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepositoryWithContext'
type AWSCodeCommitClient_GetRepositoryWithContext_Call struct {
// AWSCodeCommitClient_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository'
type AWSCodeCommitClient_GetRepository_Call struct {
*mock.Call
}
// GetRepositoryWithContext is a helper method to define mock.On call
// - v aws.Context
// GetRepository is a helper method to define mock.On call
// - context1 context.Context
// - getRepositoryInput *codecommit.GetRepositoryInput
// - options ...request.Option
func (_e *AWSCodeCommitClient_Expecter) GetRepositoryWithContext(v interface{}, getRepositoryInput interface{}, options ...interface{}) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
return &AWSCodeCommitClient_GetRepositoryWithContext_Call{Call: _e.mock.On("GetRepositoryWithContext",
append([]interface{}{v, getRepositoryInput}, options...)...)}
// - fns ...func(*codecommit.Options)
func (_e *AWSCodeCommitClient_Expecter) GetRepository(context1 interface{}, getRepositoryInput interface{}, fns ...interface{}) *AWSCodeCommitClient_GetRepository_Call {
return &AWSCodeCommitClient_GetRepository_Call{Call: _e.mock.On("GetRepository",
append([]interface{}{context1, getRepositoryInput}, fns...)...)}
}
func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option)) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
func (_c *AWSCodeCommitClient_GetRepository_Call) Run(run func(context1 context.Context, getRepositoryInput *codecommit.GetRepositoryInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_GetRepository_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 aws.Context
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(aws.Context)
arg0 = args[0].(context.Context)
}
var arg1 *codecommit.GetRepositoryInput
if args[1] != nil {
arg1 = args[1].(*codecommit.GetRepositoryInput)
}
var arg2 []request.Option
variadicArgs := make([]request.Option, len(args)-2)
var arg2 []func(*codecommit.Options)
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(request.Option)
variadicArgs[i] = a.(func(*codecommit.Options))
}
}
arg2 = variadicArgs
@ -202,81 +202,81 @@ func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Run(run func(v aws.
return _c
}
func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) Return(getRepositoryOutput *codecommit.GetRepositoryOutput, err error) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
func (_c *AWSCodeCommitClient_GetRepository_Call) Return(getRepositoryOutput *codecommit.GetRepositoryOutput, err error) *AWSCodeCommitClient_GetRepository_Call {
_c.Call.Return(getRepositoryOutput, err)
return _c
}
func (_c *AWSCodeCommitClient_GetRepositoryWithContext_Call) RunAndReturn(run func(v aws.Context, getRepositoryInput *codecommit.GetRepositoryInput, options ...request.Option) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepositoryWithContext_Call {
func (_c *AWSCodeCommitClient_GetRepository_Call) RunAndReturn(run func(context1 context.Context, getRepositoryInput *codecommit.GetRepositoryInput, fns ...func(*codecommit.Options)) (*codecommit.GetRepositoryOutput, error)) *AWSCodeCommitClient_GetRepository_Call {
_c.Call.Return(run)
return _c
}
// ListBranchesWithContext provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) ListBranchesWithContext(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option) (*codecommit.ListBranchesOutput, error) {
// request.Option
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
// ListBranches provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) ListBranches(context1 context.Context, listBranchesInput *codecommit.ListBranchesInput, fns ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error) {
// func(*codecommit.Options)
_va := make([]interface{}, len(fns))
for _i := range fns {
_va[_i] = fns[_i]
}
var _ca []interface{}
_ca = append(_ca, v, listBranchesInput)
_ca = append(_ca, context1, listBranchesInput)
_ca = append(_ca, _va...)
ret := _mock.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for ListBranchesWithContext")
panic("no return value specified for ListBranches")
}
var r0 *codecommit.ListBranchesOutput
var r1 error
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) (*codecommit.ListBranchesOutput, error)); ok {
return returnFunc(v, listBranchesInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error)); ok {
return returnFunc(context1, listBranchesInput, fns...)
}
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) *codecommit.ListBranchesOutput); ok {
r0 = returnFunc(v, listBranchesInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) *codecommit.ListBranchesOutput); ok {
r0 = returnFunc(context1, listBranchesInput, fns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*codecommit.ListBranchesOutput)
}
}
if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.ListBranchesInput, ...request.Option) error); ok {
r1 = returnFunc(v, listBranchesInput, options...)
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.ListBranchesInput, ...func(*codecommit.Options)) error); ok {
r1 = returnFunc(context1, listBranchesInput, fns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// AWSCodeCommitClient_ListBranchesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBranchesWithContext'
type AWSCodeCommitClient_ListBranchesWithContext_Call struct {
// AWSCodeCommitClient_ListBranches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBranches'
type AWSCodeCommitClient_ListBranches_Call struct {
*mock.Call
}
// ListBranchesWithContext is a helper method to define mock.On call
// - v aws.Context
// ListBranches is a helper method to define mock.On call
// - context1 context.Context
// - listBranchesInput *codecommit.ListBranchesInput
// - options ...request.Option
func (_e *AWSCodeCommitClient_Expecter) ListBranchesWithContext(v interface{}, listBranchesInput interface{}, options ...interface{}) *AWSCodeCommitClient_ListBranchesWithContext_Call {
return &AWSCodeCommitClient_ListBranchesWithContext_Call{Call: _e.mock.On("ListBranchesWithContext",
append([]interface{}{v, listBranchesInput}, options...)...)}
// - fns ...func(*codecommit.Options)
func (_e *AWSCodeCommitClient_Expecter) ListBranches(context1 interface{}, listBranchesInput interface{}, fns ...interface{}) *AWSCodeCommitClient_ListBranches_Call {
return &AWSCodeCommitClient_ListBranches_Call{Call: _e.mock.On("ListBranches",
append([]interface{}{context1, listBranchesInput}, fns...)...)}
}
func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option)) *AWSCodeCommitClient_ListBranchesWithContext_Call {
func (_c *AWSCodeCommitClient_ListBranches_Call) Run(run func(context1 context.Context, listBranchesInput *codecommit.ListBranchesInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_ListBranches_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 aws.Context
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(aws.Context)
arg0 = args[0].(context.Context)
}
var arg1 *codecommit.ListBranchesInput
if args[1] != nil {
arg1 = args[1].(*codecommit.ListBranchesInput)
}
var arg2 []request.Option
variadicArgs := make([]request.Option, len(args)-2)
var arg2 []func(*codecommit.Options)
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(request.Option)
variadicArgs[i] = a.(func(*codecommit.Options))
}
}
arg2 = variadicArgs
@ -289,81 +289,81 @@ func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Run(run func(v aws.C
return _c
}
func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) Return(listBranchesOutput *codecommit.ListBranchesOutput, err error) *AWSCodeCommitClient_ListBranchesWithContext_Call {
func (_c *AWSCodeCommitClient_ListBranches_Call) Return(listBranchesOutput *codecommit.ListBranchesOutput, err error) *AWSCodeCommitClient_ListBranches_Call {
_c.Call.Return(listBranchesOutput, err)
return _c
}
func (_c *AWSCodeCommitClient_ListBranchesWithContext_Call) RunAndReturn(run func(v aws.Context, listBranchesInput *codecommit.ListBranchesInput, options ...request.Option) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranchesWithContext_Call {
func (_c *AWSCodeCommitClient_ListBranches_Call) RunAndReturn(run func(context1 context.Context, listBranchesInput *codecommit.ListBranchesInput, fns ...func(*codecommit.Options)) (*codecommit.ListBranchesOutput, error)) *AWSCodeCommitClient_ListBranches_Call {
_c.Call.Return(run)
return _c
}
// ListRepositoriesWithContext provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) ListRepositoriesWithContext(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option) (*codecommit.ListRepositoriesOutput, error) {
// request.Option
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
// ListRepositories provides a mock function for the type AWSCodeCommitClient
func (_mock *AWSCodeCommitClient) ListRepositories(context1 context.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, fns ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error) {
// func(*codecommit.Options)
_va := make([]interface{}, len(fns))
for _i := range fns {
_va[_i] = fns[_i]
}
var _ca []interface{}
_ca = append(_ca, v, listRepositoriesInput)
_ca = append(_ca, context1, listRepositoriesInput)
_ca = append(_ca, _va...)
ret := _mock.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for ListRepositoriesWithContext")
panic("no return value specified for ListRepositories")
}
var r0 *codecommit.ListRepositoriesOutput
var r1 error
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) (*codecommit.ListRepositoriesOutput, error)); ok {
return returnFunc(v, listRepositoriesInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error)); ok {
return returnFunc(context1, listRepositoriesInput, fns...)
}
if returnFunc, ok := ret.Get(0).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) *codecommit.ListRepositoriesOutput); ok {
r0 = returnFunc(v, listRepositoriesInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) *codecommit.ListRepositoriesOutput); ok {
r0 = returnFunc(context1, listRepositoriesInput, fns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*codecommit.ListRepositoriesOutput)
}
}
if returnFunc, ok := ret.Get(1).(func(aws.Context, *codecommit.ListRepositoriesInput, ...request.Option) error); ok {
r1 = returnFunc(v, listRepositoriesInput, options...)
if returnFunc, ok := ret.Get(1).(func(context.Context, *codecommit.ListRepositoriesInput, ...func(*codecommit.Options)) error); ok {
r1 = returnFunc(context1, listRepositoriesInput, fns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// AWSCodeCommitClient_ListRepositoriesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositoriesWithContext'
type AWSCodeCommitClient_ListRepositoriesWithContext_Call struct {
// AWSCodeCommitClient_ListRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositories'
type AWSCodeCommitClient_ListRepositories_Call struct {
*mock.Call
}
// ListRepositoriesWithContext is a helper method to define mock.On call
// - v aws.Context
// ListRepositories is a helper method to define mock.On call
// - context1 context.Context
// - listRepositoriesInput *codecommit.ListRepositoriesInput
// - options ...request.Option
func (_e *AWSCodeCommitClient_Expecter) ListRepositoriesWithContext(v interface{}, listRepositoriesInput interface{}, options ...interface{}) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
return &AWSCodeCommitClient_ListRepositoriesWithContext_Call{Call: _e.mock.On("ListRepositoriesWithContext",
append([]interface{}{v, listRepositoriesInput}, options...)...)}
// - fns ...func(*codecommit.Options)
func (_e *AWSCodeCommitClient_Expecter) ListRepositories(context1 interface{}, listRepositoriesInput interface{}, fns ...interface{}) *AWSCodeCommitClient_ListRepositories_Call {
return &AWSCodeCommitClient_ListRepositories_Call{Call: _e.mock.On("ListRepositories",
append([]interface{}{context1, listRepositoriesInput}, fns...)...)}
}
func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
func (_c *AWSCodeCommitClient_ListRepositories_Call) Run(run func(context1 context.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, fns ...func(*codecommit.Options))) *AWSCodeCommitClient_ListRepositories_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 aws.Context
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(aws.Context)
arg0 = args[0].(context.Context)
}
var arg1 *codecommit.ListRepositoriesInput
if args[1] != nil {
arg1 = args[1].(*codecommit.ListRepositoriesInput)
}
var arg2 []request.Option
variadicArgs := make([]request.Option, len(args)-2)
var arg2 []func(*codecommit.Options)
variadicArgs := make([]func(*codecommit.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(request.Option)
variadicArgs[i] = a.(func(*codecommit.Options))
}
}
arg2 = variadicArgs
@ -376,12 +376,12 @@ func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Run(run func(v a
return _c
}
func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) Return(listRepositoriesOutput *codecommit.ListRepositoriesOutput, err error) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
func (_c *AWSCodeCommitClient_ListRepositories_Call) Return(listRepositoriesOutput *codecommit.ListRepositoriesOutput, err error) *AWSCodeCommitClient_ListRepositories_Call {
_c.Call.Return(listRepositoriesOutput, err)
return _c
}
func (_c *AWSCodeCommitClient_ListRepositoriesWithContext_Call) RunAndReturn(run func(v aws.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, options ...request.Option) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositoriesWithContext_Call {
func (_c *AWSCodeCommitClient_ListRepositories_Call) RunAndReturn(run func(context1 context.Context, listRepositoriesInput *codecommit.ListRepositoriesInput, fns ...func(*codecommit.Options)) (*codecommit.ListRepositoriesOutput, error)) *AWSCodeCommitClient_ListRepositories_Call {
_c.Call.Return(run)
return _c
}

View file

@ -5,9 +5,9 @@
package mocks
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"context"
"github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi"
mock "github.com/stretchr/testify/mock"
)
@ -38,71 +38,71 @@ func (_m *AWSTaggingClient) EXPECT() *AWSTaggingClient_Expecter {
return &AWSTaggingClient_Expecter{mock: &_m.Mock}
}
// GetResourcesWithContext provides a mock function for the type AWSTaggingClient
func (_mock *AWSTaggingClient) GetResourcesWithContext(v aws.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, options ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error) {
// request.Option
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
// GetResources provides a mock function for the type AWSTaggingClient
func (_mock *AWSTaggingClient) GetResources(context1 context.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, fns ...func(*resourcegroupstaggingapi.Options)) (*resourcegroupstaggingapi.GetResourcesOutput, error) {
// func(*resourcegroupstaggingapi.Options)
_va := make([]interface{}, len(fns))
for _i := range fns {
_va[_i] = fns[_i]
}
var _ca []interface{}
_ca = append(_ca, v, getResourcesInput)
_ca = append(_ca, context1, getResourcesInput)
_ca = append(_ca, _va...)
ret := _mock.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetResourcesWithContext")
panic("no return value specified for GetResources")
}
var r0 *resourcegroupstaggingapi.GetResourcesOutput
var r1 error
if returnFunc, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)); ok {
return returnFunc(v, getResourcesInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...func(*resourcegroupstaggingapi.Options)) (*resourcegroupstaggingapi.GetResourcesOutput, error)); ok {
return returnFunc(context1, getResourcesInput, fns...)
}
if returnFunc, ok := ret.Get(0).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) *resourcegroupstaggingapi.GetResourcesOutput); ok {
r0 = returnFunc(v, getResourcesInput, options...)
if returnFunc, ok := ret.Get(0).(func(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...func(*resourcegroupstaggingapi.Options)) *resourcegroupstaggingapi.GetResourcesOutput); ok {
r0 = returnFunc(context1, getResourcesInput, fns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*resourcegroupstaggingapi.GetResourcesOutput)
}
}
if returnFunc, ok := ret.Get(1).(func(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) error); ok {
r1 = returnFunc(v, getResourcesInput, options...)
if returnFunc, ok := ret.Get(1).(func(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...func(*resourcegroupstaggingapi.Options)) error); ok {
r1 = returnFunc(context1, getResourcesInput, fns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// AWSTaggingClient_GetResourcesWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourcesWithContext'
type AWSTaggingClient_GetResourcesWithContext_Call struct {
// AWSTaggingClient_GetResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResources'
type AWSTaggingClient_GetResources_Call struct {
*mock.Call
}
// GetResourcesWithContext is a helper method to define mock.On call
// - v aws.Context
// GetResources is a helper method to define mock.On call
// - context1 context.Context
// - getResourcesInput *resourcegroupstaggingapi.GetResourcesInput
// - options ...request.Option
func (_e *AWSTaggingClient_Expecter) GetResourcesWithContext(v interface{}, getResourcesInput interface{}, options ...interface{}) *AWSTaggingClient_GetResourcesWithContext_Call {
return &AWSTaggingClient_GetResourcesWithContext_Call{Call: _e.mock.On("GetResourcesWithContext",
append([]interface{}{v, getResourcesInput}, options...)...)}
// - fns ...func(*resourcegroupstaggingapi.Options)
func (_e *AWSTaggingClient_Expecter) GetResources(context1 interface{}, getResourcesInput interface{}, fns ...interface{}) *AWSTaggingClient_GetResources_Call {
return &AWSTaggingClient_GetResources_Call{Call: _e.mock.On("GetResources",
append([]interface{}{context1, getResourcesInput}, fns...)...)}
}
func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Run(run func(v aws.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, options ...request.Option)) *AWSTaggingClient_GetResourcesWithContext_Call {
func (_c *AWSTaggingClient_GetResources_Call) Run(run func(context1 context.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, fns ...func(*resourcegroupstaggingapi.Options))) *AWSTaggingClient_GetResources_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 aws.Context
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(aws.Context)
arg0 = args[0].(context.Context)
}
var arg1 *resourcegroupstaggingapi.GetResourcesInput
if args[1] != nil {
arg1 = args[1].(*resourcegroupstaggingapi.GetResourcesInput)
}
var arg2 []request.Option
variadicArgs := make([]request.Option, len(args)-2)
var arg2 []func(*resourcegroupstaggingapi.Options)
variadicArgs := make([]func(*resourcegroupstaggingapi.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(request.Option)
variadicArgs[i] = a.(func(*resourcegroupstaggingapi.Options))
}
}
arg2 = variadicArgs
@ -115,12 +115,12 @@ func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Run(run func(v aws.Cont
return _c
}
func (_c *AWSTaggingClient_GetResourcesWithContext_Call) Return(getResourcesOutput *resourcegroupstaggingapi.GetResourcesOutput, err error) *AWSTaggingClient_GetResourcesWithContext_Call {
func (_c *AWSTaggingClient_GetResources_Call) Return(getResourcesOutput *resourcegroupstaggingapi.GetResourcesOutput, err error) *AWSTaggingClient_GetResources_Call {
_c.Call.Return(getResourcesOutput, err)
return _c
}
func (_c *AWSTaggingClient_GetResourcesWithContext_Call) RunAndReturn(run func(v aws.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, options ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)) *AWSTaggingClient_GetResourcesWithContext_Call {
func (_c *AWSTaggingClient_GetResources_Call) RunAndReturn(run func(context1 context.Context, getResourcesInput *resourcegroupstaggingapi.GetResourcesInput, fns ...func(*resourcegroupstaggingapi.Options)) (*resourcegroupstaggingapi.GetResourcesOutput, error)) *AWSTaggingClient_GetResources_Call {
_c.Call.Return(run)
return _c
}

View file

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"regexp"
"slices"
"strings"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
@ -58,13 +59,7 @@ func matchFilter(ctx context.Context, provider SCMProviderService, repo *Reposit
}
if filter.LabelMatch != nil {
found := false
for _, label := range repo.Labels {
if filter.LabelMatch.MatchString(label) {
found = true
break
}
}
found := slices.ContainsFunc(repo.Labels, filter.LabelMatch.MatchString)
if !found {
return false, nil
}

View file

@ -10,10 +10,6 @@ import (
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
func strp(s string) *string {
return &s
}
func TestFilterRepoMatch(t *testing.T) {
provider := &MockProvider{
Repos: []*Repository{
@ -33,7 +29,7 @@ func TestFilterRepoMatch(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
RepositoryMatch: strp("n|hr"),
RepositoryMatch: new("n|hr"),
},
}
repos, err := ListRepos(t.Context(), provider, filters, "")
@ -62,7 +58,7 @@ func TestFilterLabelMatch(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
LabelMatch: strp("^prod-.*$"),
LabelMatch: new("^prod-.*$"),
},
}
repos, err := ListRepos(t.Context(), provider, filters, "")
@ -131,7 +127,7 @@ func TestFilterRepoMatchBadRegexp(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
RepositoryMatch: strp("("),
RepositoryMatch: new("("),
},
}
_, err := ListRepos(t.Context(), provider, filters, "")
@ -148,7 +144,7 @@ func TestFilterLabelMatchBadRegexp(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
LabelMatch: strp("("),
LabelMatch: new("("),
},
}
_, err := ListRepos(t.Context(), provider, filters, "")
@ -182,7 +178,7 @@ func TestFilterBranchMatch(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
BranchMatch: strp("w"),
BranchMatch: new("w"),
},
}
repos, err := ListRepos(t.Context(), provider, filters, "")
@ -213,8 +209,8 @@ func TestMultiFilterAnd(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
RepositoryMatch: strp("w"),
LabelMatch: strp("^prod-.*$"),
RepositoryMatch: new("w"),
LabelMatch: new("^prod-.*$"),
},
}
repos, err := ListRepos(t.Context(), provider, filters, "")
@ -242,10 +238,10 @@ func TestMultiFilterOr(t *testing.T) {
}
filters := []argoprojiov1alpha1.SCMProviderGeneratorFilter{
{
RepositoryMatch: strp("e"),
RepositoryMatch: new("e"),
},
{
LabelMatch: strp("^prod-.*$"),
LabelMatch: new("^prod-.*$"),
},
}
repos, err := ListRepos(t.Context(), provider, filters, "")

View file

@ -0,0 +1,137 @@
package utils
import (
"context"
"errors"
"fmt"
"reflect"
"sync"
"unsafe"
log "github.com/sirupsen/logrus"
k8scache "k8s.io/client-go/tools/cache"
ctrlcache "sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
application "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
// NewCacheSyncingClient returns a client that wraps the given client and syncs the cache after each Create, Update, Patch, or Delete operation on Application objects.
func NewCacheSyncingClient(c client.Client, cache ctrlcache.Cache) client.Client {
res := &cacheSyncingClient{Client: c, storesByNs: make(map[string]k8scache.Store)}
// The k8s controller runtime's cache does not expose a way to get the underlying store, so we have to use reflection to access it.
// This is necessary to keep the cache in sync with the client operations.
field := reflect.ValueOf(cache).Elem().FieldByName("namespaceToCache")
if field.Kind() == reflect.Map {
namespaceToCache := *(*map[string]ctrlcache.Cache)(unsafe.Pointer(field.UnsafeAddr()))
res.getNSCache = func(_ context.Context, obj client.Object) (ctrlcache.Cache, error) {
res, ok := namespaceToCache[obj.GetNamespace()]
if !ok {
return nil, fmt.Errorf("cache for namespace %s not found", obj.GetNamespace())
}
return res, nil
}
} else {
res.getNSCache = func(_ context.Context, _ client.Object) (ctrlcache.Cache, error) {
return cache, nil
}
}
return res
}
type cacheSyncingClient struct {
client.Client
getNSCache func(ctx context.Context, obj client.Object) (ctrlcache.Cache, error)
storesByNs map[string]k8scache.Store
storesByNsLock sync.RWMutex
}
func (c *cacheSyncingClient) getStore(ctx context.Context, obj client.Object) (k8scache.Store, error) {
c.storesByNsLock.RLock()
store, ok := c.storesByNs[obj.GetNamespace()]
c.storesByNsLock.RUnlock()
if ok {
return store, nil
}
store, err := c.retrieveStore(ctx, obj)
if err != nil {
return nil, err
}
c.storesByNsLock.Lock()
c.storesByNs[obj.GetNamespace()] = store
c.storesByNsLock.Unlock()
return store, nil
}
func (c *cacheSyncingClient) retrieveStore(ctx context.Context, obj client.Object) (k8scache.Store, error) {
nsCache, err := c.getNSCache(ctx, obj)
if err != nil {
return nil, fmt.Errorf("failed to get namespace cache: %w", err)
}
informer, err := nsCache.GetInformerForKind(ctx, application.ApplicationSchemaGroupVersionKind)
if err != nil {
return nil, fmt.Errorf("failed to get informer: %w", err)
}
indexInformer, ok := informer.(k8scache.SharedIndexInformer)
if !ok {
return nil, errors.New("informer is not a SharedIndexInformer")
}
return indexInformer.GetStore(), nil
}
func (c *cacheSyncingClient) execAndSyncCache(ctx context.Context, op func() error, obj client.Object, deleteObj bool) error {
// execute the operation first and only sync cache if it succeeds
if err := op(); err != nil {
return err
}
// sync cache for applications only
if _, ok := obj.(*application.Application); !ok {
return nil
}
logger := log.WithField("namespace", obj.GetNamespace()).WithField("name", obj.GetName())
store, err := c.getStore(ctx, obj)
if err != nil {
logger.Errorf("failed to get cache store: %v", err)
} else {
if deleteObj {
err = store.Delete(obj)
} else {
err = store.Update(obj)
}
}
if err != nil {
logger.Errorf("failed to sync cache for object: %v", err)
}
return nil
}
func (c *cacheSyncingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error {
return c.execAndSyncCache(ctx, func() error {
return c.Client.Create(ctx, obj, opts...)
}, obj, false)
}
func (c *cacheSyncingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error {
return c.execAndSyncCache(ctx, func() error {
return c.Client.Update(ctx, obj, opts...)
}, obj, false)
}
func (c *cacheSyncingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error {
return c.execAndSyncCache(ctx, func() error {
return c.Client.Patch(ctx, obj, patch, opts...)
}, obj, false)
}
func (c *cacheSyncingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error {
return c.execAndSyncCache(ctx, func() error {
return c.Client.Delete(ctx, obj, opts...)
}, obj, true)
}

View file

@ -0,0 +1,111 @@
package utils
import (
"context"
"testing"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
k8scache "k8s.io/client-go/tools/cache"
ctrlcache "sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
application "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)
type fakeMultiNamespaceCache struct {
//nolint:unused
namespaceToCache map[string]ctrlcache.Cache
ctrlcache.Cache
k8scache.SharedIndexInformer
Store k8scache.Store
}
func (f *fakeMultiNamespaceCache) GetInformerForKind(_ context.Context, _ schema.GroupVersionKind, _ ...ctrlcache.InformerGetOption) (ctrlcache.Informer, error) {
return f, nil
}
func (f *fakeMultiNamespaceCache) GetStore() k8scache.Store {
return f.Store
}
func newClient(objs ...client.Object) (*cacheSyncingClient, k8scache.Store, error) {
scheme := runtime.NewScheme()
if err := application.AddToScheme(scheme); err != nil {
return nil, nil, err
}
store := k8scache.NewStore(func(obj any) (string, error) {
return obj.(client.Object).GetName(), nil
})
for _, obj := range objs {
if err := store.Add(obj); err != nil {
return nil, nil, err
}
}
c := &cacheSyncingClient{
Client: fake.NewClientBuilder().WithScheme(scheme).WithObjects(objs...).Build(),
storesByNs: map[string]k8scache.Store{},
getNSCache: func(_ context.Context, _ client.Object) (ctrlcache.Cache, error) {
return &fakeMultiNamespaceCache{Store: store}, nil
},
}
return c, store, nil
}
func TestCreateSyncsCache(t *testing.T) {
c, store, err := newClient()
require.NoError(t, err)
app := &application.Application{
ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "argocd"},
}
require.NoError(t, c.Create(context.Background(), app))
require.Contains(t, store.List(), app)
}
func TestUpdateSyncsCache(t *testing.T) {
app := &application.Application{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "argocd",
Labels: map[string]string{"foo": "bar"},
},
}
c, store, err := newClient(app)
require.NoError(t, err)
updatedApp := app.DeepCopy()
updatedApp.Labels["foo"] = "bar-UPDATED"
require.NoError(t, c.Update(context.Background(), updatedApp))
updated, _, err := store.GetByKey("test")
require.NoError(t, err)
require.Equal(t, "bar-UPDATED", updated.(*application.Application).Labels["foo"])
}
func TestDeleteSyncsCache(t *testing.T) {
app := &application.Application{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "argocd",
Labels: map[string]string{"foo": "bar"},
},
}
c, store, err := newClient(app)
require.NoError(t, err)
require.NoError(t, c.Delete(context.Background(), app))
require.Empty(t, store.List())
}
func TestNewClientDoesNotCrashWithMultiNamespaceCache(_ *testing.T) {
_ = NewCacheSyncingClient(nil, &fakeMultiNamespaceCache{})
}

View file

@ -1,15 +1,12 @@
package utils
import (
"context"
"fmt"
"github.com/argoproj/argo-cd/v3/common"
appv1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/util/db"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
appv1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v3/util/settings"
)
// ClusterSpecifier contains only the name and server URL of a cluster. We use this struct to avoid partially-populating
@ -19,42 +16,44 @@ type ClusterSpecifier struct {
Server string
}
func ListClusters(ctx context.Context, clientset kubernetes.Interface, namespace string) ([]ClusterSpecifier, error) {
clusterSecretsList, err := clientset.CoreV1().Secrets(namespace).List(ctx,
metav1.ListOptions{LabelSelector: common.LabelKeySecretType + "=" + common.LabelValueSecretTypeCluster})
if err != nil {
return nil, err
}
if clusterSecretsList == nil {
return nil, nil
}
clusterSecrets := clusterSecretsList.Items
clusterList := make([]ClusterSpecifier, len(clusterSecrets))
hasInClusterCredentials := false
for i, clusterSecret := range clusterSecrets {
cluster, err := db.SecretToCluster(&clusterSecret)
if err != nil || cluster == nil {
return nil, fmt.Errorf("unable to convert cluster secret to cluster object '%s': %w", clusterSecret.Name, err)
// SecretsContainInClusterCredentials checks if any of the provided secrets represent the in-cluster configuration.
func SecretsContainInClusterCredentials(secrets []corev1.Secret) bool {
for _, secret := range secrets {
if string(secret.Data["server"]) == appv1.KubernetesInternalAPIServerAddr {
return true
}
clusterList[i] = ClusterSpecifier{
}
return false
}
// ListClusters returns a list of cluster specifiers using the ClusterInformer.
func ListClusters(clusterInformer *settings.ClusterInformer) ([]ClusterSpecifier, error) {
clusters, err := clusterInformer.ListClusters()
if err != nil {
return nil, fmt.Errorf("error listing clusters: %w", err)
}
// len of clusters +1 for the in cluster secret
clusterList := make([]ClusterSpecifier, 0, len(clusters)+1)
hasInCluster := false
for _, cluster := range clusters {
clusterList = append(clusterList, ClusterSpecifier{
Name: cluster.Name,
Server: cluster.Server,
}
})
if cluster.Server == appv1.KubernetesInternalAPIServerAddr {
hasInClusterCredentials = true
hasInCluster = true
}
}
if !hasInClusterCredentials {
if !hasInCluster {
// There was no secret for the in-cluster config, so we add it here. We don't fully-populate the Cluster struct,
// since only the name and server fields are used by the generator.
clusterList = append(clusterList, ClusterSpecifier{
Name: "in-cluster",
Name: appv1.KubernetesInClusterName,
Server: appv1.KubernetesInternalAPIServerAddr,
})
}
return clusterList, nil
}

View file

@ -24,6 +24,43 @@ import (
"github.com/argoproj/argo-cd/v3/util/argo/normalizers"
)
var appEquality = conversion.EqualitiesOrDie(
func(a, b resource.Quantity) bool {
// Ignore formatting, only care that numeric value stayed the same.
// TODO: if we decide it's important, it should be safe to start comparing the format.
//
// Uninitialized quantities are equivalent to 0 quantities.
return a.Cmp(b) == 0
},
func(a, b metav1.MicroTime) bool {
return a.UTC().Equal(b.UTC())
},
func(a, b metav1.Time) bool {
return a.UTC().Equal(b.UTC())
},
func(a, b labels.Selector) bool {
return a.String() == b.String()
},
func(a, b fields.Selector) bool {
return a.String() == b.String()
},
func(a, b argov1alpha1.ApplicationDestination) bool {
return a.Namespace == b.Namespace && a.Name == b.Name && a.Server == b.Server
},
)
// BuildIgnoreDiffConfig constructs a DiffConfig from the ApplicationSet's ignoreDifferences rules.
// Returns nil when ignoreDifferences is empty.
func BuildIgnoreDiffConfig(ignoreDifferences argov1alpha1.ApplicationSetIgnoreDifferences, ignoreNormalizerOpts normalizers.IgnoreNormalizerOpts) (argodiff.DiffConfig, error) {
if len(ignoreDifferences) == 0 {
return nil, nil
}
return argodiff.NewDiffConfigBuilder().
WithDiffSettings(ignoreDifferences.ToApplicationIgnoreDifferences(), nil, false, ignoreNormalizerOpts).
WithNoCache().
Build()
}
// CreateOrUpdate overrides "sigs.k8s.io/controller-runtime" function
// in sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go
// to add equality for argov1alpha1.ApplicationDestination
@ -34,10 +71,15 @@ import (
// cluster. The object's desired state must be reconciled with the existing
// state inside the passed in callback MutateFn.
//
// diffConfig must be built once per reconcile cycle via BuildIgnoreDiffConfig and may be nil
// when there are no ignoreDifferences rules. obj.Spec must already be normalized by the caller
// via NormalizeApplicationSpec before this function is called; the live object fetched from the
// cluster is normalized internally.
//
// The MutateFn is called regardless of creating or updating an object.
//
// It returns the executed operation and an error.
func CreateOrUpdate(ctx context.Context, logCtx *log.Entry, c client.Client, ignoreAppDifferences argov1alpha1.ApplicationSetIgnoreDifferences, ignoreNormalizerOpts normalizers.IgnoreNormalizerOpts, obj *argov1alpha1.Application, f controllerutil.MutateFn) (controllerutil.OperationResult, error) {
func CreateOrUpdate(ctx context.Context, logCtx *log.Entry, c client.Client, diffConfig argodiff.DiffConfig, obj *argov1alpha1.Application, f controllerutil.MutateFn) (controllerutil.OperationResult, error) {
key := client.ObjectKeyFromObject(obj)
if err := c.Get(ctx, key, obj); err != nil {
if !errors.IsNotFound(err) {
@ -59,43 +101,18 @@ func CreateOrUpdate(ctx context.Context, logCtx *log.Entry, c client.Client, ign
return controllerutil.OperationResultNone, err
}
// Normalize the live spec to avoid spurious diffs from unimportant differences (e.g. nil vs
// empty SyncPolicy). obj.Spec is already normalized by the caller; only the live side needs it.
normalizedLive.Spec = *argo.NormalizeApplicationSpec(&normalizedLive.Spec)
// Apply ignoreApplicationDifferences rules to remove ignored fields from both the live and the desired state. This
// prevents those differences from appearing in the diff and therefore in the patch.
err := applyIgnoreDifferences(ignoreAppDifferences, normalizedLive, obj, ignoreNormalizerOpts)
err := applyIgnoreDifferences(diffConfig, normalizedLive, obj)
if err != nil {
return controllerutil.OperationResultNone, fmt.Errorf("failed to apply ignore differences: %w", err)
}
// Normalize to avoid diffing on unimportant differences.
normalizedLive.Spec = *argo.NormalizeApplicationSpec(&normalizedLive.Spec)
obj.Spec = *argo.NormalizeApplicationSpec(&obj.Spec)
equality := conversion.EqualitiesOrDie(
func(a, b resource.Quantity) bool {
// Ignore formatting, only care that numeric value stayed the same.
// TODO: if we decide it's important, it should be safe to start comparing the format.
//
// Uninitialized quantities are equivalent to 0 quantities.
return a.Cmp(b) == 0
},
func(a, b metav1.MicroTime) bool {
return a.UTC().Equal(b.UTC())
},
func(a, b metav1.Time) bool {
return a.UTC().Equal(b.UTC())
},
func(a, b labels.Selector) bool {
return a.String() == b.String()
},
func(a, b fields.Selector) bool {
return a.String() == b.String()
},
func(a, b argov1alpha1.ApplicationDestination) bool {
return a.Namespace == b.Namespace && a.Name == b.Name && a.Server == b.Server
},
)
if equality.DeepEqual(normalizedLive, obj) {
if appEquality.DeepEqual(normalizedLive, obj) {
return controllerutil.OperationResultNone, nil
}
@ -135,19 +152,13 @@ func mutate(f controllerutil.MutateFn, key client.ObjectKey, obj client.Object)
}
// applyIgnoreDifferences applies the ignore differences rules to the found application. It modifies the applications in place.
func applyIgnoreDifferences(applicationSetIgnoreDifferences argov1alpha1.ApplicationSetIgnoreDifferences, found *argov1alpha1.Application, generatedApp *argov1alpha1.Application, ignoreNormalizerOpts normalizers.IgnoreNormalizerOpts) error {
if len(applicationSetIgnoreDifferences) == 0 {
// diffConfig may be nil, in which case this is a no-op.
func applyIgnoreDifferences(diffConfig argodiff.DiffConfig, found *argov1alpha1.Application, generatedApp *argov1alpha1.Application) error {
if diffConfig == nil {
return nil
}
generatedAppCopy := generatedApp.DeepCopy()
diffConfig, err := argodiff.NewDiffConfigBuilder().
WithDiffSettings(applicationSetIgnoreDifferences.ToApplicationIgnoreDifferences(), nil, false, ignoreNormalizerOpts).
WithNoCache().
Build()
if err != nil {
return fmt.Errorf("failed to build diff config: %w", err)
}
unstructuredFound, err := appToUnstructured(found)
if err != nil {
return fmt.Errorf("failed to convert found application to unstructured: %w", err)

View file

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
@ -216,7 +216,6 @@ spec:
}
for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
foundApp := v1alpha1.Application{TypeMeta: appMeta}
@ -225,7 +224,9 @@ spec:
generatedApp := v1alpha1.Application{TypeMeta: appMeta}
err = yaml.Unmarshal([]byte(tc.generatedApp), &generatedApp)
require.NoError(t, err, tc.generatedApp)
err = applyIgnoreDifferences(tc.ignoreDifferences, &foundApp, &generatedApp, normalizers.IgnoreNormalizerOpts{})
diffConfig, err := BuildIgnoreDiffConfig(tc.ignoreDifferences, normalizers.IgnoreNormalizerOpts{})
require.NoError(t, err)
err = applyIgnoreDifferences(diffConfig, &foundApp, &generatedApp)
require.NoError(t, err)
yamlFound, err := yaml.Marshal(tc.foundApp)
require.NoError(t, err)

View file

@ -2,6 +2,7 @@ package utils
import (
"fmt"
"slices"
"sort"
"strconv"
"strings"
@ -207,12 +208,7 @@ type Requirement struct {
}
func (r *Requirement) hasValue(value string) bool {
for i := range r.strValues {
if r.strValues[i] == value {
return true
}
}
return false
return slices.Contains(r.strValues, value)
}
func (r *Requirement) Matches(ls labels.Labels) bool {

View file

@ -90,7 +90,7 @@ func ConvertYAMLToJSON(str string) (string, error) {
// This function is in charge of searching all String fields of the object recursively and apply templating
// thanks to https://gist.github.com/randallmlough/1fd78ec8a1034916ca52281e3b886dc7
func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string) error {
func (r *Render) deeplyReplaceWithFilter(destination, original reflect.Value, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string, filter func(destination, original, parent reflect.Value, field reflect.StructField) (bool, error)) error {
switch original.Kind() {
// The first cases handle nested structures and translate them recursively
// If it is a pointer we need to unwrap and call once again
@ -110,7 +110,7 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
copyUnexported(destination, original)
}
// Unwrap the newly created pointer
if err := r.deeplyReplace(destination.Elem(), originalValue, replaceMap, useGoTemplate, goTemplateOptions); err != nil {
if err := r.deeplyReplaceWithFilter(destination.Elem(), originalValue, replaceMap, useGoTemplate, goTemplateOptions, filter); err != nil {
// Not wrapping the error, since this is a recursive function. Avoids excessively long error messages.
return err
}
@ -131,7 +131,7 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
reflectValue := reflect.New(reflectType)
copyValue := reflectValue.Elem()
if err := r.deeplyReplace(copyValue, originalValue, replaceMap, useGoTemplate, goTemplateOptions); err != nil {
if err := r.deeplyReplaceWithFilter(copyValue, originalValue, replaceMap, useGoTemplate, goTemplateOptions, filter); err != nil {
// Not wrapping the error, since this is a recursive function. Avoids excessively long error messages.
return err
}
@ -142,6 +142,16 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
case reflect.Struct:
for i := 0; i < original.NumField(); i++ {
currentType := fmt.Sprintf("%s.%s", original.Type().Field(i).Name, original.Type().PkgPath())
if filter != nil {
matched, filterErr := filter(destination.Field(i), original.Field(i), original,
original.Type().Field(i))
if matched {
if filterErr != nil {
return filterErr
}
continue
}
}
// specific case time
if currentType == "time.Time" {
destination.Field(i).Set(original.Field(i))
@ -158,7 +168,7 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
}
jsonOriginal := reflect.ValueOf(&unmarshaled)
jsonCopy := reflect.New(jsonOriginal.Type()).Elem()
err = r.deeplyReplace(jsonCopy, jsonOriginal, replaceMap, useGoTemplate, goTemplateOptions)
err = r.deeplyReplaceWithFilter(jsonCopy, jsonOriginal, replaceMap, useGoTemplate, goTemplateOptions, filter)
if err != nil {
return fmt.Errorf("failed to deeply replace JSON field contents: %w", err)
}
@ -168,7 +178,7 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
return fmt.Errorf("failed to marshal templated JSON field: %w", err)
}
destination.Field(i).Set(reflect.ValueOf(data))
} else if err := r.deeplyReplace(destination.Field(i), original.Field(i), replaceMap, useGoTemplate, goTemplateOptions); err != nil {
} else if err := r.deeplyReplaceWithFilter(destination.Field(i), original.Field(i), replaceMap, useGoTemplate, goTemplateOptions, filter); err != nil {
// Not wrapping the error, since this is a recursive function. Avoids excessively long error messages.
return err
}
@ -183,7 +193,7 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
}
for i := 0; i < original.Len(); i++ {
if err := r.deeplyReplace(destination.Index(i), original.Index(i), replaceMap, useGoTemplate, goTemplateOptions); err != nil {
if err := r.deeplyReplaceWithFilter(destination.Index(i), original.Index(i), replaceMap, useGoTemplate, goTemplateOptions, filter); err != nil {
// Not wrapping the error, since this is a recursive function. Avoids excessively long error messages.
return err
}
@ -204,7 +214,7 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
// New gives us a pointer, but again we want the value
copyValue := reflect.New(originalValue.Type()).Elem()
if err := r.deeplyReplace(copyValue, originalValue, replaceMap, useGoTemplate, goTemplateOptions); err != nil {
if err := r.deeplyReplaceWithFilter(copyValue, originalValue, replaceMap, useGoTemplate, goTemplateOptions, filter); err != nil {
// Not wrapping the error, since this is a recursive function. Avoids excessively long error messages.
return err
}
@ -249,6 +259,10 @@ func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap m
return nil
}
func (r *Render) deeplyReplace(destination, original reflect.Value, replaceMap map[string]any, useGoTemplate bool, goTemplateOptions []string) error {
return r.deeplyReplaceWithFilter(destination, original, replaceMap, useGoTemplate, goTemplateOptions, nil)
}
// isNillable returns true if the value is something which may be set to nil. This function is meant to guard against a
// panic from calling IsNil on a non-pointer type.
func isNillable(v reflect.Value) bool {
@ -290,6 +304,27 @@ func (r *Render) RenderTemplateParams(tmpl *argoappsv1.Application, syncPolicy *
return replacedTmpl, nil
}
// Generator types that have Value field
var filteredGeneratorTypes = getFilteredGeneratorTypes()
// find generator types that have Values field
func getFilteredGeneratorTypes() map[string]bool {
result := map[string]bool{}
t := reflect.TypeFor[argoappsv1.ApplicationSetGenerator]()
for field := range t.Fields() {
genPtrType := field.Type
if genPtrType.Kind() == reflect.Ptr && strings.HasSuffix(genPtrType.String(), "Generator") {
genType := genPtrType.Elem()
for field := range genType.Fields() {
if field.Name == "Values" && field.Type.String() == "map[string]string" {
result[genType.Name()] = true
}
}
}
}
return result
}
func (r *Render) RenderGeneratorParams(gen *argoappsv1.ApplicationSetGenerator, params map[string]any, useGoTemplate bool, goTemplateOptions []string) (*argoappsv1.ApplicationSetGenerator, error) {
if gen == nil {
return nil, errors.New("generator is empty")
@ -302,7 +337,17 @@ func (r *Render) RenderGeneratorParams(gen *argoappsv1.ApplicationSetGenerator,
original := reflect.ValueOf(gen)
destination := reflect.New(original.Type()).Elem()
if err := r.deeplyReplace(destination, original, params, useGoTemplate, goTemplateOptions); err != nil {
filter := func(destination, original, parent reflect.Value, field reflect.StructField) (bool, error) {
if field.Name == "Values" && field.Type.String() == "map[string]string" && filteredGeneratorTypes[parent.Type().Name()] {
if !destination.CanSet() {
return false, fmt.Errorf("cannot copy %s.Values, this cannot happen", parent.Type().Name())
}
destination.Set(original)
return true, nil
}
return false, nil
}
if err := r.deeplyReplaceWithFilter(destination, original, params, useGoTemplate, goTemplateOptions, filter); err != nil {
return nil, fmt.Errorf("failed to replace parameters in generator: %w", err)
}
@ -388,8 +433,7 @@ func invalidGenerators(applicationSetInfo *argoappsv1.ApplicationSet) (bool, map
for index, generator := range applicationSetInfo.Spec.Generators {
v := reflect.Indirect(reflect.ValueOf(generator))
found := false
for i := 0; i < v.NumField(); i++ {
field := v.Field(i)
for _, field := range v.Fields() {
if !field.CanInterface() {
continue
}

View file

@ -5,6 +5,7 @@ import (
"encoding/json"
"os"
"path"
"strings"
"testing"
"time"
@ -1390,3 +1391,12 @@ WkBKOclmOV2xlTVuPw==
})
}
}
func Test_getFilteredGeneratorTypes(t *testing.T) {
generators := getFilteredGeneratorTypes()
assert.Less(t, 1, len(generators))
for name, val := range generators {
assert.True(t, val)
assert.True(t, strings.HasSuffix(name, "Generator"))
}
}

View file

@ -107,10 +107,8 @@ func NewWebhookHandler(webhookParallelism int, argocdSettingsMgr *argosettings.S
func (h *WebhookHandler) startWorkerPool(webhookParallelism int) {
compLog := log.WithField("component", "applicationset-webhook")
for i := 0; i < webhookParallelism; i++ {
h.Add(1)
go func() {
defer h.Done()
for range webhookParallelism {
h.Go(func() {
for {
payload, ok := <-h.queue
if !ok {
@ -118,7 +116,7 @@ func (h *WebhookHandler) startWorkerPool(webhookParallelism int) {
}
guard.RecoverAndLog(func() { h.HandleEvent(payload) }, compLog, panicMsgAppSet)
}
}()
})
}
}

View file

@ -233,7 +233,7 @@ func TestWebhookHandler(t *testing.T) {
h, err := NewWebhookHandler(webhookParallelism, set, fc, mockGenerators())
require.NoError(t, err)
req := httptest.NewRequest(http.MethodPost, "/api/webhook", http.NoBody)
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
req.Header.Set(test.headerKey, test.headerValue)
eventJSON, err := os.ReadFile(filepath.Join("testdata", test.payloadFile))
require.NoError(t, err)
@ -609,7 +609,7 @@ func fakeAppWithMatrixAndNestedGitGenerator(name, namespace, repo string) *v1alp
},
{
Matrix: &apiextensionsv1.JSON{
Raw: []byte(fmt.Sprintf(`{
Raw: fmt.Appendf(nil, `{
"Generators": [
{
"List": {
@ -626,7 +626,7 @@ func fakeAppWithMatrixAndNestedGitGenerator(name, namespace, repo string) *v1alp
}
}
]
}`, repo)),
}`, repo),
},
},
},
@ -707,7 +707,7 @@ func fakeAppWithMergeAndNestedGitGenerator(name, namespace, repo string) *v1alph
},
{
Merge: &apiextensionsv1.JSON{
Raw: []byte(fmt.Sprintf(`{
Raw: fmt.Appendf(nil, `{
"MergeKeys": ["server"],
"Generators": [
{
@ -719,7 +719,7 @@ func fakeAppWithMergeAndNestedGitGenerator(name, namespace, repo string) *v1alph
}
}
]
}`, repo)),
}`, repo),
},
},
},

225
assets/swagger.json generated
View file

@ -2265,6 +2265,44 @@
}
}
},
"/api/v1/applicationsets/{name}/events": {
"get": {
"tags": [
"ApplicationSetService"
],
"summary": "ListResourceEvents returns a list of event resources",
"operationId": "ApplicationSetService_ListResourceEvents",
"parameters": [
{
"type": "string",
"description": "the applicationsets's name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "The application set namespace. Default empty is argocd control plane namespace.",
"name": "appsetNamespace",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1EventList"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
}
}
},
"/api/v1/applicationsets/{name}/resource-tree": {
"get": {
"tags": [
@ -4001,6 +4039,30 @@
"description": "Whether https should be disabled for an OCI repo.",
"name": "insecureOciForceHttp",
"in": "query"
},
{
"type": "string",
"description": "Azure Service Principal Client ID.",
"name": "azureServicePrincipalClientId",
"in": "query"
},
{
"type": "string",
"description": "Azure Service Principal Client Secret.",
"name": "azureServicePrincipalClientSecret",
"in": "query"
},
{
"type": "string",
"description": "Azure Service Principal Tenant ID.",
"name": "azureServicePrincipalTenantId",
"in": "query"
},
{
"type": "string",
"description": "Azure Active Directory Endpoint.",
"name": "azureActiveDirectoryEndpoint",
"in": "query"
}
],
"responses": {
@ -4347,6 +4409,69 @@
}
}
},
"/api/v1/stream/applicationsets": {
"get": {
"tags": [
"ApplicationSetService"
],
"operationId": "ApplicationSetService_Watch",
"parameters": [
{
"type": "string",
"name": "name",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"name": "projects",
"in": "query"
},
{
"type": "string",
"name": "selector",
"in": "query"
},
{
"type": "string",
"name": "appSetNamespace",
"in": "query"
},
{
"type": "string",
"description": "when specified with a watch call, shows changes that occur after that particular version of a resource.",
"name": "resourceVersion",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"title": "Stream result of v1alpha1ApplicationSetWatchEvent",
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/v1alpha1ApplicationSetWatchEvent"
}
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
}
}
},
"/api/v1/write-repocreds": {
"get": {
"tags": [
@ -4845,6 +4970,30 @@
"description": "Whether https should be disabled for an OCI repo.",
"name": "insecureOciForceHttp",
"in": "query"
},
{
"type": "string",
"description": "Azure Service Principal Client ID.",
"name": "azureServicePrincipalClientId",
"in": "query"
},
{
"type": "string",
"description": "Azure Service Principal Client Secret.",
"name": "azureServicePrincipalClientSecret",
"in": "query"
},
{
"type": "string",
"description": "Azure Service Principal Tenant ID.",
"name": "azureServicePrincipalTenantId",
"in": "query"
},
{
"type": "string",
"description": "Azure Active Directory Endpoint.",
"name": "azureActiveDirectoryEndpoint",
"in": "query"
}
],
"responses": {
@ -7261,7 +7410,7 @@
"type": "object",
"properties": {
"applyNestedSelectors": {
"description": "ApplyNestedSelectors enables selectors defined within the generators of two level-nested matrix or merge generators\nDeprecated: This field is ignored, and the behavior is always enabled. The field will be removed in a future\nversion of the ApplicationSet CRD.",
"description": "ApplyNestedSelectors enables selectors defined within the generators of two level-nested matrix or merge generators.\n\nDeprecated: This field is ignored, and the behavior is always enabled. The field will be removed in a future\nversion of the ApplicationSet CRD.",
"type": "boolean"
},
"generators": {
@ -7319,6 +7468,9 @@
"$ref": "#/definitions/v1alpha1ApplicationSetCondition"
}
},
"health": {
"$ref": "#/definitions/v1alpha1HealthStatus"
},
"resources": {
"description": "Resources is a list of Applications resources managed by this application set.",
"type": "array",
@ -7418,6 +7570,19 @@
}
}
},
"v1alpha1ApplicationSetWatchEvent": {
"description": "ApplicationSetWatchEvent contains information about application change.",
"type": "object",
"properties": {
"applicationSet": {
"$ref": "#/definitions/v1alpha1ApplicationSet"
},
"type": {
"type": "string",
"title": "Type represents the Kubernetes watch event type. The protobuf tag uses\ncasttype to ensure the generated Go code keeps this field as\nwatch.EventType (a strong Go type) instead of falling back to a plain string"
}
}
},
"v1alpha1ApplicationSource": {
"type": "object",
"title": "ApplicationSource contains all required information about the source of an application",
@ -7654,11 +7819,11 @@
},
"namePrefix": {
"type": "string",
"title": "NamePrefix is a prefix appended to resources for Kustomize apps"
"title": "NamePrefix overrides the namePrefix in the kustomization.yaml for Kustomize apps"
},
"nameSuffix": {
"type": "string",
"title": "NameSuffix is a suffix appended to resources for Kustomize apps"
"title": "NameSuffix overrides the nameSuffix in the kustomization.yaml for Kustomize apps"
},
"namespace": {
"type": "string",
@ -9402,6 +9567,22 @@
"type": "object",
"title": "RepoCreds holds the definition for repository credentials",
"properties": {
"azureActiveDirectoryEndpoint": {
"type": "string",
"title": "AzureActiveDirectoryEndpoint specifies the Azure Active Directory endpoint used for Service Principal authentication. If empty will default to https://login.microsoftonline.com"
},
"azureServicePrincipalClientId": {
"type": "string",
"title": "AzureServicePrincipalClientId specifies the client ID of the Azure Service Principal used to access the repo"
},
"azureServicePrincipalClientSecret": {
"type": "string",
"title": "AzureServicePrincipalClientSecret specifies the client secret of the Azure Service Principal used to access the repo"
},
"azureServicePrincipalTenantId": {
"type": "string",
"title": "AzureServicePrincipalTenantId specifies the tenant ID of the Azure Service Principal used to access the repo"
},
"bearerToken": {
"type": "string",
"title": "BearerToken contains the bearer token used for Git BitBucket Data Center auth at the repo server"
@ -9501,6 +9682,22 @@
"type": "object",
"title": "Repository is a repository holding application configurations",
"properties": {
"azureActiveDirectoryEndpoint": {
"type": "string",
"title": "AzureActiveDirectoryEndpoint specifies the Azure Active Directory endpoint used for Service Principal authentication. If empty will default to https://login.microsoftonline.com"
},
"azureServicePrincipalClientId": {
"type": "string",
"title": "AzureServicePrincipalClientId specifies the client ID of the Azure Service Principal used to access the repo"
},
"azureServicePrincipalClientSecret": {
"type": "string",
"title": "AzureServicePrincipalClientSecret specifies the client secret of the Azure Service Principal used to access the repo"
},
"azureServicePrincipalTenantId": {
"type": "string",
"title": "AzureServicePrincipalTenantId specifies the tenant ID of the Azure Service Principal used to access the repo"
},
"bearerToken": {
"type": "string",
"title": "BearerToken contains the bearer token used for Git BitBucket Data Center auth at the repo server"
@ -9610,6 +9807,10 @@
"username": {
"type": "string",
"title": "Username contains the user name used for authenticating at the remote repository"
},
"webhookManifestCacheWarmDisabled": {
"description": "WebhookManifestCacheWarmDisabled disables manifest cache warming during webhook processing for this repository.\nWhen set, webhook handlers will only trigger reconciliation for affected applications and skip Redis cache\noperations for unaffected ones. Recommended for large monorepos with plain YAML manifests.",
"type": "boolean"
}
}
},
@ -9715,7 +9916,7 @@
"type": "object",
"properties": {
"diff": {
"description": "Diff contains the JSON patch representing the difference between the live and target resource.\nDeprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.",
"description": "Diff contains the JSON patch representing the difference between the live and target resource.\n\nDeprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.",
"type": "string"
},
"group": {
@ -10297,6 +10498,10 @@
"description": "The Gitea URL to talk to. For example https://gitea.mydomain.com/.",
"type": "string"
},
"excludeArchivedRepos": {
"description": "Exclude repositories that are archived.",
"type": "boolean"
},
"insecure": {
"type": "boolean",
"title": "Allow self-signed TLS / Certificates; default: false"
@ -10326,6 +10531,10 @@
"description": "AppSecretName is a reference to a GitHub App repo-creds secret.",
"type": "string"
},
"excludeArchivedRepos": {
"description": "Exclude repositories that are archived.",
"type": "boolean"
},
"organization": {
"description": "GitHub org to scan. Required.",
"type": "string"
@ -10354,6 +10563,10 @@
"description": "Gitlab group to scan. Required. You can use either the project id (recommended) or the full namespaced path.",
"type": "string"
},
"includeArchivedRepos": {
"description": "Include repositories that are archived.",
"type": "boolean"
},
"includeSharedProjects": {
"type": "boolean",
"title": "When recursing through subgroups, also include shared Projects (true) or scan only the subgroups under same path (false). Defaults to \"true\""
@ -10722,6 +10935,10 @@
"type": "string",
"title": "Schedule is the time the window will begin, specified in cron format"
},
"syncOverrun": {
"type": "boolean",
"title": "SyncOverrun allows ongoing syncs to continue in two scenarios:\nFor deny windows: allows syncs that started before the deny window became active to continue running\nFor allow windows: allows syncs that started during the allow window to continue after the window ends"
},
"timeZone": {
"type": "string",
"title": "TimeZone of the sync that will be applied to the schedule"

View file

@ -41,8 +41,6 @@ import (
)
const (
// CLIName is the name of the CLI
cliName = common.ApplicationController
// Default time in seconds for application resync period
defaultAppResyncPeriod = 120
// Default time in seconds for application resync period jitter
@ -99,7 +97,7 @@ func NewCommand() *cobra.Command {
hydratorEnabled bool
)
command := cobra.Command{
Use: cliName,
Use: common.CommandApplicationController,
Short: "Run ArgoCD Application Controller",
Long: "ArgoCD application controller is a Kubernetes controller that continuously monitors running applications and compares the current, live state against the desired target state (as specified in the repo). This command runs Application Controller in the foreground. It can be configured by following options.",
DisableAutoGenTag: true,

View file

@ -32,6 +32,7 @@ import (
"k8s.io/client-go/kubernetes"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/clientcmd"
ctrlcache "sigs.k8s.io/controller-runtime/pkg/cache"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
@ -48,10 +49,6 @@ import (
var gitSubmoduleEnabled = env.ParseBoolFromEnv(common.EnvGitSubmoduleEnabled, true)
const (
cliName = common.ApplicationSetController
)
func NewCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
@ -81,12 +78,14 @@ func NewCommand() *cobra.Command {
webhookParallelism int
tokenRefStrictMode bool
maxResourcesStatusCount int
cacheSyncPeriod time.Duration
concurrentApplicationUpdates int
)
scheme := runtime.NewScheme()
_ = clientgoscheme.AddToScheme(scheme)
_ = appv1alpha1.AddToScheme(scheme)
command := cobra.Command{
Use: cliName,
Use: common.CommandApplicationSetController,
Short: "Starts Argo CD ApplicationSet controller",
DisableAutoGenTag: true,
RunE: func(c *cobra.Command, _ []string) error {
@ -142,13 +141,11 @@ func NewCommand() *cobra.Command {
os.Exit(1)
}
var cacheOpt ctrlcache.Options
cacheOpt := ctrlcache.Options{SyncPeriod: &cacheSyncPeriod}
if watchedNamespace != "" {
cacheOpt = ctrlcache.Options{
DefaultNamespaces: map[string]ctrlcache.Config{
watchedNamespace: {},
},
cacheOpt.DefaultNamespaces = map[string]ctrlcache.Config{
watchedNamespace: {},
}
}
@ -193,6 +190,18 @@ func NewCommand() *cobra.Command {
argoSettingsMgr := argosettings.NewSettingsManager(ctx, k8sClient, namespace)
argoCDDB := db.NewDB(namespace, argoSettingsMgr, k8sClient)
clusterInformer, err := argosettings.NewClusterInformer(k8sClient, namespace)
if err != nil {
log.Error(err, "unable to create cluster informer")
os.Exit(1)
}
go clusterInformer.Run(ctx.Done())
if !cache.WaitForCacheSync(ctx.Done(), clusterInformer.HasSynced) {
log.Error("Timed out waiting for cluster cache to sync")
os.Exit(1)
}
scmConfig := generators.NewSCMConfig(scmRootCAPath, allowedScmProviders, enableScmProviders, enableGitHubAPIMetrics, github_app.NewAuthCredentials(argoCDDB.(db.RepoCredsDB)), tokenRefStrictMode)
tlsConfig := apiclient.TLSConfiguration{
@ -212,7 +221,7 @@ func NewCommand() *cobra.Command {
repoClientset := apiclient.NewRepoServerClientset(argocdRepoServer, repoServerTimeoutSeconds, tlsConfig)
argoCDService := services.NewArgoCDService(argoCDDB, gitSubmoduleEnabled, repoClientset, enableNewGitFileGlobbing)
topLevelGenerators := generators.GetGenerators(ctx, mgr.GetClient(), k8sClient, namespace, argoCDService, dynamicClient, scmConfig)
topLevelGenerators := generators.GetGenerators(ctx, mgr.GetClient(), k8sClient, namespace, argoCDService, dynamicClient, scmConfig, clusterInformer)
// start a webhook server that listens to incoming webhook payloads
webhookHandler, err := webhook.NewWebhookHandler(webhookParallelism, argoSettingsMgr, mgr.GetClient(), topLevelGenerators)
@ -231,23 +240,25 @@ func NewCommand() *cobra.Command {
})
if err = (&controllers.ApplicationSetReconciler{
Generators: topLevelGenerators,
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("applicationset-controller"),
Renderer: &utils.Render{},
Policy: policyObj,
EnablePolicyOverride: enablePolicyOverride,
KubeClientset: k8sClient,
ArgoDB: argoCDDB,
ArgoCDNamespace: namespace,
ApplicationSetNamespaces: applicationSetNamespaces,
EnableProgressiveSyncs: enableProgressiveSyncs,
SCMRootCAPath: scmRootCAPath,
GlobalPreservedAnnotations: globalPreservedAnnotations,
GlobalPreservedLabels: globalPreservedLabels,
Metrics: &metrics,
MaxResourcesStatusCount: maxResourcesStatusCount,
Generators: topLevelGenerators,
Client: utils.NewCacheSyncingClient(mgr.GetClient(), mgr.GetCache()),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("applicationset-controller"),
Renderer: &utils.Render{},
Policy: policyObj,
EnablePolicyOverride: enablePolicyOverride,
KubeClientset: k8sClient,
ArgoDB: argoCDDB,
ArgoCDNamespace: namespace,
ApplicationSetNamespaces: applicationSetNamespaces,
EnableProgressiveSyncs: enableProgressiveSyncs,
SCMRootCAPath: scmRootCAPath,
GlobalPreservedAnnotations: globalPreservedAnnotations,
GlobalPreservedLabels: globalPreservedLabels,
Metrics: &metrics,
MaxResourcesStatusCount: maxResourcesStatusCount,
ClusterInformer: clusterInformer,
ConcurrentApplicationUpdates: concurrentApplicationUpdates,
}).SetupWithManager(mgr, enableProgressiveSyncs, maxConcurrentReconciliations); err != nil {
log.Error(err, "unable to create controller", "controller", "ApplicationSet")
os.Exit(1)
@ -292,7 +303,9 @@ func NewCommand() *cobra.Command {
command.Flags().IntVar(&webhookParallelism, "webhook-parallelism-limit", env.ParseNumFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_WEBHOOK_PARALLELISM_LIMIT", 50, 1, 1000), "Number of webhook requests processed concurrently")
command.Flags().StringSliceVar(&metricsAplicationsetLabels, "metrics-applicationset-labels", []string{}, "List of Application labels that will be added to the argocd_applicationset_labels metric")
command.Flags().BoolVar(&enableGitHubAPIMetrics, "enable-github-api-metrics", env.ParseBoolFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_GITHUB_API_METRICS", false), "Enable GitHub API metrics for generators that use the GitHub API")
command.Flags().IntVar(&maxResourcesStatusCount, "max-resources-status-count", env.ParseNumFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_MAX_RESOURCES_STATUS_COUNT", 0, 0, math.MaxInt), "Max number of resources stored in appset status.")
command.Flags().IntVar(&maxResourcesStatusCount, "max-resources-status-count", env.ParseNumFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_MAX_RESOURCES_STATUS_COUNT", 5000, 0, math.MaxInt), "Max number of resources stored in appset status.")
command.Flags().DurationVar(&cacheSyncPeriod, "cache-sync-period", env.ParseDurationFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_CACHE_SYNC_PERIOD", time.Hour*10, 0, time.Hour*24), "Period at which the manager client cache is forcefully resynced with the Kubernetes API server. 0 disables periodic resync.")
command.Flags().IntVar(&concurrentApplicationUpdates, "concurrent-application-updates", env.ParseNumFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_CONCURRENT_APPLICATION_UPDATES", 1, 1, 200), "Number of concurrent Application create/update/delete operations per ApplicationSet reconcile.")
return &command
}

View file

@ -0,0 +1,28 @@
package command
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewCommand_ConcurrentApplicationUpdatesFlag(t *testing.T) {
cmd := NewCommand()
flag := cmd.Flags().Lookup("concurrent-application-updates")
require.NotNil(t, flag, "expected --concurrent-application-updates flag to be registered")
assert.Equal(t, "int", flag.Value.Type())
assert.Equal(t, "1", flag.DefValue, "default should be 1")
}
func TestNewCommand_ConcurrentApplicationUpdatesFlagValue(t *testing.T) {
cmd := NewCommand()
err := cmd.Flags().Set("concurrent-application-updates", "5")
require.NoError(t, err)
val, err := cmd.Flags().GetInt("concurrent-application-updates")
require.NoError(t, err)
assert.Equal(t, 5, val)
}

View file

@ -18,11 +18,6 @@ import (
traceutil "github.com/argoproj/argo-cd/v3/util/trace"
)
const (
// CLIName is the name of the CLI
cliName = "argocd-cmp-server"
)
func NewCommand() *cobra.Command {
var (
configFilePath string
@ -32,7 +27,7 @@ func NewCommand() *cobra.Command {
otlpAttrs []string
)
command := cobra.Command{
Use: cliName,
Use: common.CommandCMPServer,
Short: "Run ArgoCD ConfigManagementPlugin Server",
Long: "ArgoCD ConfigManagementPlugin Server is an internal service which runs as sidecar container in reposerver deployment. The following configuration options are available:",
DisableAutoGenTag: true,

View file

@ -35,7 +35,7 @@ func NewCommand() *cobra.Command {
metricsHost string
)
command := &cobra.Command{
Use: "argocd-commit-server",
Use: common.CommandCommitServer,
Short: "Run Argo CD Commit Server",
Long: "Argo CD Commit Server is an internal service which commits and pushes hydrated manifests to git. This command runs Commit Server in the foreground.",
RunE: func(cmd *cobra.Command, _ []string) error {
@ -91,13 +91,11 @@ func NewCommand() *cobra.Command {
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM)
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
wg.Go(func() {
s := <-sigCh
log.Printf("got signal %v, attempting graceful shutdown", s)
grpc.GracefulStop()
wg.Done()
}()
})
log.Println("starting grpc server")
err = grpc.Serve(listener)

View file

@ -25,13 +25,9 @@ import (
"github.com/argoproj/argo-cd/v3/util/tls"
)
const (
cliName = "argocd-dex"
)
func NewCommand() *cobra.Command {
command := &cobra.Command{
Use: cliName,
Use: common.CommandDex,
Short: "argocd-dex tools used by Argo CD",
Long: "argocd-dex has internal utility tools used by Argo CD",
DisableAutoGenTag: true,

View file

@ -9,20 +9,16 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"github.com/argoproj/argo-cd/v3/common"
"github.com/argoproj/argo-cd/v3/util/askpass"
"github.com/argoproj/argo-cd/v3/util/errors"
grpc_util "github.com/argoproj/argo-cd/v3/util/grpc"
utilio "github.com/argoproj/argo-cd/v3/util/io"
)
const (
// cliName is the name of the CLI
cliName = "argocd-git-ask-pass"
)
func NewCommand() *cobra.Command {
command := cobra.Command{
Use: cliName,
Use: common.CommandGitAskPass,
Short: "Argo CD git credential helper",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, _ []string) {

View file

@ -2,15 +2,13 @@ package commands
import (
"github.com/spf13/cobra"
)
const (
cliName = "argocd-k8s-auth"
"github.com/argoproj/argo-cd/v3/common"
)
func NewCommand() *cobra.Command {
command := &cobra.Command{
Use: cliName,
Use: common.CommandK8sAuth,
Short: "argocd-k8s-auth a set of commands to generate k8s auth token",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {

View file

@ -6,12 +6,14 @@ import (
"encoding/json"
"fmt"
"os"
"strconv"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
"github.com/aws/aws-sdk-go-v2/service/sts"
smithyhttp "github.com/aws/smithy-go/transport/http"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clientauthv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1"
@ -58,13 +60,13 @@ func newAWSCommand() *cobra.Command {
return command
}
type getSignedRequestFunc func(clusterName, roleARN string, profile string) (string, error)
type getSignedRequestFunc func(ctx context.Context, clusterName, roleARN string, profile string) (string, error)
func getSignedRequestWithRetry(ctx context.Context, timeout, interval time.Duration, clusterName, roleARN string, profile string, fn getSignedRequestFunc) (string, error) {
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
for {
signed, err := fn(clusterName, roleARN, profile)
signed, err := fn(ctx, clusterName, roleARN, profile)
if err == nil {
return signed, nil
}
@ -76,25 +78,53 @@ func getSignedRequestWithRetry(ctx context.Context, timeout, interval time.Durat
}
}
func getSignedRequest(clusterName, roleARN string, profile string) (string, error) {
sess, err := session.NewSessionWithOptions(session.Options{
Profile: profile,
})
func getSignedRequest(ctx context.Context, clusterName, roleARN string, profile string) (string, error) {
cfg, err := loadAWSConfig(ctx, profile)
if err != nil {
return "", fmt.Errorf("error creating new AWS session: %w", err)
return "", err
}
stsAPI := sts.New(sess)
return getSignedRequestWithConfig(ctx, clusterName, roleARN, cfg)
}
func loadAWSConfig(ctx context.Context, profile string) (aws.Config, error) {
var opts []func(*config.LoadOptions) error
if profile != "" {
opts = append(opts, config.WithSharedConfigProfile(profile))
}
cfg, err := config.LoadDefaultConfig(ctx, opts...)
if err != nil {
return aws.Config{}, fmt.Errorf("error loading AWS configuration: %w", err)
}
return cfg, nil
}
// getSignedRequestWithConfig presigns GetCallerIdentity using the given config. Used by getSignedRequest and by tests
// that inject a config with static credentials to exercise the roleARN path without real AWS credentials.
func getSignedRequestWithConfig(ctx context.Context, clusterName, roleARN string, cfg aws.Config) (string, error) {
// Use PresignOptions.ClientOptions + SetHeaderValue (same as aws-iam-authenticator) so the
// canonical request matches what EKS sends when validating. Build middleware can produce
// a different canonical form and thus an invalid signature for EKS.
// See kubernetes-sigs/aws-iam-authenticator pkg/token/token.go GetWithSTS().
client := sts.NewFromConfig(cfg)
if roleARN != "" {
creds := stscreds.NewCredentials(sess, roleARN)
stsAPI = sts.New(sess, &aws.Config{Credentials: creds})
appCreds := stscreds.NewAssumeRoleProvider(client, roleARN)
cfg.Credentials = aws.NewCredentialsCache(appCreds)
client = sts.NewFromConfig(cfg)
}
request, _ := stsAPI.GetCallerIdentityRequest(&sts.GetCallerIdentityInput{})
request.HTTPRequest.Header.Add(clusterIDHeader, clusterName)
signed, err := request.Presign(requestPresignParam)
presignClient := sts.NewPresignClient(client)
presigned, err := presignClient.PresignGetCallerIdentity(ctx, &sts.GetCallerIdentityInput{},
func(presignOptions *sts.PresignOptions) {
presignOptions.ClientOptions = append(presignOptions.ClientOptions, func(stsOptions *sts.Options) {
stsOptions.APIOptions = append(stsOptions.APIOptions,
smithyhttp.SetHeaderValue(clusterIDHeader, clusterName),
smithyhttp.SetHeaderValue("X-Amz-Expires", strconv.Itoa(requestPresignParam)))
})
})
if err != nil {
return "", fmt.Errorf("error presigning AWS request: %w", err)
}
return signed, nil
return presigned.URL, nil
}
func formatJSON(token string, expiration time.Time) string {

View file

@ -1,14 +1,60 @@
package commands
import (
"context"
"errors"
"testing"
"time"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetSignedRequest(t *testing.T) {
t.Parallel()
t.Run("returns error when context is cancelled", func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
cancel()
url, err := getSignedRequest(ctx, "my-cluster", "", "")
require.ErrorIs(t, err, context.Canceled)
assert.Empty(t, url)
})
t.Run("returns error for non-existent profile", func(t *testing.T) {
t.Parallel()
ctx := context.Background()
profile := "argocd-k8s-auth-test-nonexistent-profile-12345"
url, err := getSignedRequest(ctx, "my-cluster", "", profile)
require.Error(t, err)
assert.Empty(t, url)
assert.Contains(t, err.Error(), "configuration", "error should mention configuration load failed")
})
t.Run("returns error when roleARN is provided and assume role fails", func(t *testing.T) {
t.Parallel()
ctx := context.Background()
cfg, err := config.LoadDefaultConfig(ctx,
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("test", "test", "")),
config.WithRegion("us-east-1"),
)
require.NoError(t, err)
url, err := getSignedRequestWithConfig(ctx, "my-cluster", "arn:aws:iam::123456789012:role/NonExistentRole", cfg)
require.Error(t, err)
assert.Empty(t, url)
assert.Contains(t, err.Error(), "presigning", "error should mention presigning failed when assume role is used")
})
}
func TestGetSignedRequestWithRetry(t *testing.T) {
t.Parallel()
@ -72,7 +118,7 @@ type signedRequestMock struct {
returnFunc func(m *signedRequestMock) (string, error)
}
func (m *signedRequestMock) getSignedRequestMock(_, _ string, _ string) (string, error) {
func (m *signedRequestMock) getSignedRequestMock(_ context.Context, _, _ string, _ string) (string, error) {
m.getSignedRequestCalls++
return m.returnFunc(m)
}

Some files were not shown because too many files have changed in this diff Show more