-
Notifications
You must be signed in to change notification settings - Fork 925
Build containers without account ID #9765
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
Build containers without account ID #9765
Conversation
🦋 Changeset detectedLatest commit: ec6bd2e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
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.
hey thanks so much for the contribution! are you able to add a test and a changeset? you can find more details in our contributing guide: https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#testing but feel free to ask here as well if you get stuck :)
@emily-shen I tested manually, it fixes the issue I had 😅 |
@emily-shen check it again please |
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: |
CI Failures - Unrelated to Container FixThe CI failures appear to be flaky test issues unrelated to the container dry-run changes: Main Fix Status ✅The core wrangler test suite passed (325/325 tests), including the new test for the container URL parsing fix. Failed Tests (Infrastructure Issues)
These test different components (test infrastructure, CLI scaffolding, dev session communication) than the container deployment code I modified. Success rate: 91/95 test suites passed (95.8%) Could someone re-run the failed jobs? The container dry-run URL parsing fix is working correctly. |
The C3 tests will always fail right now due to this PR being on a fork. The other failures are probably just flakes. |
I'll rebase and rerun once we fix the C3 tests. |
5f0186b
to
4ccb4cc
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.
I'd like to suggest an alternative approach.
Right now, we don't fill out the OpenAPI configuration when we use dry run mode. This is actually a nice property because it gives us a kind of soft-guarantee that we won't interact with the API in dry run mode.
As you found, this breaks because buildAndMaybePush
loads the user account limits using the API, even in dry run mode. However, it only does this to validate disk limits on the account before pushing.
I suggest changing buildAndMaybePush
to only load the account and call ensureDiskLimits
when dry run mode is disabled. That lets us maintain the property that we do not fill out the OpenAPI configuration in dry run mode and should only require changing buildAndMaybePush
, which will be a much smaller and tighter scoped change.
90b987c
to
e33d7f1
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.
I've rebased on main and implemented the changes I suggested.
Thanks @hasip-timurtas for the issue report and initial work on this. Apologies for hijacking your PR, but in this case it was much faster to do it myself rather than go back and forth via GitHub. Thanks very much for your contribution :)
b013b57
to
1aa04e3
Compare
This allows us to build containers in dry run mode. When we push the container to the managed registry, we re-tag it to include the account ID. We only ever push when not in dry run mode though, so when pushing we can safely grab the account information. Co-authored-by: Hasip Timurtaş <[email protected]>
Even in dry run mode we should check that Docker is installed, because dry run mode uses docker commands too.
8ce4ad3
to
ec6bd2e
Compare
Congratulations @hasip-timurtas, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmcw0m11w198807leui0ol2cf This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
This allows us to build containers in dry run mode. When we push the container to the managed registry, we re-tag it to include the account ID. We only ever push when not in dry run mode though, so when pushing we can safely grab the account information.
Related: #9813, #9811