-
Notifications
You must be signed in to change notification settings - Fork 77
Improve darc update-subscription
by allowing to specify policy checks
#4680
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
Improve darc update-subscription
by allowing to specify policy checks
#4680
Conversation
…hecks in standard automerge policies
darc update-subscription
by allowing to specify policy checks
src/Microsoft.DotNet.Darc/Darc/Options/UpdateSubscriptionCommandLineOptions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Darc/Darc/Operations/UpdateSubscriptionOperation.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rename source flow to code flow as that is what the policies show up as (and are named as) in the UI
.ToObject<IEnumerable<string>>() | ||
?? []; | ||
|
||
private void AddMergePolicyWithIgnoreChecksIfMissing(List<MergePolicy> mergePolicies, string policy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method name feels a bit too descriptive. Maybe AddMergePolicyWithDefaults
?
Also, what is trying to do exactly? It seems its trying to append ignore checks from a specific policy if it exists and if not then add a default policy which seems a bit too different of operations to combine into one function, no?
}); | ||
} | ||
|
||
if (_options.SourceFlowCheckMergePolicy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snippet is quite similar to the one in AddSubscriptionOperation
and seems to be tied to source flow rather than the operations themselves. Should it be maybe in some helper object instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to only have one code flow merge policy, yeah, good call
src/Microsoft.DotNet.Darc/Darc/Models/PopUps/MergePoliciesPopUpHelpers.cs
Outdated
Show resolved
Hide resolved
…pHelpers.cs Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
…icy checks (dotnet#4680)" This reverts commit 15c4f8e.
…ks (dotnet#4680) <!-- Link the GitHub or AzDO issue this pull request is associated with. Please copy and paste the full URL rather than using the dotnet/arcade-services# syntax --> dotnet#4612 dotnet#2599 - Allows subscription merge policy updates from the `update-subscription command - Allows adding explicitly adding coherency check policies - Allows specifying `ignore-checks` for the standard automerge policy --------- Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
#4612
#2599
ignore-checks
for the standard automerge policy