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

Support gracefulStop in the externally-controlled executor #2859

Open
agilob opened this issue Jan 18, 2023 · 2 comments
Open

Support gracefulStop in the externally-controlled executor #2859

agilob opened this issue Jan 18, 2023 · 2 comments
Labels
enhancement evaluation needed proposal needs to be validated or tested before fully implementing it in k6 lower prio

Comments

@agilob
Copy link
Contributor

agilob commented Jan 18, 2023

Brief summary

image

image

ERRO[0004] There were problems with the specified script configuration:
        - scenario xxx has configuration errors: gracefulStop is not supported by the externally controlled executor
        - scenario xxx has configuration errors: gracefulStop is not supported by the externally controlled executor
❯ ../k6 version
k6 v0.41.0 ((devel), go1.19.5, linux/amd64)

k6 version

v0.41.0

OS

Linux

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Run k6:

    exec: exec,
    executor: 'externally-controlled',
    duration: performanceConstantLoadTime,
    // will be evenly spread across the `timeUnit` period.
    // rate: target,
    // timeUnit: timeUnit, // rate of requests spread over timeUnit => evenly spread 60 requests over 60 seconds => 1RPS
    // preAllocatedVUs: target,
    maxVUs: 1000,
    gracefulStop: '30s'

Expected behaviour

Documentation is incorrect or the functionality of external-executor missing

Actual behaviour

.

@na--
Copy link
Member

na-- commented Jan 19, 2023

IIRC, during the development of #1007, gracefulStop wasn't added to the externally-controlled executor because it was already quite complex and the whole project was taking ages. We apparently never got around to finishing it, so we are left with this restriction 😞

func (mec ExternallyControlledConfig) Validate() []error {
errors := append(mec.BaseConfig.Validate(), mec.ExternallyControlledConfigParams.Validate()...)
if mec.GracefulStop.Valid {
errors = append(errors, fmt.Errorf(
"gracefulStop is not supported by the externally controlled executor",
))
}

Though, to be fair, I think this is the first time someone has asked for it 🤔 I'll change this issue to reflect that it is a missing functionality, so people can 👍 it and share their use cases.

And we need to fix our docs, for sure, so I added grafana/k6-docs#989 to not forget that.

@na-- na-- changed the title Common configuration options actually not available on externally-controlled executor Support gracefulStop in the externally-controlled executor Jan 19, 2023
@na-- na-- added enhancement lower prio evaluation needed proposal needs to be validated or tested before fully implementing it in k6 and removed bug labels Jan 19, 2023
@MattDodsonEnglish
Copy link
Contributor

We just corrected the docs: grafana/k6-docs@744ebae

@agilob Thanks for pointing out that inaccuracy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement evaluation needed proposal needs to be validated or tested before fully implementing it in k6 lower prio
Projects
None yet
Development

No branches or pull requests

3 participants