Self-hosted prep + domain unification#234
Open
rakshith-ravi wants to merge 6 commits into
Open
Conversation
a87f2ab to
c925394
Compare
c925394 to
6a96036
Compare
- add cloud Cargo feature and VITE_CLOUD_MODE flag; cfg-gate Cloudflare, Turnstile and GitHub OAuth behind them - configurable BASE_DOMAIN / DEPLOYMENT_DOMAIN / REGISTRY_DOMAIN replacing hardcoded patr.cloud / onpatr.cloud - unify domain handling: drop DNS-record models and routes, fold into add/delete/list/get domain - drop unused declare_app_route macro - regen sqlx offline cache
- registry path uses literal "registry" on self-hosted: cfg-gated path field type (Uuid on cloud, RegistryNamespace ZST elsewhere) and the handlers resolve it to the singleton workspace via inline query - create_workspace returns FeatureNotSupported on self-hosted - frontend: sidebar workspace switcher is lazy + cloudOnly so it tree-shakes out, /workspace/new and /onboard 404 on self-hosted, deployment image names use the literal "registry" namespace - new m004_unify_domains migration drops patr_domain_dns_record, patr_controlled_domain, user_controlled_domain, the nameserver_type column, and the DNS_RECORD_TYPE / DOMAIN_NAMESERVER_TYPE enums - sqlx prepare moved into a Justfile recipe that merges cloud and no-default-features query sets into one .sqlx/ cache - preprocess bumped to 0.5.11 to keep cfg attrs on macro fields - onboarding: onboard.tsx invalidates the workspaces query before navigating away, _workspaced gates its redirect on isFetching too and clears the stored workspace id when it no longer matches anything
- new GetApiEnvironment endpoint at /api/info: version + deploymentType,
plus baseDomain on self-hosted; cloud bundle ignores it
- frontend pulls baseDomain from /api/info via useApiEnvironmentQuery, shows
it as the CNAME ingress hint on self-hosted ("Loading..." until fetched);
cloud still uses ingress.{DEPLOYMENT_DOMAIN}
- new RegistryConfig {service, realm} replaces the hardcoded Bearer
challenge; RegistryRequestParserLayer now takes state
- docker_login returns 200 OK instead of 202 so docker/crane clients accept
the token (was breaking the whole push flow)
- 4 registry handlers (upload_chunk, complete_upload, get_upload_status,
manifest/put) now echo the client's original namespace in the Location
header instead of leaking the resolved workspace UUID on self-hosted
- bindings: drop the orphaned DnsRecord / NameserverType types after the
domain unification, add DeploymentType + GetApiEnvironmentResponse, drop
the nameserverType column from the domains list
- test Justfile augments api.sample.json with cloud-only fields via jq so
the cloud-default `cargo run --bin api -- --migrate` step finds them
- gate create_account/complete_sign_up behind the cloud feature, and 404 the sign-up + confirm-signup routes and hide the sign-up link on self-hosted - gate forgot/reset password turnstile for non-cloud and match the new IpAddr validate_turnstile_token signature - drop nameserver_type from the api + e2e domain tests after domain unification - build the e2e frontend in cloud mode and add the base_domain + registry config the cloud suite now requires - regenerate the bindings barrel
6a96036 to
aaa552f
Compare
…orkspace name index - drop dead DNS-record test TODOs, nameserver_type doc-comments, unused DNS_RECORD_NAME_REGEX - validate is-name-available against RESOURCE_NAME_REGEX and filter soft-deleted names - add search_for_user min-length + LIMIT 5 tests and an /api/info test - simplify workspace_uq_name from LOWER(name) to (name) (CITEXT already folds case) + migration
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.
cloudCargo feature and aVITE_CLOUD_MODEflag, with Cloudflare, Turnstile and GitHub OAuth all cfg-gated behind themdeclare_app_routemacro