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

[Grouped Updates] Generate deterministic branch names based on content #7365

Merged
merged 2 commits into from
Jun 12, 2023

Conversation

brrygrdn
Copy link
Contributor

Grouped update Pull Requests will generally have more dependencies that we can tolerate in the branch name compared to solo dependency PRs, but we rely on deterministic branch names to avoid race conditions where we retry pushing a branch that has already been successfully pushed.

The current behaviour of appending a timestamp is resulting in us opening the odd duplicate when something causes us to backoff and partially retry opening the PR, see:

This fixes the bug by updating the branch naming strategy for groups to use a short ( 10 character ) digest hash of the dependency changes.

This will ensure that if we open a new PR for the same group with different versions or dependencies, it will still avoid clashing with any lingering old PRs that haven't been cleaned up while giving us back the guarantee of at-most-once pushes.

@brrygrdn brrygrdn marked this pull request as ready for review May 23, 2023 17:10
@brrygrdn brrygrdn requested a review from a team as a code owner May 23, 2023 17:10
@brrygrdn brrygrdn self-assigned this May 23, 2023
Copy link
Member

@jakecoffman jakecoffman left a comment

Choose a reason for hiding this comment

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

LGTM

@brrygrdn brrygrdn force-pushed the brrygrdn/group-branch-names-are-deterministic branch from ae54458 to 75fc988 Compare June 12, 2023 12:22
@brrygrdn brrygrdn merged commit a1402e9 into main Jun 12, 2023
83 checks passed
@brrygrdn brrygrdn deleted the brrygrdn/group-branch-names-are-deterministic branch June 12, 2023 12:48
brettfo pushed a commit to brettfo/dependabot-core that referenced this pull request Oct 11, 2023
…nch-names-are-deterministic

[Grouped Updates] Generate deterministic branch names based on content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants