-
Notifications
You must be signed in to change notification settings - Fork 1k
containers: update push and build to resolve the correct uri #10623
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
Conversation
🦋 Changeset detectedLatest commit: 19e753d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the Depending on your changes, running Notes:
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
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.
this is much nicer, thanks :)
should we do anything to wrangler containers build -p
for consistency?
Good call. I added that in the latest commit. |
dc8a847
to
f125331
Compare
} catch { | ||
return image; | ||
// not a valid url so assume it is in the format image:tag and pre-pend the registry | ||
return getCloudflareRegistryWithAccountNamespace(accountId, image); |
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.
What if image is a file path, like ./Dockerfile
?
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.
It really should never be since this is only called before pushing an image.
I'm not sure if the function should be changed to deal with that or just change the name to be more reflective of what it is used for. WDYT?
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 fine as is then, thanks for clarifying.
2756e4a
to
4767a79
Compare
4767a79
to
9555cd6
Compare
Before it was possible to get incorrect/confusing uris for images pushed with containers push. Example: containers push registry.cloudflare.com/image:tag would become registry.cloudflare.com/<accountid>/registry.cloudflare.com/image:tag. This change modifies resolveImageName to behave like: image:tag -> prepend registry.cloudflare.com/accountid/ registry.cloudflare.com/image:tag -> registry.cloudlfare.com/accountid/image:tag registry.cloudflare.com/accountid/image:tag -> no change anyother-registry.com/anything -> no change
Before it was possible to get incorrect/confusing uris for images built with containers build -p. Example: containers build -p -t registry.cloudflare.com/image:tag . would become registry.cloudflare.com/<accountid>/registry.cloudflare.com/image:tag. This change modifies build to use resolveImageName which handles these cases.
Except when we are pushing to our registry.
9555cd6
to
19e753d
Compare
Before it was possible to get incorrect/confusing uris for images pushed with containers push and build.
Example:
containers push registry.cloudflare.com/image:tag would become registry.cloudflare.com//registry.cloudflare.com/image:tag.
This change modifies resolveImageName to behave like:
Fixes #CC-6029