-
Notifications
You must be signed in to change notification settings - Fork 957
Fix Coder apps with long hostname DNS validation and add informative user tooltips #19251
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
base: main
Are you sure you want to change the base?
Conversation
@matifali 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Co-authored-by: matifali <10648092+matifali@users.noreply.github.com>
@copilot can we add a tooltip to show when this happens to educate the user why the app is unhealthy? |
Co-authored-by: matifali <10648092+matifali@users.noreply.github.com>
Added informative tooltip for hostname length validation! When workspace apps are unhealthy due to DNS hostname segment length limits (>63 characters), users now see "App name too long for DNS hostname. Please use a shorter app name, workspace name, or username." instead of the generic "Unhealthy" message. The implementation detects hostname length issues on the frontend and provides clear guidance on how to resolve them. Here's the visual comparison: Commit: 179e1f9 |
Problem
Coder workspace apps with long hostnames were failing silently due to DNS hostname segment length limitations (63 characters per RFC 1035). When the combined length of app name + agent name + workspace name + username exceeded the DNS limit in any segment, apps would return empty responses without any user-visible indication of the problem.
The hostname format is:
{APP_SLUG}--{AGENT_NAME}--{WORKSPACE_NAME}--{USERNAME}
Solution
This PR adds hostname length validation during the workspace app conversion process and marks apps as "unhealthy" when they exceed DNS limits, replacing silent failures with clear visual feedback and educational tooltips.
Key Changes
validateAppHostnameLength
) that checks each hostname segment against the 63-character DNS limitApps()
conversion function to set health tounhealthy
when hostname segments are too longUser Experience Enhancement
Before this fix, users would see apps marked as "unhealthy" with no explanation. Now they receive clear, educational tooltips:
Example Behavior
Testing
Users will now see workspace apps with hostname length issues marked as "unhealthy" in the UI with clear guidance on how to resolve the problem, instead of experiencing silent failures.
Fixes #15178.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.