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

Exit with special code upon unexpected error #276

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

zarifmahfuz
Copy link
Contributor

We set up ci-queue workers to soft fail on every exit status. We do this mainly to ignore infrastructure failures. Currently, when a test fails due a problem with the test framework, it has an exit status 1 and is ignored. We want to have a unique exit status for such failures to stop ignoring them as soft failure.

@zarifmahfuz zarifmahfuz requested a review from a team May 9, 2024 23:47
@zarifmahfuz zarifmahfuz marked this pull request as ready for review May 9, 2024 23:59
@ChrisBr
Copy link
Contributor

ChrisBr commented May 10, 2024

Can you please provide some tophats before we merge it

@ChrisBr ChrisBr requested a review from casperisfine May 10, 2024 09:19
@@ -266,6 +266,11 @@ def run_from_queue(reporter, *)
reopen_previous_step
puts red("The heartbeat process died. This worker is exiting early.")
exit!(41)
rescue => e
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rescue => e
rescue => error

@zarifmahfuz zarifmahfuz force-pushed the zarifmahfuz/framework-error branch from 38430fc to e543a69 Compare May 14, 2024 23:11
@ChrisBr
Copy link
Contributor

ChrisBr commented May 22, 2024

I wonder if a better approach would be to let the summary reporter handle this and we just set a tombstone / error when this happens in Redis?

cc @casperisfine @zarifmahfuz

@ChrisBr
Copy link
Contributor

ChrisBr commented May 22, 2024

^^ Reason for this is that I would like to experiment with setting the commit status only on the summary step, this wouldn't work anymore if we don't ignore the exit status of a worker (we can still return a different exit code though). If we put the error into Redis we can still ignore all workers and succeed if all tests passed and no worker crashed.

@zarifmahfuz
Copy link
Contributor Author

I wonder if a better approach would be to let the summary reporter handle this and we just set a tombstone / error when this happens in Redis?

Yeah I imagine with group status checks, we need to do that that instead

@zarifmahfuz
Copy link
Contributor Author

Merging this in for now because this created an incident today.

@zarifmahfuz zarifmahfuz merged commit f0605fe into main Jun 10, 2024
12 checks passed
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.

4 participants