-
Notifications
You must be signed in to change notification settings - Fork 34
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
fix(ci): convert ci is failing due to perms #439
Conversation
Codecov Report
@@ Coverage Diff @@
## main #439 +/- ##
==========================================
- Coverage 11.87% 11.86% -0.01%
==========================================
Files 45 45
Lines 5551 5554 +3
==========================================
Hits 659 659
- Misses 4775 4778 +3
Partials 117 117
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
If I understand this correctly this comes from tests/convert.bats which has cat > Dockerfile <<EOF
FROM alpine:3.16
VOLUME $HOME/out
... It just seems odd to attempt that as an unprivileged user is not likely to be able to create and use a directory in / |
We could, but |
just give an error:
|
Currently, docker vols are mapped 1:1 between host and container, which is probably not we want. Now, they will be exposed as substituted vars. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Args substitution can happen via "--substitute" and "--substitute-file", so behavior can become unpredictable. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.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.
I think this is really good. Thanks.
The only comment i have is that I would suggest processing command line arguments in order rather than always giving precedence to '--substitute' over contents of '--substitute-file'.
That allows the caller to get whatever behavior they want (perhaps they just want to append a '--substitute-file' onto an existing command line with --substitute and have it override).
its not a big thing, due to the "static" nature of the substitute-file, so i'll approve but you're welcome to change that too.
The following: stacker build --substitute a=b,c used to work, until commit 3baba64: fix(ci): convert ci is failing due to perms (project-stacker#439) This squashed PR included 'chore(go.mod): update cli to github.com/urfave/cli/v2'. Switching from urfave/cli/v1 to v2 changes string slice flag behavior to automatically split on commas. Luckily there is an app.DisableSliceFlagSeparator flag we can set to tell it not to do that. Set that flag. And add a test for this. Signed-off-by: Serge Hallyn <shallyn@cisco.com>
The following: stacker build --substitute a=b,c used to work, until commit 3baba64: fix(ci): convert ci is failing due to perms (project-stacker#439) This squashed PR included 'chore(go.mod): update cli to github.com/urfave/cli/v2'. Switching from urfave/cli/v1 to v2 changes string slice flag behavior to automatically split on commas. Luckily there is an app.DisableSliceFlagSeparator flag we can set to tell it not to do that. Set that flag. And add a test for this. Signed-off-by: Serge Hallyn <shallyn@cisco.com>
The following: stacker build --substitute a=b,c used to work, until commit 3baba64: fix(ci): convert ci is failing due to perms (#439) This squashed PR included 'chore(go.mod): update cli to github.com/urfave/cli/v2'. Switching from urfave/cli/v1 to v2 changes string slice flag behavior to automatically split on commas. Luckily there is an app.DisableSliceFlagSeparator flag we can set to tell it not to do that. Set that flag. And add a test for this. Signed-off-by: Serge Hallyn <shallyn@cisco.com>
What type of PR is this?
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.