You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a dependency PR is opened and its builds are currently running, PCS does not update the PR with new updates but queues the update for later and tries again. This means that several updates can get queued. The problem is that right now, they will get applied one by one in a FIFO manner.
Instead, the latest should be applied only.
Goal
Make sure that the latest queued (pending) update is applied instead of the one next in line.
The updates are queued as delayed messages in the background queue and appear one by one. PCS has no chance knowing there's more.
This will probably mean writing into Redis what the latest pending update is and ignoring the other updates.
So when we are delaying an update, we need to write the build number/time into Redis and when we're processing the pending updates, we should just apply the newest. This can be either done by waiting for the matching queue message or performing the latest update with the first message that comes for that subscription.
It should also be possible to write a unit test for it (DependencyFlow.Tests project)
The text was updated successfully, but these errors were encountered:
<!-- 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 -->
#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
---------
Co-authored-by: Přemek Vysoký <[email protected]>
Context
When a dependency PR is opened and its builds are currently running, PCS does not update the PR with new updates but queues the update for later and tries again. This means that several updates can get queued. The problem is that right now, they will get applied one by one in a FIFO manner.
Instead, the latest should be applied only.
Goal
The updates are queued as delayed messages in the background queue and appear one by one. PCS has no chance knowing there's more.
This will probably mean writing into Redis what the latest pending update is and ignoring the other updates.
So when we are delaying an update, we need to write the build number/time into Redis and when we're processing the pending updates, we should just apply the newest. This can be either done by waiting for the matching queue message or performing the latest update with the first message that comes for that subscription.
DependencyFlow.Tests
project)The text was updated successfully, but these errors were encountered: