[Rollout] Production Rollout 2025-08-28#5215
Merged
dkurepa merged 7 commits intodotnet:productionfrom Aug 27, 2025
Merged
Conversation
…tion logic (dotnet#5197) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: premun <7013027+premun@users.noreply.github.com> Co-authored-by: Premek Vysoky <premek.vysoky@microsoft.com>
## New Filter Types Added 4 new filter keywords to help distinguish between different types of VMR codeflow subscriptions: - `:ff` and `:forwardflow` - filters for forward flows (source-enabled subscriptions with target directory) - `:bf` and `:backflow` - filters for backflows (source-enabled subscriptions with source directory) These filters use the existing `IsForwardFlow()` and `IsBackflow()` extension methods on the `Subscription` class. ## Partial Matching Auto-completion Enhanced the filter system to automatically expand partial filter matches when unambiguous: - Typing `:c` automatically applies `:codeflow` - Typing `:forward` expands to `:forwardflow` - Typing `:back` expands to `:backflow` - Ambiguous cases like `:f` (could match `:ff` or `:forwardflow`) don't expand
…ipProperty` dependencies (dotnet#5209) dotnet#5150 Also removes `<?xml version="1.0" encoding="utf-8"?>` from VersionDetails.props, because it was not needed, since it's an msbuild file --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR implements validation to prevent misconfigured VMR codeflow
subscriptions that could lead to conflicts and operational issues, while
also improving the API design by unifying subscription querying methods.
## Problem
Currently, it's possible to create conflicting codeflow subscriptions
that can cause problems:
1. **Backflow conflicts**: Multiple VMR→repository subscriptions
targeting the same repository branch
2. **Forward flow conflicts**: Multiple repository→VMR subscriptions
flowing into the same VMR branch and target directory
These misconfigurations can lead to race conditions, merge conflicts,
and unexpected behavior in the dependency flow system.
## Solution
### Comprehensive Validation
Added validation with a shared service architecture:
- **`ICodeflowSubscriptionValidationService`**: Common interface in
`Maestro.Common`
- **`CodeflowSubscriptionValidationService`**: Single implementation
containing all validation logic
- **Server-side validation**: SubscriptionsController validates on
`Create()` and `UpdateSubscription()`
- **Client-side validation**: DARC CLI validates in
`AddSubscriptionOperation` and `UpdateSubscriptionOperation`
- **Shared base class**: `SubscriptionOperationBase` eliminates
duplication between Add/Update operations
### Validation Rules
**Backflow subscriptions** (VMR → repository, `sourceDirectory` set):
- Only one backflow subscription allowed per target repository + target
branch combination
**Forward flow subscriptions** (repository → VMR, `targetDirectory`
set):
- Only one forward flow subscription allowed per VMR repository + VMR
branch + target directory combination
### API Improvement
Replaced the specific `GetCodeflowSubscriptionsAsync` method with a more
generic `GetSubscriptionsAsync` that accepts additional optional
parameters:
```csharp
Task<IEnumerable<Subscription>> GetSubscriptionsAsync(
string sourceRepo = null,
string targetRepo = null,
int? channelId = null,
bool? sourceEnabled = null, // New
string sourceDirectory = null, // New
string targetDirectory = null); // New
```
This provides a cleaner, more flexible API that supports both general
subscription filtering and specific codeflow validation needs without
code duplication.
## Error Messages
Clear, actionable error messages help users understand and resolve
conflicts:
```
A backflow subscription 'abc123' already exists for the same target repository and branch.
Only one backflow subscription is allowed per target repository and branch combination.
```
## Benefits
- **Maintainable**: Validation logic exists in one place
- **Consistent**: Same validation behavior across all entry points
- **Clean API**: Generic subscription querying without method
duplication
- **No breaking changes**: Existing functionality remains unaffected
Fixes dotnet#5204.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/arcade-services/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: premun <7013027+premun@users.noreply.github.com>
Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
oleksandr-didyk
approved these changes
Aug 27, 2025
oleksandr-didyk
approved these changes
Aug 27, 2025
premun
approved these changes
Aug 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#5214