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

fix(webhook): keep parent and build number synced #936

Merged
merged 8 commits into from
Aug 28, 2023

Conversation

wass3r
Copy link
Collaborator

@wass3r wass3r commented Aug 24, 2023

currently, new builds always produce build objects that have their parent field referencing the previous build (-1) - the exception is the very first build for which parent and number are the same value (1).

afaik, there's no reason for this and the only time these two should diverge (at least, currently) is if a build was restarted. in that case parent should reference the build number that was restarted. that currently works as described.

in other words, it currently looks like every build (except the very first one) is a restart of the previous build.

this change will remove the setting of the parent field on regular builds. for restarts it will continue to work as before and set the parent appropriately.

currently, build number is always +1 to parent.
for any new hooks coming in, parent and build number should be in sync.

build restarts are the only instance where these should diverge
to indicate which build was restarted.
@wass3r wass3r requested a review from a team as a code owner August 24, 2023 13:47
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #936 (5aed6da) into main (6a15df6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #936   +/-   ##
=======================================
  Coverage   70.85%   70.85%           
=======================================
  Files         311      311           
  Lines       12841    12841           
=======================================
  Hits         9099     9099           
  Misses       3279     3279           
  Partials      463      463           

@wass3rw3rk wass3rw3rk added the bug Indicates a bug label Aug 24, 2023
@wass3rw3rk wass3rw3rk assigned wass3rw3rk and wass3r and unassigned wass3rw3rk Aug 24, 2023
Copy link
Contributor

@plyr4 plyr4 left a comment

Choose a reason for hiding this comment

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

nice

@ecrupper ecrupper merged commit 236eb9e into main Aug 28, 2023
12 checks passed
@ecrupper ecrupper deleted the fix/parent-build-numbers branch August 28, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants