Skip to content

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

Merged
merged 12 commits into from
Apr 15, 2025

Conversation

dkurepa
Copy link
Member

@dkurepa dkurepa commented Apr 14, 2025

#4612
#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

@dkurepa dkurepa changed the title Dkurepa/update subscription update Improve darc update-subscription by allowing to specify policy checks Apr 14, 2025
@dkurepa dkurepa marked this pull request as ready for review April 15, 2025 09:42
Copy link
Member

@premun premun left a 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)
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Member

@premun premun left a 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

…pHelpers.cs

Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
@dkurepa dkurepa merged commit 15c4f8e into dotnet:main Apr 15, 2025
9 checks passed
premun added a commit to premun/arcade-services that referenced this pull request Apr 16, 2025
premun added a commit that referenced this pull request Apr 16, 2025
premun added a commit to dkurepa/arcade-services that referenced this pull request Apr 17, 2025
…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>
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.

3 participants