-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Binary provisioning/add cache dir flag #4743
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
Binary provisioning/add cache dir flag #4743
Conversation
Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one comment
cmd/state/state.go
Outdated
if val, ok := env["K6_BINARY_CACHE"]; ok { | ||
result.BinaryCache = val | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if val, ok := env["K6_BINARY_CACHE"]; ok { | |
result.BinaryCache = val | |
} |
I don't think we have to introduce this option. Go already provides a way to override the OS cache dir, if they really need it. However, even if it would be required, I would prefer if we wait for a real feature-request instead of introducing it now so we can keep the API very essential.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I introduced it because IIRC we use it in the cloud, when we have a distroless image and UserCacheDir
doesn't behave as expected.
Also, I'm not sure I want a k6
user to have to deal with a go setting ($GOCACHE
) instead of a setting related to a feature they are using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elaborating on my previous comment, the cache dir we are discussing is for storing the custom binaries downloaded from the build service, there's no go involved (users don't need to have it). Moreover, if in the future we support local builds, these two caches will be different
Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
What?
Adds a flag for configuring the directory used to cache provisioned binaries.
Why?
The default value may result confusing as it makes reference to the
k6provider
library.Fixes #4741
Checklist
make check
) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
Related PR(s)/Issue(s)