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 the execution derivation bug and work around the k6 0.24.0 wrong tar metadata #1057

Merged
merged 3 commits into from
Jun 28, 2019

Conversation

na--
Copy link
Member

@na-- na-- commented Jun 25, 2019

This includes two minor improvements + refactoring and a bugfix:

  • Include the k6 version in the tar archives' metadata.json

  • Do not include the derived execution options in tar archives

    Also, since those options were included by k6 v0.24.0, only emit a warning instead of an error if the derived execution options match any execution options that are "specified" by the user, since at that level we can't distinguish if we're executing an archive or a script...

  • Allow simultaneous use of duration and iterations execution shortcuts

    This would just produce a shared-iterations scheduler with the specified number of iterations and a maxDuration equal to the passed duration, similar to how it works in the current k6 execution. This should fix Specifying both duration and iterations is deprecated and won't be supported in the future k6 versions #1058.

na-- added 2 commits June 25, 2019 18:33
Also, since those options were included by k6 v0.24.0, only emit a warning instead of an error if the derived execution options match any `execution` options that are "specified" by the user, since at that level we can't distinguish if we're executing an archive or a script...
@na-- na-- requested a review from mstoykov June 25, 2019 15:39
@na-- na-- changed the title Fix execution validation bug Fix the execution derivation bug and work around the k6 0.24.0 wrong tar metadata Jun 25, 2019
@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #1057 into master will increase coverage by <.01%.
The diff coverage is 68.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1057      +/-   ##
==========================================
+ Coverage   72.78%   72.79%   +<.01%     
==========================================
  Files         133      133              
  Lines        9884     9905      +21     
==========================================
+ Hits         7194     7210      +16     
- Misses       2272     2278       +6     
+ Partials      418      417       -1
Impacted Files Coverage Δ
cmd/root.go 34% <ø> (ø) ⬆️
lib/archive.go 87.24% <ø> (ø) ⬆️
cmd/archive.go 26.19% <0%> (ø) ⬆️
cmd/collectors.go 0% <0%> (ø) ⬆️
cmd/run.go 9.18% <0%> (-0.04%) ⬇️
cmd/cloud.go 9.52% <0%> (-0.08%) ⬇️
cmd/login_cloud.go 9.25% <0%> (ø) ⬆️
cmd/version.go 40% <0%> (ø) ⬆️
cmd/options.go 66.37% <100%> (ø) ⬆️
js/bundle.go 82.22% <100%> (+0.13%) ⬆️
... and 1 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 2a2fe2c...0109458. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #1057 into master will increase coverage by <.01%.
The diff coverage is 65.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1057      +/-   ##
==========================================
+ Coverage   72.78%   72.79%   +<.01%     
==========================================
  Files         133      133              
  Lines        9884     9905      +21     
==========================================
+ Hits         7194     7210      +16     
- Misses       2272     2278       +6     
+ Partials      418      417       -1
Impacted Files Coverage Δ
cmd/root.go 34% <ø> (ø) ⬆️
lib/archive.go 87.24% <ø> (ø) ⬆️
cmd/archive.go 26.19% <0%> (ø) ⬆️
cmd/collectors.go 0% <0%> (ø) ⬆️
cmd/run.go 9.18% <0%> (-0.04%) ⬇️
cmd/cloud.go 9.52% <0%> (-0.08%) ⬇️
cmd/login_cloud.go 9.25% <0%> (ø) ⬆️
cmd/version.go 40% <0%> (ø) ⬆️
cmd/options.go 66.37% <100%> (ø) ⬆️
js/bundle.go 82.22% <100%> (+0.13%) ⬆️
... and 1 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 2a2fe2c...5530fe4. Read the comment docs.

@na--
Copy link
Member Author

na-- commented Jun 26, 2019

Seems that besides more tests, I'll have to make another change to the shortcut options, relating to this issue: #1058

@na-- na-- mentioned this pull request Jun 26, 2019
39 tasks
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

LGTM! Don't forget to fix the golangci issue before merging ;)

This would just produce a shared-iterations scheduler with the specified number of iterations and a maxDuration equal to the passed duration, similar to how it works in the current k6 execution. This should fix #1058.
@na-- na-- force-pushed the fix-execution-validation-bug branch from 7f9e39f to 0109458 Compare June 27, 2019 10:34
@na-- na-- merged commit 3ed0fb8 into master Jun 28, 2019
@na-- na-- deleted the fix-execution-validation-bug branch June 28, 2019 08:56
@na--
Copy link
Member Author

na-- commented Jul 9, 2019

Just for posterity, here's an explanation why the bugfix part of this PR was insufficient: #1007 (comment)

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.

Specifying both duration and iterations is deprecated and won't be supported in the future k6 versions
3 participants