Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source hydrator fails with "Invalid revision range" #22039

Closed
crenshaw-dev opened this issue Feb 26, 2025 · 0 comments · Fixed by #22015
Closed

Source hydrator fails with "Invalid revision range" #22039

crenshaw-dev opened this issue Feb 26, 2025 · 0 comments · Fixed by #22015
Labels
bug Something isn't working component:hydrator hydrator Issues related to the manifest hydrator.

Comments

@crenshaw-dev
Copy link
Member

Describe the bug

Hydration fails with an error like this:

Failed to hydrate revision "": failed to hydrate apps: failed to get repo objects: failed to get repo objects: failed to compare revisions for source 1 of 1: rpc error: code = Internal desc = unable to get changed files for repo https://github.com/org/repo.git with revision b6005465335e883927fe8b5ce0fd513fd4e75ec3: failed to diff b71323f97523272c4222932e9113a4d81f9f32ea..b6005465335e883927fe8b5ce0fd513fd4e75ec3: `git diff --name-only b71323f97523272c4222932e9113a4d81f9f32ea..b6005465335e883927fe8b5ce0fd513fd4e75ec3` failed exit status 128: fatal: Invalid revision range b71323f97523272c4222932e9113a4d81f9f32ea..b6005465335e883927fe8b5ce0fd513fd4e75ec3

The problem seems to be related to the fact that the first hash represents a commit on the dry branch, and the second hash represents a hash on the hydrated branch. The two aren't really comparable.

To Reproduce

This seems to randomly happen on any app that uses the manifest-generate-paths annotation.

I think it's flaky because the failure depends on a discrepancy between the state of the cached repo-server repo clone and the upstream repo. If the repo-server hasn't pulled either the dry or hydrated commit being compared, it will fail.

Expected behavior

The source hydrator shouldn't compare dry and hydrated commits for work-avoidance when manifest-generate-paths is specified. The hydrator doesn't even really support that annotation yet. We should just drop the annotation when doing hydration.

@crenshaw-dev crenshaw-dev added bug Something isn't working component:hydrator hydrator Issues related to the manifest hydrator. labels Feb 26, 2025
crenshaw-dev added a commit that referenced this issue Feb 27, 2025
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Feb 27, 2025
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
crenshaw-dev added a commit that referenced this issue Feb 27, 2025
…#22015) (#22061)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
skyscannerBajpai pushed a commit to skyscannerBajpai/argo-cd that referenced this issue Feb 27, 2025
…goproj#22015)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Harshit-Bajpai <Harshit.Bajpai@skyscanner.net>
chzar pushed a commit to chzar/argo-cd that referenced this issue Mar 3, 2025
…goproj#22015)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
kingbj940429 pushed a commit to kingbj940429/argo-cd that referenced this issue Mar 4, 2025
…goproj#22015)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: kingbj0429 <kingbj0429@lunit.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:hydrator hydrator Issues related to the manifest hydrator.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant