fix(deployments): prevent false-positive redeploy domain warning - #861
Open
chbndrhnns wants to merge 1 commit into
Open
chbndrhnns wants to merge 1 commit into
chbndrhnns wants to merge 1 commit into
Conversation
…ien#858) - Check project and service domain rows in redeploy unreachable services check - Support multi-route publicEndpoints on services - Direct user to Domains tab in warning modal action and suggested fix copy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a false-positive "No public domain is connected" warning modal when redeploying multi-service (compose) projects that already have connected and verified domains.
Motivation
When clicking Redeploy on a multi-service stack,
handleRedeploychecksshouldWarnAboutUnreachableServices(services). The previous implementation ofhasConnectedDomainonly checked the legacy scalar propertiesservice.customDomainandservice.domainon theServicerecord. It ignored:domaintable (domainsData.domains) bound to the service viaserviceIdortargetPort, as well as project-level domains.service.publicEndpoints.service.name).This falsely showed the "No public domain is connected" modal on stacks that are already publicly reachable via the edge proxy. Additionally, the modal button and suggested fix copy directed users to the Services tab ("Open the Services tab. Pick the service that should be public. Enable domain exposure..."), even though domain routing is managed in the Domains tab.
Related issue
Closes #858
Changes
apps/dashboard
Deployments.tsx: PassdomainsData.domainstoshouldWarnAboutUnreachableServicesand accurately count unrouted candidate services. Update the modal primary action button to navigate to the Domains tab (setActiveTab("domains")).redeploy-unreachable-warning.ts: Extract and generalize service reachability logic. A service is considered connected if:domainsmatches byserviceId,targetPort, or project-level assignment.publicEndpointsdefines a valid custom or free domain.customDomainordomainis set.redeploy-unreachable-warning.test.ts: Add 13 unit tests covering port matching syntax (container port, host:container, protocol suffixes), domain linking variants, and stack warning conditions.Sidebar.tsx: UpdatehasConnectedDomainin the deploy wizard to also supportservice.publicEndpoints.locales/*/projects.json: AddopenDomainstranslation and updatefixStep1-3across all 9 supported locales to point to the Domains tab.Verification
vitest run src/app/(dashboard)/projects/[id]/components/redeploy-unreachable-warning.test.ts(13/13 passed).bun run lint(tsc --noEmit) inapps/dashboard(clean exit, 0 errors).bun test src/i18n/i18n-parity.test.ts(3/3 passed, 0 drift).Checklist
bun run test,bun run --cwd <workspace> lintpass locally