-
Notifications
You must be signed in to change notification settings - Fork 1k
Parse hostname from image name #11036
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: bc5043c The changes in this PR will be included in the next version bump. 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 |
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: |
Move `parseImageName` out of `wrangler` and into `containers-shared`, and parse the hostname separately from the name of the image. See the new test cases for examples.
faed993 to
bc5043c
Compare
| "@cloudflare/containers-shared": minor | ||
| "wrangler": minor |
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.
| "@cloudflare/containers-shared": minor | |
| "wrangler": minor | |
| "@cloudflare/containers-shared": patch | |
| "wrangler": patch |
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.
Since this deletes an exported function from wrangler shouldn't it be a new minor version?
Or perhaps we should keep a stub for parseImageName in Wrangler that just calls the one in containers-shared to avoid any breaking changes.
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 thought we were keeping containers changes as patches since it's still beta, but I'm not certain. @emily-shen might know?
I don't see any reason to keep the stub, I like the way it's structured currently, it feels like this belongs in containers-shared
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.
its only importable from within wrangler, it was never exposed as part of wranglers public api. so no breaking changes :)
| } { | ||
| const matches = value.match(imageRe); | ||
| if (matches === null) { | ||
| throw new Error( |
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 we added a UserError to containers shared (prevents the error showing up in wrangler's sentry)
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.
should we also be using this parsing in resolveImageName
Move
parseImageNameout ofwranglerand intocontainers-shared, and parse the hostname separately from the name of the image. See the new test cases for examples.