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: don't run starter job if TestRun/K6 is paused #458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LCaparelli
Copy link

Fixes #457

@CLAassistant
Copy link

CLAassistant commented Aug 29, 2024

CLA assistant check
All committers have signed the CLA.

Comment on lines +96 to +103
func (k6 TestRunSpec) isPaused() bool {
if k6.Paused == "" {
return true
}

paused, _ := strconv.ParseBool(k6.Paused)
return paused
}
Copy link
Author

@LCaparelli LCaparelli Aug 29, 2024

Choose a reason for hiding this comment

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

There is a weird behavior here, where if the string passed by the user in is not a valid boolean, it's interpreted as false by ParseBool. I'm just copying the existing behavior from where I extracted this logic, but let me know if we should instead return true, our default if uninformed.

I'd argue validation should be placed elsewhere, perhaps as an enum, but I think it'd be best to just make this a bool and avoid all of these shenanigans #455 :-)

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.

Allow resuming and suspending tests by changing a live TestRun resource
2 participants