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

Restore the exit codes to the v0.42.0 values #2897

Merged
merged 1 commit into from
Feb 2, 2023
Merged

Conversation

na--
Copy link
Member

@na-- na-- commented Feb 2, 2023

I messed up the exit codes in #2815, so this PR now restores the old ones. The only thing different from v0.42.0 is the meaning of the 103 exit code. It used to be GenericEngine, i.e. "the test died from an unknown cause", and will now be used for the well-defined ScriptStoppedFromRESTAPI error.

This is the git diff v0.42.0...restore-exit-codes -- errext/exitcodes/codes.go, for easier review:

diff --git a/errext/exitcodes/codes.go b/errext/exitcodes/codes.go
index abcb602f..8efc0578 100644
--- a/errext/exitcodes/codes.go
+++ b/errext/exitcodes/codes.go
@@ -1,4 +1,5 @@
 // Package exitcodes contains the constants representing possible k6 exit error codes.
+//
 //nolint:golint
 package exitcodes
 
@@ -13,7 +14,7 @@ const (
 	SetupTimeout             ExitCode = 100
 	TeardownTimeout          ExitCode = 101
 	GenericTimeout           ExitCode = 102 // TODO: remove?
-	GenericEngine            ExitCode = 103
+	ScriptStoppedFromRESTAPI ExitCode = 103
 	InvalidConfig            ExitCode = 104
 	ExternalAbort            ExitCode = 105
 	CannotStartRESTAPI       ExitCode = 106

The only thing different is the meaning of the 103 exit code. It used to be `GenericEngine`, i.e. "the test died from an unknown cause", and will now be used for the well-defined `ScriptStoppedFromRESTAPI` error.
@na-- na-- added this to the v0.43.0 milestone Feb 2, 2023
@na-- na-- merged commit b750e20 into master Feb 2, 2023
@na-- na-- deleted the restore-exit-codes branch February 2, 2023 17:54
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.

3 participants