Install in-house apps during iOS/iPadOS setup experience - #51135
Draft
raju249 wants to merge 4 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 50628-setup-experience-ipa-crud #51135 +/- ##
===================================================================
- Coverage 68.65% 68.61% -0.05%
===================================================================
Files 3995 3993 -2
Lines 257731 257578 -153
Branches 13843 13843
===================================================================
- Hits 176949 176735 -214
- Misses 65042 65126 +84
+ Partials 15740 15717 -23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Related issue: Resolves #50629
Checklist for submitter
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
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
Details
Final sub-task of #33995: a selected
.ipanow actually installs while an iOS/iPadOS device is held in Setup Assistant, and its result drives the device release.SetupExperienceStatusResult.InHouseAppIDas a fourth mutually exclusive item kind; pairs withnano_command_uuidlike VPP (IsValidtable extended).enqueueSetupExperienceItemsfor flagged in-house apps (iOS/iPadOS only), mirrored in the reset-after-failure variant. Deliberately noin_house_app_labelsjoin — labels don't apply during setup experience for any software type, and a regression test asserts an out-of-scope host still gets the item, so reintroducing the check fails CI.installSetupExperienceAppsOnIosIpadOS, formerly...VPPApps...— it force-failed any non-VPP row) enqueues in-house installs through a newfleet.AppleMDMInHouseAppInstallerinterface, since the logic lives in the premium service which the worker can't import (same pattern asAppleMDMVPPInstaller). The ee implementation pre-flights$FLEET_VAR_*in the managed app configuration; an unresolvable variable records the failed install + activity and returns*fleet.PreflightInstallFailedError, so the worker fails the item with the user-facing reason without emitting a duplicate activity and the device still releases. The command UUID lands innano_command_uuid, so the existing terminal-status update (MaybeUpdateSetupExperienceVPPStatus) and the release gate work unchanged. (Left that method's "VPP" name alone to keep interface/mock churn out of this PR — happy to rename in a follow-up if preferred.)SetupExperienceNextStepguard: an in-house row can never legitimately reach the poll-driven (macOS) flow; it now fails the item instead of falling through the switch silently and stalling the queue.InstallApplicationfailure for an in-house app previously produced no activity (the error branch only knew VPP); it now falls back toGetPastActivityDataForInHouseAppInstall. Verified installs are now taggedfrom_setup_experience(the in-houseactivityFndropped the flag).fromAutoUpdateis intentionally not plumbed:ActivityTypeInstalledSoftwarehas no such field and in-house apps have no auto-update flow.Tests: end-to-end integration test (
TestSetupExperienceIOSInHouseApp: ABM-enrolled iPhone with a mixed .ipa + VPP payload — both install via InstallApplication (ManifestURL vs iTunesStoreID), verify via InstalledApplicationList, gate DeviceConfigured, and the verified install is recorded withfrom_setup_experience: true);IsValidtable cases; datastore enqueue (iPhone gets the row within_house_app_id, iPad doesn't when only iOS is selected, label-scope-ignored canary); two worker subtests (success path asserts the command UUID gates the release job; pre-flight failure path asserts terminal failure with reason and no duplicate activity).Remaining before un-draft: manual QA on real devices (signed
.ipapending).Note:
TestIntegrations/TestPasswordResetfails locally onmaintoo (environmental) — unrelated.