-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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):Pass full URI path to bucket.GetNameAndFilepathFromURI
#2221
Conversation
On version 1.9.0 context fetch from S3 is broken since `url.Parse` requires full path: https://github.com/GoogleContainerTools/kaniko/blob/90e426ba3fde4b72efbcec5f10e4f73963313228/pkg/util/bucket/bucket_util.go#L77 Currently on a --context=s3://my-bucket/my-path/context.tar.gz we would pass only my-bucket/my-path/context.tar.gz which breaks context fetch Closes #2200
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.
Just so I'm sure, this behavior seems to have been in place since it was added in 65d7b0a, 4 years ago.
Does this mean S3 build contexts have just never worked? (Not that surprising since AFAIK there's no test)
Or was there some other more recent change that affected the inputs to GetBuildContext
or the behavior of the S3 build context that broke this?
I believe #2110 changed the way the context is being handled. No longer using |
Ah excellent, thanks for that. This definitely looks like a culprit. |
I've merged the PR, and a new commit-tagged image should be built soon ( However, I'd rather not cut releases without someone at Google around to update image refs if something goes wrong. cc @chuangw6 |
@imjasonh Thanks! Grabbed the commit-tagged image and verified we no longer get this error. |
@chuangw6 Can we get a new release cut? |
Done! https://github.com/GoogleContainerTools/kaniko/releases/tag/v1.9.1. Please see the tags in that release. Thanks! |
Fixes #2200
Description
On version 1.9.0 context fetch from S3 is broken due to
url.Parse
requiring full path:kaniko/pkg/util/bucket/bucket_util.go
Line 77 in 90e426b
Currently when we do
--context=s3://my-bucket/my-path/context.tar.gz
we would pass onlymy-bucket/my-path/context.tar.gz
which breaks context fetch. Tested with S3 but #2200 refersgs://
so passing srcContext for both cases.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.