Skip to content

fix(hydrator): use refresh paths from drySource when source hydration is enabled#25516

Merged
agaudreault merged 8 commits intoargoproj:masterfrom
FourFifthsCode:hydrator-refresh-fix
Jan 22, 2026
Merged

fix(hydrator): use refresh paths from drySource when source hydration is enabled#25516
agaudreault merged 8 commits intoargoproj:masterfrom
FourFifthsCode:hydrator-refresh-fix

Conversation

@FourFifthsCode
Copy link
Contributor

@FourFifthsCode FourFifthsCode commented Dec 4, 2025

When using argocd.argoproj.io/manifest-generate-paths annotation 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:

  • syncSource refresh without hydration
  • drySource refresh with hydration

Standard apps without hydration refresh.

Partial fix for #25094

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@FourFifthsCode FourFifthsCode requested a review from a team as a code owner December 4, 2025 15:21
@bunnyshell
Copy link

bunnyshell bot commented Dec 4, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@crenshaw-dev
Copy link
Member

I'll override DCO if it becomes a huge pain to fix. :-)

@FourFifthsCode
Copy link
Contributor Author

I'll override DCO if it becomes a huge pain to fix. :-)

I rebased on upstream and just cherry picked @pbhatnagar-oss's commits

Copy link
Member

@agaudreault agaudreault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.65%. Comparing base (1dc85e5) to head (2038e9f).

Files with missing lines Patch % Lines
util/webhook/webhook.go 80.00% 2 Missing and 1 partial ⚠️
controller/state.go 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

// 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, ok. I will update

Copy link
Member

@crenshaw-dev crenshaw-dev Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// - 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)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the code, I don't think the corresponding change was pushed

FourFifthsCode and others added 4 commits December 19, 2025 12:25
… 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>
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
@crenshaw-dev crenshaw-dev added component:hydrator Issue related to the Source Hydrator and commit server cherry-pick/3.0 Candidate for cherry picking into the 3.0 release branch cherry-pick/3.1 Candidate for cherry picking into the 3.1 release branch cherry-pick/3.2 Candidate for cherry picking into the 3.2 release branch labels Jan 15, 2026
@FourFifthsCode FourFifthsCode force-pushed the hydrator-refresh-fix branch 3 times, most recently from 86239b2 to 0376a4e Compare January 15, 2026 23:29
…e, multi-source, and hydrator refresh configurations, remove redundant tests

Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
Signed-off-by: Codey Jenkins <FourFifthsCode@users.noreply.github.com>
Copy link
Member

@agaudreault agaudreault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@agaudreault agaudreault enabled auto-merge (squash) January 22, 2026 13:20
@agaudreault agaudreault merged commit e5e00d3 into argoproj:master Jan 22, 2026
39 of 41 checks passed
@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 3.1. Please check the workflow logs for details.

@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 3.3. Please check the workflow logs for details.

argo-cd-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 22, 2026
… 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>
argo-cd-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 22, 2026
… 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>
@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 3.2. Please check the workflow logs for details.

argo-cd-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 22, 2026
… 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>
@argo-cd-cherry-pick-bot
Copy link

❌ Cherry-pick failed for 3.0. Please check the workflow logs for details.

FourFifthsCode added a commit to FourFifthsCode/argo-cd that referenced this pull request Jan 22, 2026
… 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>
FourFifthsCode added a commit to FourFifthsCode/argo-cd that referenced this pull request Jan 22, 2026
… 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>
crenshaw-dev pushed a commit that referenced this pull request Jan 22, 2026
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>
FourFifthsCode added a commit to FourFifthsCode/argo-cd that referenced this pull request Jan 22, 2026
… 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>
FourFifthsCode added a commit to FourFifthsCode/argo-cd that referenced this pull request Jan 22, 2026
… 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>
FourFifthsCode added a commit to FourFifthsCode/argo-cd that referenced this pull request Jan 22, 2026
… 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>
crenshaw-dev pushed a commit that referenced this pull request Jan 22, 2026
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>
crenshaw-dev pushed a commit that referenced this pull request Jan 22, 2026
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>
crenshaw-dev pushed a commit that referenced this pull request Jan 22, 2026
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>
renovate bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Jan 31, 2026
##### [\`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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/3.0 Candidate for cherry picking into the 3.0 release branch cherry-pick/3.1 Candidate for cherry picking into the 3.1 release branch cherry-pick/3.2 Candidate for cherry picking into the 3.2 release branch cherry-pick/3.3 Candidate for cherry picking into the 3.3 release component:hydrator Issue related to the Source Hydrator and commit server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments