fix: truncate labels for deletion hook resources#27542
Conversation
Signed-off-by: choejwoo <jaewoo45@gmail.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
There was a problem hiding this comment.
Pull request overview
Fixes Application deletion hooks getting rejected by Kubernetes when app instance labels exceed the 63-character label-value limit by ensuring hook resources use the same resource-tracking path (and truncation behavior) as normal synced resources.
Changes:
- Extracted label truncation logic into a reusable
TruncateLabelhelper and added unit tests for it. - Updated deletion hook creation to apply tracking metadata via
ResourceTracking.SetAppInstance, honoring the configured tracking method. - Added a controller regression test for long application names during PreDelete hook creation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
util/argo/resource_tracking.go |
Introduces TruncateLabel and refactors SetAppInstance to reuse it for annotation+label tracking. |
util/argo/resource_tracking_test.go |
Adds direct unit tests for TruncateLabel. |
controller/hook.go |
Routes hook resources through ResourceTracking.SetAppInstance using configured tracking method + installation ID. |
controller/appcontroller_test.go |
Adds a regression test for long app names when creating PreDelete hooks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: choejwoo <jaewoo45@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #27542 +/- ##
=======================================
Coverage 63.51% 63.52%
=======================================
Files 417 417
Lines 57102 57112 +10
=======================================
+ Hits 36269 36280 +11
+ Misses 17431 17426 -5
- Partials 3402 3406 +4 ☔ View full report in Codecov by Sentry. |
ppapapetrou76
left a comment
There was a problem hiding this comment.
The code looks good to me and I like the way the Truncate function sets the caller expectations ( it doesn't trim short values for instance )
Do you think we can add the following unit test?
PostDelete for a long name just like PreDelete_HookIsCreatedForLongAppName
Signed-off-by: choejwoo <jaewoo45@gmail.com>
|
Thanks for the review! I've added a unit test for |
ppapapetrou76
left a comment
There was a problem hiding this comment.
LGTM 🏅 - thanks for addressing my comments
|
Anything blocking this from getting merged? |
Signed-off-by: choejwoo <jaewoo45@gmail.com>
|
Hello, would it be possible to cherry pick this for 3.3 and 3.4? |
|
🍒 Cherry-pick PR created for 3.4: #27714 |
|
❌ Cherry-pick failed for 3.3. Please check the workflow logs for details. |
…for 3.4) (#27714) Signed-off-by: choejwoo <jaewoo45@gmail.com> Co-authored-by: Jaewoo Choi <jaewoo45@gmail.com>
…for 3.3) (#27715) Signed-off-by: choejwoo <jaewoo45@gmail.com>
##### [\`v3.3.11\`](https://github.com/argoproj/argo-cd/releases/tag/v3.3.11) ##### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.3.11/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.3.11/manifests/ha/install.yaml ``` ##### Release Signatures and Provenance All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify. ##### Release Notes Blog Post For a detailed breakdown of the key changes and improvements in this release, check out the [official blog post](https://blog.argoproj.io/argo-cd-v3-0-release-candidate-a0b933f4e58f) ##### Upgrading If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation. ##### Changelog ##### Bug fixes - [`cd3b64d`](argoproj/argo-cd@cd3b64d): fix(lint): unnecessary nesting (cherry-pick [#27815](argoproj/argo-cd#27815) for 3.3) ([#27818](argoproj/argo-cd#27818)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`82dd8ce`](argoproj/argo-cd@82dd8ce): fix(ui): don't prefetch errors ([#27877](argoproj/argo-cd#27877)) (cherry-pick [#27925](argoproj/argo-cd#27925) for 3.3) ([#28023](argoproj/argo-cd#28023)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`da10473`](argoproj/argo-cd@da10473): fix: nil-check (cherry-pick [#28039](argoproj/argo-cd#28039) for 3.3) ([#28041](argoproj/argo-cd#28041)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`d556067`](argoproj/argo-cd@d556067): fix: prevent InvalidSpecError race in application controller startup (cherry-pick [#27672](argoproj/argo-cd#27672) for 3.3) ([#27844](argoproj/argo-cd#27844)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`21d5538`](argoproj/argo-cd@21d5538): fix: remove resourceVersion from ssd ([#27406](argoproj/argo-cd#27406)) (cherry-pick release-3.3) ([#28016](argoproj/argo-cd#28016)) ([@blakepettersson](https://github.com/blakepettersson)) - [`120eb31`](argoproj/argo-cd@120eb31): fix: truncate labels for deletion hook resources (cherry-pick [#27542](argoproj/argo-cd#27542) for 3.3) ([#27715](argoproj/argo-cd#27715)) ([@choejwoo](https://github.com/choejwoo)) ##### Dependency updates - [`1cb5892`](argoproj/argo-cd@1cb5892): chore(deps): bump redoc/dompurify to v3.4.0 in /ui for fixing CVE-2026-41240(cherry-pick 3.3) ([#27912](argoproj/argo-cd#27912)) ([@alkakumari016](https://github.com/alkakumari016)) ##### Other work - [`9e25303`](argoproj/argo-cd@9e25303): fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation() (cherry-pick [#27749](argoproj/argo-cd#27749) for 3.3) ([#28032](argoproj/argo-cd#28032)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) **Full Changelog**: <argoproj/argo-cd@v3.3.10...v3.3.11> <a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/master/content/pages/cd/gitops-cd.png" width="25%" ></a>
##### [\`v3.3.11\`](https://github.com/argoproj/argo-cd/releases/tag/v3.3.11) ##### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.3.11/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.3.11/manifests/ha/install.yaml ``` ##### Release Signatures and Provenance All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify. ##### Release Notes Blog Post For a detailed breakdown of the key changes and improvements in this release, check out the [official blog post](https://blog.argoproj.io/argo-cd-v3-0-release-candidate-a0b933f4e58f) ##### Upgrading If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation. ##### Changelog ##### Bug fixes - [`cd3b64d`](argoproj/argo-cd@cd3b64d): fix(lint): unnecessary nesting (cherry-pick [#27815](argoproj/argo-cd#27815) for 3.3) ([#27818](argoproj/argo-cd#27818)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`82dd8ce`](argoproj/argo-cd@82dd8ce): fix(ui): don't prefetch errors ([#27877](argoproj/argo-cd#27877)) (cherry-pick [#27925](argoproj/argo-cd#27925) for 3.3) ([#28023](argoproj/argo-cd#28023)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`da10473`](argoproj/argo-cd@da10473): fix: nil-check (cherry-pick [#28039](argoproj/argo-cd#28039) for 3.3) ([#28041](argoproj/argo-cd#28041)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`d556067`](argoproj/argo-cd@d556067): fix: prevent InvalidSpecError race in application controller startup (cherry-pick [#27672](argoproj/argo-cd#27672) for 3.3) ([#27844](argoproj/argo-cd#27844)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`21d5538`](argoproj/argo-cd@21d5538): fix: remove resourceVersion from ssd ([#27406](argoproj/argo-cd#27406)) (cherry-pick release-3.3) ([#28016](argoproj/argo-cd#28016)) ([@blakepettersson](https://github.com/blakepettersson)) - [`120eb31`](argoproj/argo-cd@120eb31): fix: truncate labels for deletion hook resources (cherry-pick [#27542](argoproj/argo-cd#27542) for 3.3) ([#27715](argoproj/argo-cd#27715)) ([@choejwoo](https://github.com/choejwoo)) ##### Dependency updates - [`1cb5892`](argoproj/argo-cd@1cb5892): chore(deps): bump redoc/dompurify to v3.4.0 in /ui for fixing CVE-2026-41240(cherry-pick 3.3) ([#27912](argoproj/argo-cd#27912)) ([@alkakumari016](https://github.com/alkakumari016)) ##### Other work - [`9e25303`](argoproj/argo-cd@9e25303): fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation() (cherry-pick [#27749](argoproj/argo-cd#27749) for 3.3) ([#28032](argoproj/argo-cd#28032)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) **Full Changelog**: <argoproj/argo-cd@v3.3.10...v3.3.11> <a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/master/content/pages/cd/gitops-cd.png" width="25%" ></a>
##### [\`v3.4.3\`](https://github.com/argoproj/argo-cd/releases/tag/v3.4.3) ##### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/ha/install.yaml ``` ##### Release Signatures and Provenance All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify. ##### Release Notes Blog Post For a detailed breakdown of the key changes and improvements in this release, check out the [official blog post](https://blog.argoproj.io/argo-cd-v3-0-release-candidate-a0b933f4e58f) ##### Upgrading If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation. ##### Changelog ##### Bug fixes - [`f435b0f`](argoproj/argo-cd@f435b0f) fix(cli): return immediately from 'app wait' when app is already in desired state ([#12211](argoproj/argo-cd#12211)) ([#27503](argoproj/argo-cd#27503)) ([#27713](argoproj/argo-cd#27713)) (jheyduk) - [`b39fe4f`](argoproj/argo-cd@b39fe4f) fix(lint): unnecessary nesting (cherry-pick [#27815](argoproj/argo-cd#27815) for 3.4) ([#27817](argoproj/argo-cd#27817)) (argo-cd-cherry-pick-bot\[bot], Michael Crenshaw) - [`668f2c5`](argoproj/argo-cd@668f2c5) fix(ui): don't prefetch errors ([#27877](argoproj/argo-cd#27877)) (cherry-pick [#27925](argoproj/argo-cd#27925) for 3.4) ([#28024](argoproj/argo-cd#28024)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson) - [`b796979`](argoproj/argo-cd@b796979) fix(ui): return full source for non-hydrator apps in Parameters tab (cherry-pick [#26946](argoproj/argo-cd#26946) for 3.4) ([#27964](argoproj/argo-cd#27964)) (Gabriel Barreto, himeshp) - [`5d3f8a0`](argoproj/argo-cd@5d3f8a0) fix: honor repo depth setting in gitSourceHasChanges and fetch functions (cherry-pick [#27838](argoproj/argo-cd#27838) for 3.4) ([#28043](argoproj/argo-cd#28043)) (argo-cd-cherry-pick-bot\[bot], alexandresavicki, Cursor) - [`35ed877`](argoproj/argo-cd@35ed877) fix: nil-check (cherry-pick [#28039](argoproj/argo-cd#28039) for 3.4) ([#28040](argoproj/argo-cd#28040)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson, Soumya Ghosh Dastidar) - [`b0f1553`](argoproj/argo-cd@b0f1553) fix: prevent InvalidSpecError race in application controller startup (cherry-pick [#27672](argoproj/argo-cd#27672) for 3.4) ([#27845](argoproj/argo-cd#27845)) (argo-cd-cherry-pick-bot\[bot], Michele Baldessari) - [`4fa0950`](argoproj/argo-cd@4fa0950) fix: truncate labels for deletion hook resources (cherry-pick [#27542](argoproj/argo-cd#27542) for 3.4) ([#27714](argoproj/argo-cd#27714)) (argo-cd-cherry-pick-bot\[bot], Jaewoo Choi) ##### Dependency updates - [`0edd404`](argoproj/argo-cd@0edd404) chore(deps): bump redoc/dompurify to v3.4.0 in /ui for fixing CVE-2026-41240(cherry-pick 3.4) ([#27913](argoproj/argo-cd#27913)) (Alka Kumari) ##### Other work - [`ce55c85`](argoproj/argo-cd@ce55c85) fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation() (cherry-pick [#27749](argoproj/argo-cd#27749) for 3.4) ([#28031](argoproj/argo-cd#28031)) (argo-cd-cherry-pick-bot\[bot], Pierre Guinoiseau) **Full Changelog**: <argoproj/argo-cd@v3.4.2...v3.4.3> <a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/master/content/pages/cd/gitops-cd.png" width="25%" ></a>
##### [\`v3.4.3\`](https://github.com/argoproj/argo-cd/releases/tag/v3.4.3) ##### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/ha/install.yaml ``` ##### Release Signatures and Provenance All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify. ##### Release Notes Blog Post For a detailed breakdown of the key changes and improvements in this release, check out the [official blog post](https://blog.argoproj.io/argo-cd-v3-0-release-candidate-a0b933f4e58f) ##### Upgrading If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation. ##### Changelog ##### Bug fixes - [`f435b0f`](argoproj/argo-cd@f435b0f) fix(cli): return immediately from 'app wait' when app is already in desired state ([#12211](argoproj/argo-cd#12211)) ([#27503](argoproj/argo-cd#27503)) ([#27713](argoproj/argo-cd#27713)) (jheyduk) - [`b39fe4f`](argoproj/argo-cd@b39fe4f) fix(lint): unnecessary nesting (cherry-pick [#27815](argoproj/argo-cd#27815) for 3.4) ([#27817](argoproj/argo-cd#27817)) (argo-cd-cherry-pick-bot\[bot], Michael Crenshaw) - [`668f2c5`](argoproj/argo-cd@668f2c5) fix(ui): don't prefetch errors ([#27877](argoproj/argo-cd#27877)) (cherry-pick [#27925](argoproj/argo-cd#27925) for 3.4) ([#28024](argoproj/argo-cd#28024)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson) - [`b796979`](argoproj/argo-cd@b796979) fix(ui): return full source for non-hydrator apps in Parameters tab (cherry-pick [#26946](argoproj/argo-cd#26946) for 3.4) ([#27964](argoproj/argo-cd#27964)) (Gabriel Barreto, himeshp) - [`5d3f8a0`](argoproj/argo-cd@5d3f8a0) fix: honor repo depth setting in gitSourceHasChanges and fetch functions (cherry-pick [#27838](argoproj/argo-cd#27838) for 3.4) ([#28043](argoproj/argo-cd#28043)) (argo-cd-cherry-pick-bot\[bot], alexandresavicki, Cursor) - [`35ed877`](argoproj/argo-cd@35ed877) fix: nil-check (cherry-pick [#28039](argoproj/argo-cd#28039) for 3.4) ([#28040](argoproj/argo-cd#28040)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson, Soumya Ghosh Dastidar) - [`b0f1553`](argoproj/argo-cd@b0f1553) fix: prevent InvalidSpecError race in application controller startup (cherry-pick [#27672](argoproj/argo-cd#27672) for 3.4) ([#27845](argoproj/argo-cd#27845)) (argo-cd-cherry-pick-bot\[bot], Michele Baldessari) - [`4fa0950`](argoproj/argo-cd@4fa0950) fix: truncate labels for deletion hook resources (cherry-pick [#27542](argoproj/argo-cd#27542) for 3.4) ([#27714](argoproj/argo-cd#27714)) (argo-cd-cherry-pick-bot\[bot], Jaewoo Choi) ##### Dependency updates - [`0edd404`](argoproj/argo-cd@0edd404) chore(deps): bump redoc/dompurify to v3.4.0 in /ui for fixing CVE-2026-41240(cherry-pick 3.4) ([#27913](argoproj/argo-cd#27913)) (Alka Kumari) ##### Other work - [`ce55c85`](argoproj/argo-cd@ce55c85) fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation() (cherry-pick [#27749](argoproj/argo-cd#27749) for 3.4) ([#28031](argoproj/argo-cd#28031)) (argo-cd-cherry-pick-bot\[bot], Pierre Guinoiseau) **Full Changelog**: <argoproj/argo-cd@v3.4.2...v3.4.3> <a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/master/content/pages/cd/gitops-cd.png" width="25%" ></a>
##### [\`v3.4.3\`](https://github.com/argoproj/argo-cd/releases/tag/v3.4.3) ##### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/ha/install.yaml ``` ##### Release Signatures and Provenance All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify. ##### Release Notes Blog Post For a detailed breakdown of the key changes and improvements in this release, check out the [official blog post](https://blog.argoproj.io/argo-cd-v3-0-release-candidate-a0b933f4e58f) ##### Upgrading If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation. ##### Changelog ##### Bug fixes - [`f435b0f`](argoproj/argo-cd@f435b0f) fix(cli): return immediately from 'app wait' when app is already in desired state ([#12211](argoproj/argo-cd#12211)) ([#27503](argoproj/argo-cd#27503)) ([#27713](argoproj/argo-cd#27713)) (jheyduk) - [`b39fe4f`](argoproj/argo-cd@b39fe4f) fix(lint): unnecessary nesting (cherry-pick [#27815](argoproj/argo-cd#27815) for 3.4) ([#27817](argoproj/argo-cd#27817)) (argo-cd-cherry-pick-bot\[bot], Michael Crenshaw) - [`668f2c5`](argoproj/argo-cd@668f2c5) fix(ui): don't prefetch errors ([#27877](argoproj/argo-cd#27877)) (cherry-pick [#27925](argoproj/argo-cd#27925) for 3.4) ([#28024](argoproj/argo-cd#28024)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson) - [`b796979`](argoproj/argo-cd@b796979) fix(ui): return full source for non-hydrator apps in Parameters tab (cherry-pick [#26946](argoproj/argo-cd#26946) for 3.4) ([#27964](argoproj/argo-cd#27964)) (Gabriel Barreto, himeshp) - [`5d3f8a0`](argoproj/argo-cd@5d3f8a0) fix: honor repo depth setting in gitSourceHasChanges and fetch functions (cherry-pick [#27838](argoproj/argo-cd#27838) for 3.4) ([#28043](argoproj/argo-cd#28043)) (argo-cd-cherry-pick-bot\[bot], alexandresavicki, Cursor) - [`35ed877`](argoproj/argo-cd@35ed877) fix: nil-check (cherry-pick [#28039](argoproj/argo-cd#28039) for 3.4) ([#28040](argoproj/argo-cd#28040)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson, Soumya Ghosh Dastidar) - [`b0f1553`](argoproj/argo-cd@b0f1553) fix: prevent InvalidSpecError race in application controller startup (cherry-pick [#27672](argoproj/argo-cd#27672) for 3.4) ([#27845](argoproj/argo-cd#27845)) (argo-cd-cherry-pick-bot\[bot], Michele Baldessari) - [`4fa0950`](argoproj/argo-cd@4fa0950) fix: truncate labels for deletion hook resources (cherry-pick [#27542](argoproj/argo-cd#27542) for 3.4) ([#27714](argoproj/argo-cd#27714)) (argo-cd-cherry-pick-bot\[bot], Jaewoo Choi) ##### Dependency updates - [`0edd404`](argoproj/argo-cd@0edd404) chore(deps): bump redoc/dompurify to v3.4.0 in /ui for fixing CVE-2026-41240(cherry-pick 3.4) ([#27913](argoproj/argo-cd#27913)) (Alka Kumari) ##### Other work - [`ce55c85`](argoproj/argo-cd@ce55c85) fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation() (cherry-pick [#27749](argoproj/argo-cd#27749) for 3.4) ([#28031](argoproj/argo-cd#28031)) (argo-cd-cherry-pick-bot\[bot], Pierre Guinoiseau) **Full Changelog**: <argoproj/argo-cd@v3.4.2...v3.4.3> <a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/master/content/pages/cd/gitops-cd.png" width="25%" ></a>
##### [\`v3.4.3\`](https://github.com/argoproj/argo-cd/releases/tag/v3.4.3) ##### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/ha/install.yaml ``` ##### Release Signatures and Provenance All Argo CD container images are signed by cosign. A Provenance is generated for container images and CLI binaries which meet the SLSA Level 3 specifications. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets) on how to verify. ##### Release Notes Blog Post For a detailed breakdown of the key changes and improvements in this release, check out the [official blog post](https://blog.argoproj.io/argo-cd-v3-0-release-candidate-a0b933f4e58f) ##### Upgrading If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation. ##### Changelog ##### Bug fixes - [`f435b0f`](argoproj/argo-cd@f435b0f) fix(cli): return immediately from 'app wait' when app is already in desired state ([#12211](argoproj/argo-cd#12211)) ([#27503](argoproj/argo-cd#27503)) ([#27713](argoproj/argo-cd#27713)) (jheyduk) - [`b39fe4f`](argoproj/argo-cd@b39fe4f) fix(lint): unnecessary nesting (cherry-pick [#27815](argoproj/argo-cd#27815) for 3.4) ([#27817](argoproj/argo-cd#27817)) (argo-cd-cherry-pick-bot\[bot], Michael Crenshaw) - [`668f2c5`](argoproj/argo-cd@668f2c5) fix(ui): don't prefetch errors ([#27877](argoproj/argo-cd#27877)) (cherry-pick [#27925](argoproj/argo-cd#27925) for 3.4) ([#28024](argoproj/argo-cd#28024)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson) - [`b796979`](argoproj/argo-cd@b796979) fix(ui): return full source for non-hydrator apps in Parameters tab (cherry-pick [#26946](argoproj/argo-cd#26946) for 3.4) ([#27964](argoproj/argo-cd#27964)) (Gabriel Barreto, himeshp) - [`5d3f8a0`](argoproj/argo-cd@5d3f8a0) fix: honor repo depth setting in gitSourceHasChanges and fetch functions (cherry-pick [#27838](argoproj/argo-cd#27838) for 3.4) ([#28043](argoproj/argo-cd#28043)) (argo-cd-cherry-pick-bot\[bot], alexandresavicki, Cursor) - [`35ed877`](argoproj/argo-cd@35ed877) fix: nil-check (cherry-pick [#28039](argoproj/argo-cd#28039) for 3.4) ([#28040](argoproj/argo-cd#28040)) (argo-cd-cherry-pick-bot\[bot], Blake Pettersson, Soumya Ghosh Dastidar) - [`b0f1553`](argoproj/argo-cd@b0f1553) fix: prevent InvalidSpecError race in application controller startup (cherry-pick [#27672](argoproj/argo-cd#27672) for 3.4) ([#27845](argoproj/argo-cd#27845)) (argo-cd-cherry-pick-bot\[bot], Michele Baldessari) - [`4fa0950`](argoproj/argo-cd@4fa0950) fix: truncate labels for deletion hook resources (cherry-pick [#27542](argoproj/argo-cd#27542) for 3.4) ([#27714](argoproj/argo-cd#27714)) (argo-cd-cherry-pick-bot\[bot], Jaewoo Choi) ##### Dependency updates - [`0edd404`](argoproj/argo-cd@0edd404) chore(deps): bump redoc/dompurify to v3.4.0 in /ui for fixing CVE-2026-41240(cherry-pick 3.4) ([#27913](argoproj/argo-cd#27913)) (Alka Kumari) ##### Other work - [`ce55c85`](argoproj/argo-cd@ce55c85) fix(gitops-engine): fix nil pointer dereference error in removeWebookMutation() (cherry-pick [#27749](argoproj/argo-cd#27749) for 3.4) ([#28031](argoproj/argo-cd#28031)) (argo-cd-cherry-pick-bot\[bot], Pierre Guinoiseau) **Full Changelog**: <argoproj/argo-cd@v3.4.2...v3.4.3> <a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/master/content/pages/cd/gitops-cd.png" width="25%" ></a>
Closes #27527
While reproducing the issue locally I found that the missing label truncation is not specific to
PreDelete,PostDeletehooks and applications that declare both hook types together hit the exact same failure as soon as the Application name exceeds 63 characters. In every one of those cases the Application gets stuck inTerminatingbecause Kubernetes rejects the hook resource with error like below.The fix routes hook resources through
ResourceTracking.SetAppInstance, so they follow the same path as regularly synced resources. The truncation logic was extracted intoTruncateLabelhelper. The label value is clamped to 63 characters and the full Application name is preserved in theargocd.argoproj.io/tracking-idannotation.2026-04-26.2.53.27.mov
The legacy
label-only mode is left unchanged on purpose #18237.Applications with names of 63 characters or fewer, and applications without deletion hooks, are unaffected.
Checklist: