Retouching how files are handled when running from archive fixes #819 #823
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this commit running an archive meant that all the files will be
loaded and cached before execution. This also included precompiling all
the javascript files without actually running any of them.
This in itself wasn't a problem the problem came from anonymazation of
usernames in directories. This when the paths are absolute meant that we
had to change the script as well in order for them to match - we both
didn't do it and it wouldn't have worked in all cases as they could be
made concatinating strings for example.
The solution - either remove anonymization or anonymize everything
coming trough open. The second solution was choosen for now.
This commit also makes it so that we have an afero.Fs when running from
archive that is populated with all the files from the archive with their
correct anonymized paths. This prevents the panic that was previously
happening.
Also now we just compile and run the test script and it will
automatically load whatever scripts it need from the afero.fs the same
way as this is when just using 'k6 run test.js'