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: Always initialize filesystems for all schemes always #1097

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

mstoykov
Copy link
Contributor

@mstoykov mstoykov commented Aug 1, 2019

This was always done when running a script, but for archives it was
deemed not needed as if it wasn't needed during the making of the
archive it shouldn't be needed during it's running. The problem arises
when a require is in a try block in order (to check if something is
support for example). In that case if it isn't loaded (for example a
nodejs module will not be loaded but will be resolved to an https url)
it will not be cached.

So if someone tries to run an archive from such a
script and there were no https imports k6 will panic at runtime.

This was always done when running a script, but for archives it was
deemed not needed as if it wasn't needed during the making of the
archive it shouldn't be needed during it's running. The problem arises
when a `require` is in a try block in order (to check if something is
support for example). In that case if it isn't loaded (for example a
nodejs module will not be loaded but will be resolved to an `https` url)
it will not be cached.

So if someone tries to run an archive from such a
script and there were no https imports k6 will panic at runtime.
@mstoykov mstoykov requested a review from na-- August 1, 2019 13:58
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

@codecov-io
Copy link

codecov-io commented Aug 5, 2019

Codecov Report

Merging #1097 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1097      +/-   ##
==========================================
+ Coverage    73.1%   73.11%   +<.01%     
==========================================
  Files         139      139              
  Lines       10223    10225       +2     
==========================================
+ Hits         7474     7476       +2     
  Misses       2308     2308              
  Partials      441      441
Impacted Files Coverage Δ
lib/archive.go 85.09% <100%> (+0.14%) ⬆️

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 77ac332...ce8afd8. Read the comment docs.

@mstoykov mstoykov merged commit f9f19f3 into master Aug 5, 2019
@mstoykov mstoykov deleted the fixPanicWithArchives branch August 5, 2019 06:50
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.

3 participants