-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: adding support for CHALK_BYPASS environment variable #419
base: main
Are you sure you want to change the base?
Conversation
a815a73
to
393862d
Compare
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, assuming that e.g. @drraid is happy with the mechanism here.
this allows to completely skip chalk when wrapping `docker`. Whenever its enabled, chalk directly proxies the command to `docker` without invoking any of the chalk internal machinery such as loading configs/etc
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 I understand the code correctly, the default behavior of this is to still use chalk, and only bypass if the env var CHALK_BYPASS
is true (1, etc.), and I think this is the inversion of what we want: if someone has configured chalk to use bypass, it should default to bypass unless an env var specifies that it shouldn't. The recent request to implement this is for a scenario where the customer wants people to be able to opt-in by setting a variable, and also this opt-in approach prevents accidentally CRWDSTRIKEing their machines for replaced binaries.
Maybe we want something like PERFORM_WRAPPED_CHALKING
? Or maybe even something more explicit to identify the docker scenario?
Additionally I'd like to do some analysis to figure out the code paths before this code is reached, the goal will be to minimize it as much as possible so that bugs elsewhere in the chalk code base can't cause a failure of our proxying of execution
CHANGELOG.md
if necessaryIssue
there is no way to disable/enable chalk when chalk wraps a
docker
commandfixes #224
Description
this allows to completely skip chalk when wrapping
docker
. Whenever its enabled, chalk directly proxies the command todocker
without invoking any of the chalk internal machinery such as loading configs/etcTesting