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
enhance put.inputs detect to ingore prefixed . and .. #6705
Conversation
Signed-off-by: Chao Li <chaol@vmware.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.
Could you add a test for this in put_step_test.go
concourse/atc/exec/put_step_test.go
Lines 343 to 348 in 523345c
Context("when the inputs are detected", func() { | |
BeforeEach(func() { | |
putPlan.Inputs = &atc.InputsConfig{ | |
Detect: true, | |
} | |
}) |
One question that I still have after reading the issue; why would you put ../
as the path? Is this a quirk of the resource the put
step represents in this instance? I'm worried that allowing users to specify ../
as the start of their path will confuse them when they try to think about how Concourse makes the inputs available to the resource.
In the issue you gave this as the example
- put: some-resource
params:
file: ./build/some-file
vars: ../vars/some-var-file
So in the resource container, it's expected that both build
and vars
will be available at the same point in the filesystem.
/tmp/inputs
├── build
└── vars
Whereas the ../
syntax makes it seem like the artifact structure will look like:
/tmp
├── vars
└── inputs
└── build
Are you able to explain why ../
?
@taylorsilva Sure. I should have left a comment to say that, I planned to add new tests, just haven't got bandwidth to work on that yet. I'll add tests soon. |
@taylorsilva I can list all 3 issues reported by our users after they adding
- put: img
params:
build: ./outputs
dockerfile: ./outputs/Dockerfile I asked the user to fix the problem by removing
- put: app
params:
path: auth
vars_files:
- ../vars/vars.yml
# other params I didn't check source code of
- put: docker-image
params:
build: "."
dockerfile: "source/Dockerfile"
tag_file: version/version
# other params The user fixed the error by changing |
Signed-off-by: Chao Li <chaol@vmware.com>
Signed-off-by: Chao Li <chaol@vmware.com>
I'm not at all familiar with the cf resource either. Not sure why they'd have to do that. I'm fine with keeping |
This reverts commit 4006cb7. Signed-off-by: Chao Li <chaol@vmware.com>
Signed-off-by: Chao Li <chaol@vmware.com>
Signed-off-by: Chao Li <chaol@vmware.com>
89e288b
to
0786b01
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.
Thanks Evan! LGTM
Bug Fix | Feature | Documentation
closes #6704 .
Changes proposed by this PR:
Ignore prefixed
.
and..
of put param paths.Notes to reviewer:
Release Note
Enhanced
put.inputs
:input: detect
now can handle paths prefixed by.
and..
.Contributor Checklist
Reviewer Checklist
BOSH and
Helm packaging; otherwise, ignored for
the integration
tests
(for example, if they are Garden configs that are not displayed in the
--help
text).