grafana / k6-cloud-feature-requests

The place to propose, dicuss and vote for k6 Cloud features and ideas.
9 stars 1 forks source link

How to update the script from CLI without running the test in cloud #22

Closed jbm00n closed 1 year ago

jbm00n commented 3 years ago

Our test runs with scheduler. and every time I need to modify the script I need to fire a dummy test from k6 cloud command and then abort it (our environment scales during the day and test can only be performed within specific hours).

Tests results are also analyzed for SLOs, dashboard etc, and every time I run these dummy tests they affect these metrics badly.

So my question is if there is a way (or would it be an acceptable feature request) to use "k6 cloud" CLI to only update the script and not run the test.

One option I can think of is to use our own scheduler (CI/CD pipelines), which would update the script with every run. So just checking if there would be a solution out of the box :)

robingustafsson commented 3 years ago

Hi @jbm00n, thanks for adding this feature request, and yes, it's a very reasonable request at that 🙂 We've had some internal discussions on how to solve this but nothing concrete has been decided yet. We work in 8 week product cycles and started a new cycle ~2 weeks ago, but when we start planning the next cycle in a couple of weeks I'll make sure we consider a solution to this issue for implementation as it's been requested a number of times now across various channels.

Regarding a workaround for your use case, yeah what we've been proposing so far is what you've concluded yourself, that you use the scheduling mechanism in your CI/CD tool of choice instead to run k6 cloud ... which would then run the latest script(s).

jbm00n commented 3 years ago

Alright, thank you for the quick response.

I don't know how you handle these tickets, so feel free to close it if it's already in roadmap or duplicated :)

robingustafsson commented 3 years ago

You're welcome. We leave issues open here until we've developed and released a solution into production so other users and customers can join the conversation, so if you subscribe to the issue you'll get notified of any progress (I'll update the ticket when we include it in a product cycle etc. as well). Thanks again for creating the issue.

lucataglia commented 2 years ago

Hi all, are there some news about that feature ? I was searching for that too

chadxzs commented 2 years ago

we submitted a support ticket and were pointed here. Our original request was:

Is there a way to programmatically update the code behind a test already created in the k6 cloud ui?

We have a test running on a schedule. We want to keep it's source code in our version control system and have our CI system update the code in k6 cloud when it is changed.

Is there something in k6 cli, or some other method, that would allow this?

It may be that product documentation around this would help. We also have a CI system and will likely be swapping to using that scheduler for our scheduled runs so that it uses our latest test source. Cheers 🍻

JordanNazemi commented 2 years ago

Just wanted to share that my company just got a K6 license and we are also looking for a way to deploy scripts to K6 Cloud without automatically running them. Some kind of --no-run flag would be incredibly helpful. We also cant run certain performance tests until post-peak hours.

modnoise commented 1 year ago

We still need this feature. Plenty of time has passed

jlcrow commented 1 year ago

Need the same feature, in a little disbelief that this is sitting here for 2 years, it seems all the pieces are in place and should be something easy to add with a simple flag. Updating the script and running the script in a production environment aren't always aligned and sitting on a test while it's running in the cli is not always the best use of time for an engineer. Since we keep our scripts in git and make changes frequently it would be nice to update the script for an environment and then let the schedule pick up and run it on the next scheduled run. I noticed there's a flag for pause k6 run cloud -p, at least in this regard maybe the script can be uploaded and then the paused test aborted, assuming the schedule picks up the latest version of a script and not the version that the schedule was created from, this is also unclear.

markjmeier commented 1 year ago

Hey everyone - we hear you and apologies for a lack of updates. This is a feature we want to work on, but down prioritized due to other things we have been working on since joining Grafana. In any case - I want to note that you are not screaming into a void here, we plan to look into this in an upcoming cycle and reprioritize appropriately.

dgzlopes commented 1 year ago

Hello folks! This is now possible with the latest k6 release (v0.45.0 - released today).

How? By adding --upload-only when invoking k6 cloud as in k6 cloud --upload-only script.js.

More information can be found in the release notes: https://github.com/grafana/k6/releases/tag/v0.45.0