Repository navigation
feat(platform-app): set an application's distribution type on init and update - #372
Open
rneudorf-godaddy wants to merge 4 commits into
Open
rneudorf-godaddy wants to merge 4 commits into
rneudorf-godaddy wants to merge 4 commits into
Conversation
…d update Add `--distribution-type <public|private>` to `platform app init` and `platform app update`. On init the field is sent only when given, so the registry default applies otherwise; on update it counts toward the at-least-one group so a type-only change works. `custom` is never accepted. `deploy` still sends no distribution type. `distributionType` is now selected in the Application, ApplicationsList, CreateApplication and UpdateApplication operations and included in the `info`, `list`, `init` and `update` output. Regenerates the vendored App Registry schema so `DistributionType` includes `PRIVATE`; the pulled schema also adds `scopes` to `MutationCreateReleaseInput`, which the release commands now leave unset. DEVX-1779 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The flag help incorrectly equates public distribution with marketplace listing, and the output schema requires distributionType even though the supported --from-existing path omits it.
2 open issues
What changed in this PR
Adds application distribution controls to the CLI, allowing developers to choose public or private distribution during creation or updates while preserving registry defaults when omitted.
Changes:
- Adds validated
--distribution-typeflags, help text, and request serialization. - Exposes distribution type in application queries and command output.
- Refreshes registry schemas and updates tests, including a safeguard that deploy requests omit distribution type.
| File | Description |
|---|---|
rust/src/platform/app/commands/validate.rs |
Updates application test fixtures. |
rust/src/platform/app/commands/update.rs |
Adds distribution updates, help, and tests. |
rust/src/platform/app/commands/schemas.rs |
Declares distribution type in output schemas. |
rust/src/platform/app/commands/release/native_extension.rs |
Adds unset release scopes to fixtures. |
rust/src/platform/app/commands/release.rs |
Leaves new release scopes unset. |
rust/src/platform/app/commands/mod.rs |
Registers the shared distribution module. |
rust/src/platform/app/commands/list.rs |
Displays distribution type by default. |
rust/src/platform/app/commands/init.rs |
Adds distribution selection, output, and tests. |
rust/src/platform/app/commands/info.rs |
Adds the flag to update guidance. |
rust/src/platform/app/commands/distribution_type.rs |
Defines accepted values and API conversions. |
rust/src/platform/app/commands/deploy/mod.rs |
Tests omission of distribution type. |
rust/src/platform/app/commands/add/native_extension.rs |
Updates application response fixtures. |
rust/src/platform/app/commands/add.rs |
Updates application response fixtures. |
rust/src/platform/app/client_tests.rs |
Adapts client fixtures to schema changes. |
rust/schemas/api/manifest.json |
Refreshes the generation timestamp. |
rust/schemas/api/app-registry.json |
Refreshes the registry API catalog. |
rust/platform-app-client/src/lib.rs |
Updates client response fixtures. |
rust/platform-app-client/graphql/UpdateApplication.graphql |
Requests distribution type after updates. |
rust/platform-app-client/graphql/schema.graphql |
Adds PRIVATE and upstream schema changes. |
rust/platform-app-client/graphql/CreateApplication.graphql |
Requests distribution type after creation. |
rust/platform-app-client/graphql/ApplicationsList.graphql |
Requests distribution type for lists. |
rust/platform-app-client/graphql/Application.graphql |
Requests distribution type for application details. |
Review effort: Balanced
RUSTSEC-2026-0538: the 0.5.15 receive loop can spin after a truncated datagram on Apple and BSD targets. The audit check fails on every PR until the lockfile moves to a patched version. DEVX-1779 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…m-existing The ApplicationWithLatestRelease query did not select distributionType, so `platform app import` and `init --from-existing` (which forwards to import) returned no distribution type, while `init`'s output schema declares the field as required. Select it in the query and include it in import's result, table view and output schema. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rneudorf-godaddy
force-pushed
the
DEVX-1779/app-distribution-type
branch
from
November 16, 2026 19:17
fc1ba9a to
ae5f51f
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
rneudorf-godaddy
marked this pull request as ready for review
November 16, 2026 19:31
rneudorf-godaddy
requested review from
axburgess-godaddy,
jpage-godaddy,
jpearlman-godaddy,
mguerrero3-godaddy,
qcai-godaddy,
rts1-godaddy,
sgopalan-godaddy,
smukherjee-godaddy and
wcole1-godaddy
as code owners
November 16, 2026 19:31
jpage-godaddy
approved these changes
Nov 16, 2026
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
--distribution-type <public|private>togddy platform app initandgddy platform app update, and prints each application's distribution type frominfo,list,initandupdate.Issue: DEVX-1779
Details
The CLI never sent or read
distributionType, soinitalways took the registry default andupdatecould not change it. The registry is moving new applications to private by default, and without this flag the CLI would have no way to create or make an application public.initthe field is sent only when the flag is given, so the registry default still applies otherwise. The flag conflicts with--from-existing, which creates nothing.updatethe flag counts toward the at-least-one group, soupdate --id <id> --distribution-type publicworks alone. An unset flag is left out of the request, as before.customis a deprecated registry value and is never accepted; any value other thanpublicorprivatefails argument parsing before a request is sent.deploystill sends no distribution type, and the value is not written togodaddy.toml, so a deploy never changes who can install an application.updatelong help and theinfonext-action hint mention the flag, and the help says moving an application to private deactivates its active marketplace listing.The vendored App Registry schema is regenerated with
cargo run -p generate-api-catalogsoDistributionTypeincludesPRIVATE. The generator readsapis/graphql/schema.graphqlfrom app-registry-api, and the copy onmainwas last synced on Nov 3 (#357), so the run also brings in these registry changes. This PR uses none of them:scopesonMutationCreateReleaseInputandApplicationRelease. The release commands and their tests set it toNoneso the generated struct literals compile; no release scopes are sent.entityIdfilter argument onenablementsByRelease.authorizationScopesonMutationCreateApplicationInputandMutationUpdateApplicationInputis deprecated in favor of per-release scopes. The CLI still sendsauthorizationScopes; moving to release scopes is a separate change.CUSTOMis marked deprecated inDistributionType.Only the app-registry outputs of that run are committed; drift in the other domains' specs is left for a separate resync.
Release ordering: merging this PR is safe at any time, but do not publish a
gddyrelease that includes it until gdcorp-commerce/app-registry-api#316 is merged. That change is what makesupdateApplicationdeactivate an application's active marketplace listing when it moves toPRIVATE; until it ships, the registry acceptsPRIVATEwithout deactivating the listing, and the help text here would overstate the behavior. The release should then go out before the registry switches new applications to private by default, soinit --distribution-type publicis available when that happens.QA
Setup
gddyfrom this branch, switch to OTE, log in, and create an application you own in a scratch folder. The comment also expands each step below with the exact commands.Steps
gddy platform app update --id <id> --distribution-type custominvalid value 'custom'and listspublic, private; no request is sentgddy platform app update --id <id> --distribution-type privatedistributionType: PRIVATEgddy platform app info --name <name>andgddy platform app listdistributionTypegddy platform app init --name <name> ... --distribution-type publicdistributionType: PUBLICgddy platform app deploy --name <name>on an application set to privateBefore merge
🤖 Generated with Claude Code