-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Cloudflare Preview sets an alias for long branch names #4308
Comments
Related issues on the CF side: cloudflare/workers-sdk#2410, cloudflare/workers-sdk#7547. Here's also a description of how the alias generating function works: https://community.cloudflare.com/t/algorithm-to-generate-a-preview-dns-subdomain-from-a-branch-name/477633/2 |
Thanks Marcel, that's very helpful! Since we now know the alias function, the most straightforward fix would be to use the same function for creating the staging server name (or an even simpler version than what CF uses - i.e. truncating after 28 characters instead of 50), ensuring it doesn't get modified by CF. My only concern is having that function duplicated across multiple places and languages... but it's not going be worse than what we currently have. |
We could add a check on push if our branch names are longer than 28 characters? Seems like the easiest would be to just ensure this as a convention? Suggest to close this issue - what do you think, @Marigold |
Fixed by truncating branch names to 28 characters, just as CF does. |
Description
Staging servers deployed to Cloudflare Preview are not always hosted on
https://[branch].owid.pages.dev
as one would expect, but if the branch name is too long, CF creates a shorter alias for it. For instancehttps://download-api-add-filter-information.owid.pages.dev/
becomes
https://download-api-add-filter-info.owid.pages.dev/
This is not easily fixable, because the alias is known only after deploying the preview, and we need it for
BAKED_BASE_URL
in baking.Potential solutions
https://[branch].owid.pages.dev
to aliashttps://43c301ed.owid.pages.dev
(the link wouldn't be persistent then...)The text was updated successfully, but these errors were encountered: