Skip to content

Conversation

@crenshaw-dev
Copy link
Member

GetRepoObjs is the controller's way of calling repo-server to get manifests.

Getting manifests is a long-ish-running operation. We should really be using contexts through all this code so that timeouts can be easily implemented.

This PR is purely a refactor to centralize the context.Background() in a few key places so that we can introduce timeouts and short-circuiting later.

My immediate motivation is using an errgroup context to short-circuit parallel calls to repo-server in Source Hydrator when one of those calls fails. No need to wait for all the other calls to finish when one has already failed. I'll open a follow-up PR to introduce that parallelization.

@crenshaw-dev crenshaw-dev requested a review from a team as a code owner September 5, 2025 21:37
@bunnyshell
Copy link

bunnyshell bot commented Sep 5, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Signed-off-by: Michael Crenshaw <[email protected]>
@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@ae16c00). Learn more about missing BASE report.
⚠️ Report is 21 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #24431   +/-   ##
=========================================
  Coverage          ?   60.27%           
=========================================
  Files             ?      350           
  Lines             ?    59980           
  Branches          ?        0           
=========================================
  Hits              ?    36154           
  Misses            ?    20924           
  Partials          ?     2902           

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

Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

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

LGTM

@crenshaw-dev crenshaw-dev merged commit 3247474 into argoproj:master Sep 8, 2025
42 of 43 checks passed
@crenshaw-dev crenshaw-dev deleted the hydration-context branch September 8, 2025 15:16
Mangaal pushed a commit to Mangaal/argo-cd that referenced this pull request Sep 10, 2025
LogicalShark pushed a commit to LogicalShark/argo-cd that referenced this pull request Sep 10, 2025
Hapshanko pushed a commit to Hapshanko/argo-cd that referenced this pull request Sep 12, 2025
downfa11 pushed a commit to downfa11/argo-cd that referenced this pull request Sep 12, 2025
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.

2 participants