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

Report build success on heartbeat if we're not waiting for any more artifacts. #3344

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Jun 5, 2024

BugDX-2874 Build log is bogus

@mitchell-as mitchell-as requested a review from Naatan June 5, 2024 19:59
@mitchell-as mitchell-as marked this pull request as ready for review June 5, 2024 19:59
Copy link
Member

@Naatan Naatan left a comment

Choose a reason for hiding this comment

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

I think this is signalling a greater issue. Which is that we're not instrumenting buildSuccess() properly.

It seems stillWaiting() is based on artifactsDone(), which gets populated by both the ArtifactSucceeded as well as the ArtifactFailed events. So already that's a bug; we cannot say that len(stillWaiting())==0 means the build was successful, only that we're "done".

I suggest updating buildSuccess() to buildFinished() as well as the terms it logs to the buildlog to say "finished" rather than "successful".

And we should have the conditional logic you introduced on heartbeat here instead be on ArtifactFailed, because waiting till the heartbeat doesn't feel necessary.

@mitchell-as mitchell-as requested a review from Naatan June 5, 2024 21:04
Comment on lines +165 to +170
status := "Succeeded"
var event events.Eventer = events.BuildSuccess{}
if anyFailures {
status = "Failed"
event = events.BuildFailure{}
}
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@mitchell-as mitchell-as merged commit dd2db92 into version/0-45-0-RC1 Jun 5, 2024
7 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-2874 branch June 5, 2024 21:15
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