Add flyte.app.Subdomain for deploy-time subdomain resolution - #1526
Merged
Conversation
Subdomain.from_app_name(app_name, project_domain_suffix="hash"|"default")
produces {app_name}-{hash-of-project-domain} or {app_name}-{project}-{domain},
and Subdomain.from_function(fn) lets users compute the subdomain from the
AppEnvironment and the deployment SerializationContext. Domain.subdomain now
accepts a str or a Subdomain, resolved during app serialization.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KVnRzHRUANmCg7ZsLH6Fah
cosmicBboy
marked this pull request as ready for review
September 3, 2026 19:11
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
Adds a new
flyte.app.Subdomainclass that lets app authors declare a subdomain whose final value is resolved at deploy time, when the deployment project/domain are known.Subdomain.from_app_name(app_name, project_domain_suffix="hash")"hash"(default): subdomain is{app_name}-{hash}, where the hash is the first 8 hex chars of sha256 of"{project}-{domain}"— short, and stable per project/domain."default": subdomain is{app_name}-{project}-{domain}.Subdomain.from_function(fn):fnreceives theAppEnvironmentbeing deployed and the deploymentSerializationContext(project, domain, org, version, ...) and returns the subdomain string, giving users full control. The return value is validated to be a non-empty string.Domain.subdomainnow acceptsstr | Subdomain | None.translate_app_env_to_idl:Subdomaininstances are resolved viaresolve(app_env, serialization_context)before being written into theIngressConfig; plain strings pass through unchanged.Example
Test plan
tests/flyte/app/test_types.py: both constructors, suffix/arg validation, hash stability per project/domain, missing project/domain errors.tests/flyte/app/runtime/test_app_serde.pyverifying the resolved subdomain lands in the ingress config.🤖 Generated with Claude Code
https://claude.ai/code/session_01KVnRzHRUANmCg7ZsLH6Fah