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

Deprecation of whitelist-var-run in 1.7.0 does not work #1795

Closed
hashworks opened this issue Oct 21, 2021 · 8 comments · Fixed by #1956
Closed

Deprecation of whitelist-var-run in 1.7.0 does not work #1795

hashworks opened this issue Oct 21, 2021 · 8 comments · Fixed by #1956

Comments

@hashworks
Copy link

Actual behavior
Using --whitelist-var-run in 1.7.0 results in Error: unknown flag: --whitelist-var-run, crashing the build.
Using the replacement --ignore-var-run results in Flag --ignore-var-run has been deprecated, please use ignore-var-run instead.

Expected behavior
Using --whitelist-var-run in 1.7.0 results in a deprecation warning and automatically assumes --ignore-var-run, not breaking the build.
Using the replacement --ignore-var-run does not produce a deprecation warning.

To Reproduce

$ docker run gcr.io/kaniko-project/executor:v1.7.0-slim --whitelist-var-run
Error: unknown flag: --whitelist-var-run
Usage:
  executor [flags]
  executor [command]
[...]
$ docker run gcr.io/kaniko-project/executor:v1.7.0-slim --ignore-var-run
Flag --ignore-var-run has been deprecated, please use ignore-var-run instead.
Error: You must provide --destination, or use --no-push
Usage:
  executor [flags]
  executor [command]
[...]

Additional Information

@hashworks
Copy link
Author

Can we have test cases for prospective parameter deprecations, to avoid build failures?

@TBG-FR
Copy link

TBG-FR commented Oct 21, 2021

Can confirm --whitelist-var-run breaks builds... Thanks for --ignore-var-run, I couldn't find the replacement flag (I only found that --whitelist-var-run was replacing --whitelist-var-run=false)

However, when using v1.7.0 neither --ignore-var-run or "no tag" works, my builds still faill with that kind of error

mkdir: cannot create directory '/var/run/slapd': No such file or directory

@olivergregorius
Copy link
Contributor

Any news or fix on this? I see exactly the same output as @hashworks.

@imjasonh
Copy link
Collaborator

Does the fix in #1339 address the issue? Perhaps we should just fix that up and merge it before v1.8.0.

@olivergregorius
Copy link
Contributor

#1339 has been started in July 2020 and was never merged whereas #1668 has been created and merged in June 2021. I think #1339 can be closed and another PR must be opened to fix the issues introduced with #1668.

@imjasonh
Copy link
Collaborator

#1339 has been started in July 2020 and was never merged whereas #1668 has been created and merged in June 2021. I think #1339 can be closed and another PR must be opened to fix the issues introduced with #1668.

Sounds great. Would you be interested in doing that? I can review.

@olivergregorius
Copy link
Contributor

Sounds great. Would you be interested in doing that? I can review.

I'm not that familiar with Golang and especially the codebase of this project, yet, but I could try to fix this.

@olivergregorius
Copy link
Contributor

olivergregorius commented Feb 25, 2022

@imjasonh Well, I figured it out and provided a fix.

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

Successfully merging a pull request may close this issue.

4 participants