Skip to content

Clone once per repo for Argo CD app updates#2036

Open
ATGardner wants to merge 6 commits into
mainfrom
noamgal/yos-335-argo-cd-steps-perform-a-full-clone-for-every-application
Open

Clone once per repo for Argo CD app updates#2036
ATGardner wants to merge 6 commits into
mainfrom
noamgal/yos-335-argo-cd-steps-perform-a-full-clone-for-every-application

Conversation

@ATGardner

Copy link
Copy Markdown
Contributor

Group sources across applications by repository and branch so each repo is cloned once and each branch checked out once. Direct pushes commit once per application and push once per branch group; pull request mode is unchanged.

this does not require any server change

@ATGardner ATGardner self-assigned this Jun 23, 2026
@ATGardner ATGardner force-pushed the noamgal/yos-335-argo-cd-steps-perform-a-full-clone-for-every-application branch from 2d7ed12 to 5dc9ab7 Compare June 23, 2026 12:49
@dmelnyk-octo dmelnyk-octo self-requested a review June 25, 2026 13:40

@dmelnyk-octo dmelnyk-octo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new logic looks good! I didn't noticed anything odd.
I left few minor comments mosty about the naming and posible redundancy of some fields in added PlannedApplication.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's a bit confusing to have CreateSourceUpdater public method on ApplicationSourceUpdater class. Maybe call the class ApplicationSourceUpdater factory?


public ArgoCDApplicationDto Application { get; }
public ArgoCDGatewayDto Gateway { get; }
public Application ApplicationFromYaml { get; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Double check if you need to bring the whole manifest type here. IDE tells me it's used just to get namespace via plan.ApplicationFromYaml.Metadata.Namespace that can also be take from Application DTO.

public ArgoCDGatewayDto Gateway { get; }
public Application ApplicationFromYaml { get; }
public NamespacedApplicationName NamespacedName { get; }
public string ApplicationName { get; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also might be take from DTO or ApplicationFromYaml if keeping it here.

public Application ApplicationFromYaml { get; }
public NamespacedApplicationName NamespacedName { get; }
public string ApplicationName { get; }
public IReadOnlyList<PlannedSource> Sources { get; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MatchingSources might be a better name to eliminate any misinterpretation

ATGardner and others added 5 commits June 25, 2026 18:49
Group sources across applications by repository and branch so each repo is
cloned once and each branch checked out once. Direct pushes commit once per
application and push once per branch group; pull request mode is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ATGardner ATGardner force-pushed the noamgal/yos-335-argo-cd-steps-perform-a-full-clone-for-every-application branch from 5dc9ab7 to ad197fb Compare June 25, 2026 15:50
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