k6 icon indicating copy to clipboard operation
k6 copied to clipboard

Add support for default ProjectID

Open dgzlopes opened this issue 1 year ago • 3 comments

Feature Description

To be able to set a projectID where my Cloud tests should be run by default.

Suggested Solution (optional)

It could be part of the login cloud command:

k6 login cloud --token <my-token> --project-id 12354

If a test has a different projectID set in the script (or in env var, etc), that one should be used instead.

If no projectID is set (anywhere), the test should fail to run and ask for one.

Already existing or connected issues / PRs (optional)

No response

dgzlopes avatar Dec 04 '23 12:12 dgzlopes

If no projectID is set (anywhere), the test should fail to run and ask for one.

This will be a breaking change.

And arguably will make the setup for single project users harder.

It seems like this will be a better thing for the backend/cloud parts to check if there is project id set or not and warn or error to the user.

mstoykov avatar Dec 04 '23 14:12 mstoykov

And arguably will make the setup for single project users harder.

Will it? Most people copy and paste the command we offer in the Cloud. ProjectID could be included in there.

dgzlopes avatar Dec 04 '23 15:12 dgzlopes

What about the people who just update k6 and keep using it ?

Or do you want this only to fail on the login command?

mstoykov avatar Dec 04 '23 16:12 mstoykov