Skip to content

feat(platform-app): set an application's distribution type on init and update - #372

Open
rneudorf-godaddy wants to merge 4 commits into
mainfrom
DEVX-1779/app-distribution-type
Open

rneudorf-godaddy wants to merge 4 commits into
mainfrom
DEVX-1779/app-distribution-type

Conversation

@rneudorf-godaddy

@rneudorf-godaddy rneudorf-godaddy commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds --distribution-type <public|private> to gddy platform app init and gddy platform app update, and prints each application's distribution type from info, list, init and update.

Issue: DEVX-1779

Details

The CLI never sent or read distributionType, so init always took the registry default and update could 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.

  • On init the 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.
  • On update the flag counts toward the at-least-one group, so update --id <id> --distribution-type public works alone. An unset flag is left out of the request, as before.
  • custom is a deprecated registry value and is never accepted; any value other than public or private fails argument parsing before a request is sent.
  • deploy still sends no distribution type, and the value is not written to godaddy.toml, so a deploy never changes who can install an application.
  • The update long help and the info next-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-catalog so DistributionType includes PRIVATE. The generator reads apis/graphql/schema.graphql from app-registry-api, and the copy on main was last synced on Nov 3 (#357), so the run also brings in these registry changes. This PR uses none of them:

  • scopes on MutationCreateReleaseInput and ApplicationRelease. The release commands and their tests set it to None so the generated struct literals compile; no release scopes are sent.
  • An entityId filter argument on enablementsByRelease.
  • authorizationScopes on MutationCreateApplicationInput and MutationUpdateApplicationInput is deprecated in favor of per-release scopes. The CLI still sends authorizationScopes; moving to release scopes is a separate change.
  • CUSTOM is marked deprecated in DistributionType.

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 gddy release that includes it until gdcorp-commerce/app-registry-api#316 is merged. That change is what makes updateApplication deactivate an application's active marketplace listing when it moves to PRIVATE; until it ships, the registry accepts PRIVATE without 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, so init --distribution-type public is available when that happens.

QA

Setup

  • Follow the Setup walkthrough on DEVX-1779: build gddy from 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

  1. gddy platform app update --id <id> --distribution-type custom
    • Fails with invalid value 'custom' and lists public, private; no request is sent
  2. gddy platform app update --id <id> --distribution-type private
    • Output shows distributionType: PRIVATE
  3. gddy platform app info --name <name> and gddy platform app list
    • Both show the application's distributionType
  4. gddy platform app init --name <name> ... --distribution-type public
    • The created application prints distributionType: PUBLIC
  5. gddy platform app deploy --name <name> on an application set to private
    • The application stays private
  • Checks pass

Before merge

  • This PR makes the appropriate modifications to automated tests or explains why none are needed
  • This PR makes the appropriate modifications to documentation or explains why none are needed
  • This change does not impact usage or expected outputs of covered code
  • I've bumped the AI Assistant framework version if one is available

🤖 Generated with Claude Code

…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>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 19:00
@rneudorf-godaddy rneudorf-godaddy self-assigned this Nov 13, 2026
@rneudorf-godaddy rneudorf-godaddy changed the title Set an application's distribution type on init and update feat(platform-app): set an application's distribution type on init and update Nov 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-type flags, 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

ohryan and others added 2 commits November 13, 2026 16:04
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
rneudorf-godaddy force-pushed the DEVX-1779/app-distribution-type branch from fc1ba9a to ae5f51f Compare November 16, 2026 19:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants