Skip to content
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

fix: toggle workers.dev subdomains only when required #836

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

threepointone
Copy link
Contributor

This fix -

  • passes the correct query param to check whether a workers.dev subdomain has already been published/enabled
  • thus enabling it only when it's not been enabled
  • it also disables it only when it's explicitly knows it's already been enabled

The effect of this is that publishes are much faster.

This fix -

- passes the correct query param to check whether a workers.dev subdomain has already been published/enabled
- thus enabling it only when it's not been enabled
- it also disables it only when it's explicitly knows it's already been enabled

The effect of this is that publishes are much faster.
@changeset-bot
Copy link

changeset-bot bot commented Apr 23, 2022

🦋 Changeset detected

Latest commit: adf7a77

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

This PR includes changesets to release 1 package
Name Type
wrangler 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

@github-actions
Copy link
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2213087294/npm-package-wrangler-836

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/836/npm-package-wrangler-836

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2213087294/npm-package-wrangler-836 dev path/to/script.js

workerUrl,
{
method: "PUT",
body: createWorkerUploadForm(worker),
},
new URLSearchParams({ available_on_subdomain: "true" })
new URLSearchParams({ include_subdomain_availability: "true" })
Copy link
Contributor

Choose a reason for hiding this comment

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

I can confirm that this is the correct parameter (by looking at the internal code). But it is worrying that this does not appear in our API docs, as far as I can tell.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a documented api, I found it on an internal wiki, I don't think it ever went public.

@threepointone threepointone merged commit 28e3b17 into main Apr 25, 2022
@threepointone threepointone deleted the fix-worker-dev-subdomain-toggle branch April 25, 2022 06:11
@threepointone
Copy link
Contributor Author

Hrmm GitHub is rate limiting right now, dunno why. I'll retry CI in a few minutes

@github-actions github-actions bot mentioned this pull request Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants