Skip to content

fix dockerfile path resolution #9872

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

Merged
merged 5 commits into from
Jul 7, 2025
Merged

fix dockerfile path resolution #9872

merged 5 commits into from
Jul 7, 2025

Conversation

emily-shen
Copy link
Contributor

Fixes DEVX-2036

  • resolves the dockerfile path relative to the wrangler config path, falling back on the cwd.
  • also extracts containers deploy tests out of the really really big deploy.test.ts file because working with a 14,000 line file is not fun. also consolidates mocks that are repeated in the container deploy tests.
  • i would like to add a test for dev as well, but we already have this PR: add container rebuild hotkey + dev cleanup tests #9728 which was actually dependent on this path resolution being fixed. this bug is blocking quite a few things, so i'll leave the dev test for that PR. I have manually verified this behaviour is fixed in dev - you can easily test it by running wrangler dev -c ../container-app/wrangler.jsonc from a random fixture.

please review by commit

The long term solution should be to normalise the config so that it passes around the absolute path for the dockerfile. This would require some containers config refactoring, which we are doing in a separate follow up PR.

  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: new feature

@emily-shen emily-shen requested review from a team as code owners July 7, 2025 11:56
Copy link

changeset-bot bot commented Jul 7, 2025

🦋 Changeset detected

Latest commit: 20027bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@cloudflare/containers-shared Patch
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

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

@emily-shen emily-shen added the skip-v3-pr Skip validation of presence of a v3 backport PR label Jul 7, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jul 7, 2025
Copy link
Contributor

github-actions bot commented Jul 7, 2025

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main emily/isdockerfile-bug might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-9872
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

Copy link

pkg-pr-new bot commented Jul 7, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@9872

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@9872

miniflare

npm i https://pkg.pr.new/miniflare@9872

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@9872

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@9872

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@9872

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@9872

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@9872

wrangler

npm i https://pkg.pr.new/wrangler@9872

commit: 20027bf

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jul 7, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 7, 2025
@petebacondarwin petebacondarwin added this pull request to the merge queue Jul 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 7, 2025
@petebacondarwin petebacondarwin added this pull request to the merge queue Jul 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 7, 2025
@emily-shen emily-shen added this pull request to the merge queue Jul 7, 2025
Merged via the queue into main with commit a727db3 Jul 7, 2025
40 of 43 checks passed
@emily-shen emily-shen deleted the emily/isdockerfile-bug branch July 7, 2025 15:19
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jul 7, 2025
@workers-devprod workers-devprod mentioned this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-v3-pr Skip validation of presence of a v3 backport PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants