-
Notifications
You must be signed in to change notification settings - Fork 76
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
Group subscription updates #4422
Group subscription updates #4422
Conversation
test/ProductConstructionService.DependencyFlow.Tests/SubscriptionOrPullRequestUpdaterTests.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.
Hm... Somehow I always assumed that we need to store the whole update so that we can compare the build times?
Isn't storing just the SHA not enough? I think we should be applying the latest build.
We should even compare probably that we don't have a newer in the PR already.
test/ProductConstructionService.DependencyFlow.Tests/PullRequestUpdaterTests.cs
Outdated
Show resolved
Hide resolved
We could compare build times, but I think this might be enough. |
@mmitche do you have any opinion on this? Is it ok to say that the latest build is the one that last triggered the subscription? From my experience that is the case in almost every scenario. |
@dkurepa In what cases can a subscription be triggered where it would not apply the latest build? |
only if someone did it in manually through |
Yeah, I don't think anyone is doing that. And anyway, if a new build came in, that would just get overwritten anyway. |
src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs
Outdated
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs
Outdated
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs
Outdated
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/PendingCodeFlowUpdatesTests.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/PendingUpdatesTests.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/SubscriptionOrPullRequestUpdaterTests.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/SubscriptionOrPullRequestUpdaterTests.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/SubscriptionOrPullRequestUpdaterTests.cs
Outdated
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs
Outdated
Show resolved
Hide resolved
src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/TestsWithServices.cs
Outdated
Show resolved
Hide resolved
test/ProductConstructionService.DependencyFlow.Tests/PendingUpdatesTests.cs
Outdated
Show resolved
Hide resolved
…ndencyFlow/PullRequestUpdater.cs Co-authored-by: Přemek Vysoký <[email protected]>
#4336
This PR makes the service group dependency updates by keeping track of the commit that was in the latest subscription trigger.
For example, let's say we trigger a subscription (we'll call it trigger 1) that has an already existing PR, but that PR can't be updated. We set a reminder to try again later. Now let's say we trigger the subscription again (trigger 2), again, but the PR is still not updatable.
This PR makes it so that the update caused by the trigger 1 doesn't get processed, because a newer update from trigger 2 should be processed next