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 panic in k6/execution #2926

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Conversation

olegbespalov
Copy link
Contributor

What?

Fix a minor panic that could happen if try to get insides about the exec.vu.iterationInScenario in setup method

In that case, we will return 0 as all other vu.* properties do.

Why?

Panics are bad.

Resolves: #2924

Fixing the panic that could happen if try to access the
`exec.vu.iterationInScenario` in `setup`. At that moment, the details are
not initialized.
@olegbespalov olegbespalov added this to the v0.44.0 milestone Feb 22, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2926 (70b510f) into master (eb2a54d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 70b510f differs from pull request most recent head b5b155d. Consider uploading reports for the commit b5b155d to get more accurate results

@@           Coverage Diff           @@
##           master    #2926   +/-   ##
=======================================
  Coverage   76.87%   76.88%           
=======================================
  Files         225      225           
  Lines       16894    16895    +1     
=======================================
+ Hits        12987    12989    +2     
+ Misses       3076     3074    -2     
- Partials      831      832    +1     
Flag Coverage Δ
ubuntu 76.81% <100.00%> (+<0.01%) ⬆️
windows 76.66% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
js/modules/k6/execution/execution.go 83.61% <100.00%> (+0.09%) ⬆️
api/v1/metric.go 54.54% <0.00%> (-9.10%) ⬇️
lib/executor/ramping_arrival_rate.go 96.52% <0.00%> (-0.87%) ⬇️
js/modules/k6/ws/ws.go 86.66% <0.00%> (+0.57%) ⬆️
lib/executor/vu_handle.go 95.32% <0.00%> (+0.93%) ⬆️
metrics/metric_type.go 82.45% <0.00%> (+3.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@olegbespalov olegbespalov self-assigned this Feb 22, 2023
@olegbespalov olegbespalov merged commit 26ec301 into master Feb 23, 2023
@olegbespalov olegbespalov deleted the fix/2924-iteration-in-scenario-panic branch February 23, 2023 07:55
@na-- na-- mentioned this pull request Feb 27, 2023
@na-- na-- modified the milestones: v0.44.0, v0.43.1 Feb 27, 2023
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.

k6/execution could panic in setup
5 participants