fix(hydrator): use refresh paths from drySource when source hydration is enabled#25516
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
|
I'll override DCO if it becomes a huge pain to fix. :-) |
3c63671 to
b1d4286
Compare
I rebased on upstream and just cherry picked @pbhatnagar-oss's commits |
agaudreault
left a comment
There was a problem hiding this comment.
I think after GetAppRefreshPaths is changed to receive the source in parameters, the implementation of the webhook handle event is much simpler.
if the app has an hydrator source configured, check the DrySource for change.
then, check the default source for change.
0eade53 to
0029f3b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #25516 +/- ##
==========================================
+ Coverage 62.61% 62.65% +0.04%
==========================================
Files 353 353
Lines 50159 50181 +22
==========================================
+ Hits 31405 31440 +35
+ Misses 15737 15721 -16
- Partials 3017 3020 +3 ☔ View full report in Codecov by Sentry. |
util/app/path/path.go
Outdated
| // The source parameter influences the returned refresh paths: | ||
| // - if source hydrator configured AND source is syncSource: use sync source path (ignores annotation) | ||
| // - if source hydrator configured AND source is drySource WITH annotation: use annotation paths with drySource base | ||
| // - if source hydrator configured AND source is drySource WITHOUT annotation: use dry source path |
There was a problem hiding this comment.
This should not be done. Should be empty if no annotation (same as normal source) since we cannot de assumptions on the users repository structure.
There was a problem hiding this comment.
ah, ok. I will update
There was a problem hiding this comment.
| // - if source hydrator configured AND source is drySource WITHOUT annotation: use dry source path | |
| // - if source hydrator configured AND source is drySource WITHOUT annotation: return empty slice (we can't make assumptions about the repo structure) |
There was a problem hiding this comment.
Looking at the code, I don't think the corresponding change was pushed
… is enabled Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
…r is enabled Signed-off-by: pbhatnagar-oss <pbhatifiwork@gmail.com>
Signed-off-by: pbhatnagar-oss <pbhatifiwork@gmail.com>
41c1729 to
2038e9f
Compare
5c19cd7 to
4ed9ec2
Compare
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
86239b2 to
0376a4e
Compare
…e, multi-source, and hydrator refresh configurations, remove redundant tests Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
0376a4e to
1981dc8
Compare
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
|
❌ Cherry-pick failed for 3.1. Please check the workflow logs for details. |
|
❌ Cherry-pick failed for 3.3. Please check the workflow logs for details. |
… 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>
… 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>
|
❌ Cherry-pick failed for 3.2. Please check the workflow logs for details. |
… 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>
|
❌ Cherry-pick failed for 3.0. Please check the workflow logs for details. |
… is enabled (argoproj#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> Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
… is enabled (argoproj#25516) 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> Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
Signed-off-by: pbhatnagar-oss <pbhatifiwork@gmail.com> Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com> Co-authored-by: pbhatnagar-oss <pbhatifiwork@gmail.com> Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
… is enabled (argoproj#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>
… is enabled (argoproj#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>
… is enabled (argoproj#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>
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>
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>
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>
##### [\`v3.2.6\`](https://github.com/argoproj/argo-cd/releases/tag/v3.2.6) #### Quick Start ##### Non-HA: ```shell kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.2.6/manifests/install.yaml ``` ##### HA: ```shell kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.2.6/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 - [`20866f4`](argoproj/argo-cd@20866f4): fix(hydrator): .gitattributes include deeply nested files ([#25870](argoproj/argo-cd#25870)) (cherry-pick [#26011](argoproj/argo-cd#26011) for 3.2) ([#26012](argoproj/argo-cd#26012)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`508da9c`](argoproj/argo-cd@508da9c): fix(hydrator): empty links for failed operation ([#25025](argoproj/argo-cd#25025)) (cherry-pick [#26014](argoproj/argo-cd#26014) for 3.2) ([#26016](argoproj/argo-cd#26016)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`2ff406a`](argoproj/argo-cd@2ff406a): fix: cherry pick [#25516](argoproj/argo-cd#25516) to release-3.2 ([#26115](argoproj/argo-cd#26115)) ([@FourFifthsCode](https://github.com/FourFifthsCode)) - [`e3b108b`](argoproj/argo-cd@e3b108b): fix: close response body on error paths to prevent connection leak (cherry-pick [#25824](argoproj/argo-cd#25824) for 3.2) ([#26006](argoproj/argo-cd#26006)) ([@argo-cd-cherry-pick-bot](https://github.com/argo-cd-cherry-pick-bot)\[bot]) - [`ad117b8`](argoproj/argo-cd@ad117b8): fix: invalid error message on health check failure ([#26040](argoproj/argo-cd#26040)) (cherry pick [#26039](argoproj/argo-cd#26039) for 3.2) ([#26070](argoproj/argo-cd#26070)) ([@dudinea](https://github.com/dudinea)) ##### Dependency updates - [`76fc92f`](argoproj/argo-cd@76fc92f): chore(deps): update notifications-engine to fix GitHub PR comments nil panic (cherry-pick [#26065](argoproj/argo-cd#26065) for 3.2) ([#26074](argoproj/argo-cd#26074)) ([@soutar](https://github.com/soutar)) **Full Changelog**: <argoproj/argo-cd@v3.2.5...v3.2.6> <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>
When using
argocd.argoproj.io/manifest-generate-pathsannotation with source hydrator enabled apps, make sure to base relative paths off of drySource path and not the sync source.This fix allows hydration to properly trigger refreshes on paths specified by manifest-generate-paths annotation and wehbook handling.
Hydration with sourceHydrator:
Standard apps without hydration refresh.
Partial fix for #25094
Checklist: