Skip to content
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

Handle CodeFlow conflicts gracefully #4387

Merged
merged 29 commits into from
Jan 30, 2025

Conversation

dkurepa
Copy link
Member

@dkurepa dkurepa commented Jan 27, 2025

#4182

  • Makes it so we post a comment detailing all conflicting files on an unsuccessful PR update
  • Further updates are blocked, and not even tried unless the PR head branch commit changes, in that case we retry to see if the conflict got resolved (if this fails again, we'll post another comment with the list of files)

@dkurepa dkurepa marked this pull request as ready for review January 28, 2025 11:08
@dkurepa dkurepa requested review from premun and adamzip January 28, 2025 11:08
@dkurepa dkurepa changed the title Dkurepa/post comment during conflicts Handle CodeFlow conflicts gracefully Jan 28, 2025
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 reviewed all but the scenario tests, will have a look at them later

…ndencyFlow/PullRequestUpdater.cs

Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
@premun
Copy link
Member

premun commented Jan 28, 2025

@dkurepa I think we should add a DependencyFlow.Tests for some of this logic too. These set up the state (fake redis) and then execute a pending check or update and check the state again. They verify which updates have been set and what is in the cache after. They are quite valuable because from them you can tell/understand what is the state like in every step

@dkurepa dkurepa requested a review from premun January 29, 2025 15:01
{
return pullRequest;
}
await Task.Delay(5000);
Copy link
Member

Choose a reason for hiding this comment

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

This waits for 3-4 minutes while the service checks every 5 minutes. So this might not be enough if we need an extra check? Or we trigger everything first and then wait until the service does it in the first go?

Copy link
Member Author

Choose a reason for hiding this comment

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

This check doesn't need to wait for the reminder to kick in. The comment should appear pretty fast after the subscription is triggered

dkurepa and others added 5 commits January 29, 2025 17:37
…stUpdaterTests.cs

Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
…TestBase.cs

Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
…ndencyFlow/PullRequestUpdater.cs

Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
dkurepa and others added 2 commits January 30, 2025 10:32
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
@dkurepa dkurepa merged commit d38f76c into dotnet:main Jan 30, 2025
9 checks passed
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