Skip to content

feat(platform): send manifest feature dependencies on app release. - #351

Open
nmolham-godaddy wants to merge 2 commits into
godaddy:mainfrom
nmolham-godaddy:feat/release-feature-dependencies
Open

nmolham-godaddy wants to merge 2 commits into
godaddy:mainfrom
nmolham-godaddy:feat/release-feature-dependencies

Conversation

@nmolham-godaddy

@nmolham-godaddy nmolham-godaddy commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

gddy platform app release never sent feature dependencies to App Registry. release.rs hardcoded feature_dependencies: None, so [[dependencies]] feature entries in godaddy.toml were parsed and validated, then dropped. Feature entries also had no way to state the dependency: they carried { name, version }, while createRelease expects { name, state } with state one of REQUIRED | EXCLUDED | ENABLED | DISABLED.

As a result, an app could not declare features through the CLI, and App Registry's storeFeatures(storeId) query could not report them.

Related to https://github.com/gdcorp-commerce/app-registry-api/pull/274

Changes

  • Manifest schema. [[dependencies]].feature entries are now { name, state }. state accepts the App Registry FeatureDependencyState values, written in upper case in TOML. App dependencies ([[dependencies]].app) are unchanged.

    [[dependencies]]
    feature = [{ name = "automations", state = "ENABLED" }]
    
  • Local validation. An unknown state fails when the manifest is read. A feature name declared more than once, including across separate [[dependencies]] blocks, is rejected before any API call. The API rejects duplicates too; failing locally gives a clearer message. Feature names are not checked against App Registry's feature list, which lives in App Registry; the API still rejects unknown names.

  • Release mapping. New build_feature_dependencies maps manifest entries to FeatureDependencyInput, and createRelease now receives them. The generated client already had these types, so no schema refresh or regeneration was needed. Most of the release.rs diff is cargo fmt re-indenting the manifest match after its tuple gained an element.

Compatibility

  • A feature entry with version and no state no longer parses. Such entries were never sent before, so no release that worked before behaves differently, but those manifests need state added.
  • A release with no feature dependencies now sends featureDependencies: [] instead of omitting the field. That stores no feature dependencies, the same as before; the field can be left out when the list is empty if reviewers prefer.

Tests

  • parse_rejects_unknown_feature_dependency_state
  • validate_rejects_duplicate_feature_dependency_across_blocks
  • build_feature_dependencies_maps_manifest_entries: from a TOML manifest through load_manifest to the mapped input, checking names, states and order.

Verification

cargo check --workspace
cargo clippy --workspace -- -D warnings
cargo test --workspace
cargo fmt --check
./rust/scripts/check-module-size.sh

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.

🟢 Approval recommended

The schema, validation, and release mapping are consistent with the API contract, with no blocking issues identified in static review.

No open issues 🎉

What changed in this PR

This PR connects manifest feature dependencies to app releases, so the CLI sends declared features instead of dropping them.

Changes:

  • Replaces feature dependency version with a required state; existing feature entries need migration.
  • Rejects unknown states and duplicate feature names locally.
  • Maps feature dependencies into the release request and adds parsing, validation, and mapping tests.
File Description
rust/​src/​platform/​app/​commands/​release.rs Sends feature dependencies in release requests and tests the mapping.
rust/​src/​config/​tests.rs Tests rejection of unknown states and duplicate feature names.
rust/​src/​config/​mod.rs Defines feature dependency states and validates name uniqueness.

Review effort: Balanced

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.

2 participants