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

Support a NOP run mode beyond virtual chalking #224

Open
nettrino opened this issue Feb 28, 2024 · 5 comments
Open

Support a NOP run mode beyond virtual chalking #224

nettrino opened this issue Feb 28, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@nettrino
Copy link
Contributor

Description

There are cases where for whatever reason a chalk bug could be affecting the build or execution of an image / binary etc. While we can do our best to safeguard against errors (see #188 and similar issues), we should offer a well-tested, robust nop mode of execution, where chalk only passes execution to the underlying command (e.g., if doing chalk docker build <args> to just do docker build <args>). This will be different than standard chalk operations like virtual chalking, in the sense that there will be

  • no con4m related initialization or code executing
  • no requirement for setup/env etc.
  • no chalk flag like trace etc. respected

This will offer an easy escape path for users in case of critical bugs, as well as a quick debug flag to pinpoint whether an issue is related to chalk's side effects vs not.

Result

Define an environment variable (e.g., __CHALK_NOP), which, when set, will result in a completely separate path of execution, which is dependency free, and only calls execve with the underlying arguments passed to chalk.

@nettrino nettrino added the enhancement New feature or request label Feb 28, 2024
@nettrino nettrino changed the title Support a NOP run mode which beyond virtual chalking Support a NOP run mode beyond virtual chalking Feb 28, 2024
@viega
Copy link
Contributor

viega commented Feb 29, 2024 via email

@nettrino
Copy link
Contributor Author

You mean that con4m code will always be pre-executed before anything else in chalk? The DoD for this request was to completely bypass as much as possibly from the con4m or chalk codebase

@viega
Copy link
Contributor

viega commented Feb 29, 2024

100%. 99% of the con4m code is data structure setup that can all run statically, and then be frozen in memory until needed basically.

My point is that it soon will not be bypassing much actual work to bypass the con4m execution, and it's unclear there are benefits from doing so, since that's currently responsible for the user interface for options like this...

It's very easy to avoid all of the work Chalk would do though, so I see it as very reasonable to add a bypass mode, I just am not convinced that it should bypass the core con4m load.

I think for skipping the user-defined con4m config load, what's in place already would also suffice. So for me, bypass mode would be about bypassing all chalk processing.

@miki725
Copy link
Contributor

miki725 commented Feb 29, 2024

right, with con4m v2 it will remove a lot of the loading complexity.

for now I guess we can def add support for some env var to bypass things like loading custom configs, sinks/etc. basically with that env var chalk should not do anything error-prone such as doing network calls/etc

once we have v2 I think we can make the bypass a lot more comprehensive

@viega
Copy link
Contributor

viega commented Feb 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants