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

fix(hydrator): don't get cluster or API versions for hydrator #21985

Merged

Conversation

crenshaw-dev
Copy link
Member

@crenshaw-dev crenshaw-dev commented Feb 24, 2025

The hydrator doesn't use the k8s server or API versions, so we shouldn't try to get them.

This fixes a bug where hydration on one shard might not have access to a cluster for an app that's destined for a cluster being handled by another shard.

Fixes #21986

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Copy link

bunnyshell bot commented Feb 24, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 56.68%. Comparing base (f32f69f) to head (4aba937).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
controller/state.go 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21985      +/-   ##
==========================================
+ Coverage   55.73%   56.68%   +0.95%     
==========================================
  Files         342      342              
  Lines       57080    57823     +743     
==========================================
+ Hits        31811    32775     +964     
+ Misses      22633    22421     -212     
+ Partials     2636     2627       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crenshaw-dev crenshaw-dev force-pushed the fix-hydrator-cluster-access branch from 700b6ca to 4aba937 Compare February 25, 2025 18:33
@crenshaw-dev crenshaw-dev marked this pull request as ready for review February 25, 2025 18:36
@crenshaw-dev crenshaw-dev requested a review from a team as a code owner February 25, 2025 18:36
@crenshaw-dev
Copy link
Member Author

I added a test, but the test was more tech debt than it was worth (a bunch of mocks, etc.). The GetRepoObjs function needs to be refactored. For now, I've tested the fix in an Intuit instance and confirmed with @agaudreault.

@crenshaw-dev crenshaw-dev merged commit 3baca9b into argoproj:master Feb 26, 2025
49 checks passed
@crenshaw-dev
Copy link
Member Author

/cherry-pick release-2.14

@crenshaw-dev crenshaw-dev deleted the fix-hydrator-cluster-access branch February 26, 2025 18:36
Copy link

Cherry-pick failed with Merge error 3baca9b6960691435e039dd756ae122a272ebd42 into temp-cherry-pick-23226c-release-2.14

crenshaw-dev added a commit to crenshaw-dev/argo-cd that referenced this pull request Feb 26, 2025
…oj#21985)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev
Copy link
Member Author

Cherry-picking to 2.14 here: #22038

crenshaw-dev added a commit that referenced this pull request Feb 26, 2025
#22038)

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

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 pull request Mar 3, 2025
…oj#21985)

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

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source hydrator fails with controller is configured to ignore cluster
3 participants