-
Notifications
You must be signed in to change notification settings - Fork 1k
Adds the --force-subdomain-deploy flag to the wrangler triggers deploy command
#10549
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| "wrangler": minor | ||
| --- | ||
|
|
||
| Adds the `--force-subdomain-deploy` flag to the `wrangler triggers deploy` command. | ||
|
|
||
| Wrangler will sometimes skip the API call if the config file matches | ||
| the remote state. The flag lets us skip this behavior, and force the | ||
| subdomain deployment. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ type Props = { | |
| legacyEnv: boolean | undefined; | ||
| dryRun: boolean | undefined; | ||
| assetsOptions: AssetsOptions | undefined; | ||
| forceSubdomainDeploy?: boolean; | ||
| }; | ||
|
|
||
| export default async function triggersDeploy( | ||
|
|
@@ -90,7 +91,8 @@ export default async function triggersDeploy( | |
| envName, | ||
| workerUrl, | ||
| routes, | ||
| deployments | ||
| deployments, | ||
| props.forceSubdomainDeploy ?? false | ||
| ); | ||
|
|
||
| if (!wantWorkersDev && workersDevInSync && routes.length !== 0) { | ||
|
|
@@ -315,7 +317,8 @@ async function subdomainDeploy( | |
| envName: string, | ||
| workerUrl: string, | ||
| routes: Route[], | ||
| deployments: Array<Promise<string[]>> | ||
| deployments: Array<Promise<string[]>>, | ||
| forceSubdomainDeploy: boolean | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need to add an arg, given that we pass
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like it is good to be explicit about forcing here. I want to get rid of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please reconsider this for now? You can still explicitly pass |
||
| ) { | ||
| const { config } = props; | ||
|
|
||
|
|
@@ -375,7 +378,7 @@ async function subdomainDeploy( | |
|
|
||
| // Update subdomain enablement status if needed. | ||
|
|
||
| if (!allInSync) { | ||
| if (!allInSync || forceSubdomainDeploy) { | ||
| await fetchResult(config, `${workerUrl}/subdomain`, { | ||
| method: "POST", | ||
| body: JSON.stringify({ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.