Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: use CRC32 to shorten app subdomain #9645

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 2 commits into from
Sep 12, 2023
Merged

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Sep 12, 2023

Fixes: #8145

This PR fixes the bug in application URL generation and uses CRC32 instead of the subdomain exceeding the character limit.

Now: 0123456789012345678901234567890123456789--agent--workspace--user
After merge: app-90667f72

Note: I know that there was an idea to use agent ID, but as long as the ID may change anytime it might be harder to bookmark it. CRC32 seems to be a stable solution.

@mtojek mtojek self-assigned this Sep 12, 2023
@mtojek mtojek changed the title Use CRC32 to shorten subdomain fix: use CRC32 to shorten subdomain Sep 12, 2023
@mtojek mtojek changed the title fix: use CRC32 to shorten subdomain fix: use CRC32 to shorten app subdomain Sep 12, 2023
@mtojek mtojek requested a review from johnstcn September 12, 2023 14:43
@mtojek mtojek marked this pull request as ready for review September 12, 2023 14:43
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

👍 Even though this would technicallly break some existing bookmarks greater than the length cutoff, they could not have worked properly anyway.

@mtojek mtojek merged commit 0e28397 into main Sep 12, 2023
@mtojek mtojek deleted the 8145-prevent-long-subdomains-3 branch September 12, 2023 15:11
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workspace name too long for coder_app
2 participants