Repository navigation
[API / YAML] Add multiple app store app instances for the same software title - #53320
Conversation
…ware title" from docs-v4.94.0 (#53342) <!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** #47904 Reverts #52928 from `docs-v4.94.0`. That PR put managed app configurations in an `app_store_app.configurations` array. We're taking a different approach — multiple versions (instances) of the same App Store app, with all settings on the version, following #28108. Reverting first so the new spec lands as a clean addition and reads accurately as an API design reference. The new spec is #53320, stacked on this branch. # Checklist for submitter If some of the following don't apply, delete the relevant line. ## Testing - [x] QA'd all new/changed functionality manually ## AI **AI:** Claude Code (claude-opus-5[1m])
rachaelshaw
left a comment
There was a problem hiding this comment.
@marko-lisica did you intend to remove all the stuff about configurations? I remember reviewing a PR adding it the other day, and looks like the base branch changed, so just want to make sure you're not accidentally undoing your work! Feel free to re-request a review if this is ready.
…H with package ID
…-versions-4.94' into marko-lisica/47904-app-store-app-versions-4.94
…-versions-4.94' into marko-lisica/47904-app-store-app-versions-4.94
Hey @rachaelshaw, I intentionally reverted those changes, because we decided to allow users to add mutliple versions (instances) of the app, so that users can define different configurations, self-service, auto-update options and labels for each instance. |
…points, and activities (#54590) **Related issue:** Resolves #53638 Resolves #54201 # Checklist for submitter - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. - [x] If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes - The PATCH response now uses the version shape. The frontend doesn't read it. POST of an app already on the fleet now returns 409 instead of updating it. ## Testing - [x] Added/updated automated tests - [x] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [x] QA'd all new/changed functionality manually - Exercised every endpoint against a local server, plus 120 random add, rename, edit, and delete requests with no 5xx. - Installed on a real iPhone with two versions on the title: the install carried the first-added version's configuration and counted under that version. ## AI **AI:** Claude Code (claude-opus-5-5) ## Summary (ai generated) App Store app versions over the REST API, following #53320 (REST API) and #53318 (audit log). - `GET /software/titles/:id` returns `app_store_apps`, one entry per version, first-added first, each with its own status counts, labels, categories, self-service, auto-update window, and configuration. `app_store_app` stays and holds the first-added version. Without a fleet, neither field is returned. - `POST /software/app_store_apps` accepts `name` (default "Default version") and returns the new `version_id`. A duplicate name (ignoring case) or a second macOS version returns 409, an 11th version returns 400, and names over 255 characters return 422. - `PATCH /software/titles/:id/app_store_app` accepts `version_id` (required with more than one version) and `name`, and edits only that version, including its auto-update window. The response uses the version shape from the docs. - `DELETE /software/titles/:id/available_for_install` accepts `version_id`. The display name and icon are deleted with the last version. Deleting an Android version skips the uninstall on hosts another version still covers. - The added, edited, deleted, and installed App Store app activities carry `version_name`. - Installs read the first-added version's configuration on iOS and Android until per-host precedence lands in #53639. Left for later sub-tasks: per-host version precedence, re-sending configuration on delete, and per-version auto-update in the cron (#53639), GitOps versions (#53640), UI (#53641). `version_id` on the POST response still needs documenting. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * App Store apps can now have multiple named versions per fleet, with version-specific settings and configuration. * Add, edit, and delete specific versions; omitting a version when deleting removes all versions for the title. * Software title details now include the fleet’s App Store app versions. * App Store activity records include version names. * **Bug Fixes** * Android app uninstalls preserve hosts targeted by another remaining version. * Version-specific configuration and app deletion now target the selected version. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…#54805) **Related issue:** Resolves #53640 # Checklist for submitter - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. ## Testing - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually - generate-gitops → gitops → generate-gitops → gitops on a fleet with multi-version iOS/iPadOS titles: second apply changed nothing (same version ids), third generate identical to the second. ## AI **AI:** Claude Code (claude-opus-5-5) ## New Fleet configuration settings - [x] Verified that the setting is exported via `fleetctl generate-gitops` - [x] Verified the setting is documented in a separate PR to [the GitOps documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485) (#53320) - [x] Verified that the setting is cleared on the server if it is not supplied in a YAML file (or that it is documented as being optional) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * App Store apps can now have named versions with separate configuration, self-service, categories, label targeting, and—on iOS and iPadOS—automatic update schedules. * GitOps can import and export these version-specific settings, including each version’s configuration file. * **Bug Fixes** * Validation now catches duplicate or invalid version names, unsupported version combinations, and conflicting label selections before changes are applied. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Squashes the commits from #53320 onto docs-v4.95.0, keeping 4.95's credentialProviderPolicy, vpp_token, installer_id, and separate-file YAML example alongside the versions changes.
Related issue: #47904