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

Immediately shutdown k6 cloud on second sig-c signal #1647

Merged
merged 6 commits into from
Nov 2, 2020

Conversation

theerapatcha
Copy link
Contributor

Trap signal and handle second sig-c to shutdown k6 cloud immediately

Closes #1530

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2020

Codecov Report

Merging #1647 into master will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1647      +/-   ##
==========================================
- Coverage   72.16%   72.11%   -0.06%     
==========================================
  Files         166      166              
  Lines       12787    12794       +7     
==========================================
- Hits         9228     9226       -2     
- Misses       3009     3018       +9     
  Partials      550      550              
Impacted Files Coverage Δ
cmd/cloud.go 6.52% <0.00%> (-0.26%) ⬇️
lib/testutils/minirunner/minirunner.go 81.39% <0.00%> (-4.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b75efd...066d59b. Read the comment docs.

Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Thanks for this! At a quick glance, it looks very good, but I'd like to test the new code as well before giving it the final 👍

@na-- na-- added this to the v0.29.0 milestone Oct 7, 2020
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

LGTM, tested it as well and everything seems fine, thanks again!

mstoykov
mstoykov previously approved these changes Oct 14, 2020
cmd/cloud.go Outdated Show resolved Hide resolved
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Please fix the race condition reported in #1647 (comment)

@codecov-io
Copy link

codecov-io commented Oct 26, 2020

Codecov Report

Merging #1647 into master will increase coverage by 0.17%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1647      +/-   ##
==========================================
+ Coverage   72.16%   72.33%   +0.17%     
==========================================
  Files         166      176      +10     
  Lines       12787    13539     +752     
==========================================
+ Hits         9228     9794     +566     
- Misses       3009     3132     +123     
- Partials      550      613      +63     
Flag Coverage Δ
ubuntu 72.30% <0.00%> (?)
windows 70.86% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/cloud.go 6.62% <0.00%> (-0.15%) ⬇️
stats/statsd/collector.go 65.21% <0.00%> (-34.79%) ⬇️
stats/datadog/collector.go 74.19% <0.00%> (-25.81%) ⬇️
cmd/options.go 60.46% <0.00%> (-2.73%) ⬇️
lib/testutils/httpmultibin/httpmultibin.go 89.88% <0.00%> (-2.52%) ⬇️
js/runner.go 80.13% <0.00%> (-2.14%) ⬇️
lib/netext/dialer.go 93.75% <0.00%> (-2.00%) ⬇️
js/modules/k6/http/request.go 80.64% <0.00%> (-0.07%) ⬇️
cmd/collectors.go 0.00% <0.00%> (ø)
stats/system_tag.go 83.05% <0.00%> (ø)
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b75efd...4ebb1e5. Read the comment docs.

cmd/cloud.go Outdated Show resolved Hide resolved
Co-authored-by: Mihail Stoykov <MStoykov@users.noreply.github.com>
cmd/cloud.go Show resolved Hide resolved
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

LGTM, though the old shouldExitLoop behavior would have been better than a direct break of the loop, since now we won't update the progress (testProgress = newTestProgress), but we can fix that later in another PR.

@na-- na-- merged commit b970b7b into grafana:master Nov 2, 2020
salem84 pushed a commit to salem84/k6 that referenced this pull request Nov 5, 2020
This pull request was closed.
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.

Always immediately stop k6 cloud on a second Ctrl+C
5 participants