-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite script/files loading to be be url based (#1059)
This also includes a change to the archive file structure. Now instead of separating files by whether they are scripts or not, they are separated based on their URI scheme. Throughout the (majority) of k6 now, instead of simple strings, a url.URL is used to identify files (scripts or otherwise). This also means that all imports can have schemes. Previously remote modules were supported specifically without a scheme. With this change k6 prefers if they are with a scheme. The old variant is supported, but logs a warning. Additionally if remote module requires a relative/absolute path that doesn't have a scheme, it is relative/absolute given the remote module url. Because of some of the changes, now caching is done through a afero.Fs instead of additional maps. This also fixes the remotely imported files not properly loading from an archive, but instead requesting them again. This is supported with old archives and for github/cdnjs's shortcut loaders. For future-proof reasons the archive now also records the GOOS value of the k6 that generated it. Anonymize case insensitively as windows paths are (usually) case insensitive. fixes #1037, closes #838, fixes #887 and fixes #1051
- Loading branch information
Showing
39 changed files
with
2,159 additions
and
868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ linters-settings: | |
dupl: | ||
threshold: 150 | ||
goconst: | ||
min-len: 5 | ||
min-len: 10 | ||
min-occurrences: 4 | ||
|
||
linters: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.