Skip to content

Commit 5727de3

Browse files
authored
Android config profiles resend on IdP changes (#49068)
**Related issue:** Resolves #49003 ## Testing - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually For unreleased bug fixes in a release candidate, one of: - [x] Confirmed that the fix is not expected to adversely impact load test results <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Android configuration profiles now detect and track Fleet secret/template variables during creation, including when profiles are created or updated in batches. * **Bug Fixes** * When Fleet variables related to SCIM user identity change, affected Android MDM profile resend/delivery state is reset so the updated profile is re-delivered. * Android profile behavior has been aligned across creation, listing, and delete/upsert flows to maintain consistent variable-aware associations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent ed7508f commit 5727de3

11 files changed

Lines changed: 125 additions & 61 deletions

File tree

server/datastore/mysql/android.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func upsertAndroidHostMDMInfoDB(ctx context.Context, tx sqlx.ExtContext, serverU
606606
return ctxerr.Wrap(ctx, err, "upsert host mdm info")
607607
}
608608

609-
func (ds *Datastore) NewMDMAndroidConfigProfile(ctx context.Context, cp fleet.MDMAndroidConfigProfile) (*fleet.MDMAndroidConfigProfile, error) {
609+
func (ds *Datastore) NewMDMAndroidConfigProfile(ctx context.Context, cp fleet.MDMAndroidConfigProfile, usesFleetVars []fleet.FleetVarName) (*fleet.MDMAndroidConfigProfile, error) {
610610
profileUUID := fleet.MDMAndroidProfileUUIDPrefix + uuid.New().String()
611611
insertProfileStmt := `
612612
INSERT INTO
@@ -676,6 +676,11 @@ INSERT INTO
676676
if _, err := batchSetProfileLabelAssociationsDB(ctx, tx, labels, profsWithoutLabel, "android"); err != nil {
677677
return ctxerr.Wrap(ctx, err, "inserting android profile label associations")
678678
}
679+
if _, err := batchSetProfileVariableAssociationsDB(ctx, tx, []fleet.MDMProfileUUIDFleetVariables{
680+
{ProfileUUID: profileUUID, FleetVariables: usesFleetVars},
681+
}, "android", false); err != nil {
682+
return ctxerr.Wrap(ctx, err, "inserting android profile variable associations")
683+
}
679684

680685
return nil
681686
})
@@ -1724,6 +1729,7 @@ func (ds *Datastore) batchSetMDMAndroidProfiles(
17241729
tx sqlx.ExtContext,
17251730
tmID *uint,
17261731
profiles []*fleet.MDMAndroidConfigProfile,
1732+
profilesVariablesByIdentifier []fleet.MDMProfileIdentifierFleetVariables,
17271733
) (updatedDB bool, err error) {
17281734
if len(profiles) == 0 {
17291735
rowsAffected, err := ds.deleteAllAndroidProfiles(ctx, tx, tmID)
@@ -1858,7 +1864,7 @@ WHERE
18581864
})
18591865
}
18601866

1861-
didUpdateLabels, err := ds.batchSetLabelAndVariableAssociations(ctx, tx, "android", tmID, mappedIncomingProfiles, nil)
1867+
didUpdateLabels, err := ds.batchSetLabelAndVariableAssociations(ctx, tx, "android", tmID, mappedIncomingProfiles, profilesVariablesByIdentifier)
18621868
if err != nil {
18631869
return false, ctxerr.Wrap(ctx, err, "setting labels and variable associations")
18641870
}

server/datastore/mysql/android_test.go

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ func testNewMDMAndroidConfigProfile(t *testing.T, ds *Datastore) {
795795
}
796796

797797
// Create the profile
798-
result, err := ds.NewMDMAndroidConfigProfile(ctx, profile)
798+
result, err := ds.NewMDMAndroidConfigProfile(ctx, profile, nil)
799799
require.NoError(t, err)
800800
assert.NotEmpty(t, result.ProfileUUID)
801801

@@ -805,7 +805,7 @@ func testNewMDMAndroidConfigProfile(t *testing.T, ds *Datastore) {
805805
TeamID: nil,
806806
RawJSON: []byte(`{"hello2": "world2"}`),
807807
}
808-
result2, err := ds.NewMDMAndroidConfigProfile(ctx, profile2)
808+
result2, err := ds.NewMDMAndroidConfigProfile(ctx, profile2, nil)
809809
require.NoError(t, err)
810810
assert.NotEmpty(t, result2.ProfileUUID)
811811

@@ -837,15 +837,15 @@ func testNewMDMAndroidConfigProfile(t *testing.T, ds *Datastore) {
837837
TeamID: nil,
838838
RawJSON: []byte(`{"hello3": "world3"}`),
839839
}
840-
_, err = ds.NewMDMAndroidConfigProfile(ctx, androidProfile)
840+
_, err = ds.NewMDMAndroidConfigProfile(ctx, androidProfile, nil)
841841
require.ErrorContains(t, err, "already exists")
842842

843843
// Create that same conflicting android profile but on a different team
844844
team, err := ds.NewTeam(ctx, &fleet.Team{Name: "test team"})
845845
require.NoError(t, err)
846846
require.NotNil(t, team)
847847
androidProfile.TeamID = ptr.Uint(team.ID)
848-
otherTeamProfile, err := ds.NewMDMAndroidConfigProfile(ctx, androidProfile)
848+
otherTeamProfile, err := ds.NewMDMAndroidConfigProfile(ctx, androidProfile, nil)
849849
require.NoError(t, err)
850850

851851
// Verify we can GET the newly created profile
@@ -878,7 +878,7 @@ func testDeleteMDMAndroidConfigProfile(t *testing.T, ds *Datastore) {
878878
RawJSON: []byte(`{"hello": "world"}`),
879879
}
880880

881-
profile1, err = ds.NewMDMAndroidConfigProfile(ctx, *profile1)
881+
profile1, err = ds.NewMDMAndroidConfigProfile(ctx, *profile1, nil)
882882
require.NoError(t, err)
883883
require.NotNil(t, profile1)
884884

@@ -887,7 +887,7 @@ func testDeleteMDMAndroidConfigProfile(t *testing.T, ds *Datastore) {
887887
TeamID: nil,
888888
RawJSON: []byte(`{"hello": "world"}`),
889889
}
890-
profile2, err = ds.NewMDMAndroidConfigProfile(ctx, *profile2)
890+
profile2, err = ds.NewMDMAndroidConfigProfile(ctx, *profile2, nil)
891891
require.NoError(t, err)
892892
require.NotNil(t, profile2)
893893

@@ -1157,17 +1157,17 @@ func testGetHostMDMAndroidProfiles(t *testing.T, ds *Datastore) {
11571157

11581158
// Create some profiles
11591159
profile1 := androidProfileForTest("profile1")
1160-
profile1, err = ds.NewMDMAndroidConfigProfile(ctx, *profile1)
1160+
profile1, err = ds.NewMDMAndroidConfigProfile(ctx, *profile1, nil)
11611161
require.NoError(t, err)
11621162
require.NotNil(t, profile1)
11631163

11641164
profile2 := androidProfileForTest("profile2")
1165-
profile2, err = ds.NewMDMAndroidConfigProfile(ctx, *profile2)
1165+
profile2, err = ds.NewMDMAndroidConfigProfile(ctx, *profile2, nil)
11661166
require.NoError(t, err)
11671167
require.NotNil(t, profile2)
11681168

11691169
profile3 := androidProfileForTest("profile3")
1170-
profile3, err = ds.NewMDMAndroidConfigProfile(ctx, *profile3)
1170+
profile3, err = ds.NewMDMAndroidConfigProfile(ctx, *profile3, nil)
11711171
require.NoError(t, err)
11721172
require.NotNil(t, profile3)
11731173

@@ -1360,13 +1360,13 @@ func testListMDMAndroidProfilesToSend(t *testing.T, ds *Datastore) {
13601360
tm, err := ds.NewTeam(ctx, &fleet.Team{Name: "team"})
13611361
require.NoError(t, err)
13621362

1363-
p1, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-1"))
1363+
p1, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-1"), nil)
13641364
require.NoError(t, err)
1365-
p2, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-2"))
1365+
p2, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-2"), nil)
13661366
require.NoError(t, err)
13671367
tmP3 := androidProfileForTest("team-1")
13681368
tmP3.TeamID = &tm.ID
1369-
p3, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP3)
1369+
p3, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP3, nil)
13701370
require.NoError(t, err)
13711371

13721372
// all profiles use the same raw JSON, so they share the same checksum
@@ -1404,7 +1404,7 @@ func testListMDMAndroidProfilesToSend(t *testing.T, ds *Datastore) {
14041404
require.NoError(t, err)
14051405
lblIncAll2, err := ds.NewLabel(ctx, &fleet.Label{Name: "inclall-2", Query: "select 1"})
14061406
require.NoError(t, err)
1407-
p4, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-4", lblIncAll1, lblIncAll2))
1407+
p4, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-4", lblIncAll1, lblIncAll2), nil)
14081408
require.NoError(t, err)
14091409

14101410
// no change, host is not a member of both labels
@@ -1454,7 +1454,7 @@ func testListMDMAndroidProfilesToSend(t *testing.T, ds *Datastore) {
14541454
require.NoError(t, err)
14551455
lblIncAny2, err := ds.NewLabel(ctx, &fleet.Label{Name: "inclany-2", Query: "select 1"})
14561456
require.NoError(t, err)
1457-
p5, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-5", lblIncAny1, lblIncAny2))
1457+
p5, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-5", lblIncAny1, lblIncAny2), nil)
14581458
require.NoError(t, err)
14591459

14601460
// no change, host 0 not a member yet
@@ -1491,7 +1491,7 @@ func testListMDMAndroidProfilesToSend(t *testing.T, ds *Datastore) {
14911491
require.NoError(t, err)
14921492
lblExclAny2, err := ds.NewLabel(ctx, &fleet.Label{Name: "exclude-2", LabelMembershipType: fleet.LabelMembershipTypeManual})
14931493
require.NoError(t, err)
1494-
p6, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-6", lblExclAny1, lblExclAny2))
1494+
p6, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-6", lblExclAny1, lblExclAny2), nil)
14951495
require.NoError(t, err)
14961496

14971497
// no change, label membership was not updated after labels created
@@ -1673,13 +1673,13 @@ func testListMDMAndroidProfilesToSendWithExcludeAny(t *testing.T, ds *Datastore)
16731673
require.NoError(t, err)
16741674

16751675
// Dynamic exclude-any label
1676-
p1, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-1", lblExclAny1))
1676+
p1, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-1", lblExclAny1), nil)
16771677
require.NoError(t, err)
16781678
// Manual exclude-any label only
1679-
p2, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-2", lblExclAny2))
1679+
p2, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-2", lblExclAny2), nil)
16801680
require.NoError(t, err)
16811681
// Both manual and dynamic label exclusion
1682-
p3, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-3", lblExclAny1, lblExclAny2))
1682+
p3, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("no-team-3", lblExclAny1, lblExclAny2), nil)
16831683
require.NoError(t, err)
16841684

16851685
// all profiles use the same raw JSON, so they share the same checksum
@@ -1719,15 +1719,15 @@ func testListMDMAndroidProfilesToSendWithExcludeAny(t *testing.T, ds *Datastore)
17191719
tmP6.TeamID = &tm.ID
17201720

17211721
// Dynamic exclude-any label
1722-
p4, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP4)
1722+
p4, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP4, nil)
17231723
require.NoError(t, err)
17241724

17251725
// Manual exclude-any label only
1726-
p5, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP5)
1726+
p5, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP5, nil)
17271727
require.NoError(t, err)
17281728

17291729
// Both manual and dynamic label exclusion
1730-
p6, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP6)
1730+
p6, err := ds.NewMDMAndroidConfigProfile(ctx, *tmP6, nil)
17311731
require.NoError(t, err)
17321732

17331733
// p5 becomes immediately applicable to host 1 because it only has a manual label
@@ -1812,7 +1812,7 @@ func testListMDMAndroidProfilesToSendCursor(t *testing.T, ds *Datastore) {
18121812
})
18131813

18141814
// Add a profile so all 5 hosts have pending work.
1815-
_, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("cursor-test-profile"))
1815+
_, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("cursor-test-profile"), nil)
18161816
require.NoError(t, err)
18171817

18181818
// No cursor, no limit — returns all 5 hosts.
@@ -1901,10 +1901,10 @@ func testListMDMAndroidProfilesToSendWithCombinedLabels(t *testing.T, ds *Datast
19011901
require.NoError(t, err)
19021902

19031903
// include-all + exclude-any profile (requires both incl-all-1 and incl-all-2)
1904-
pCombinedAll, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("combined-incl-all", inclAllLbl, inclAllLbl2, exclLbl))
1904+
pCombinedAll, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("combined-incl-all", inclAllLbl, inclAllLbl2, exclLbl), nil)
19051905
require.NoError(t, err)
19061906
// include-any + exclude-any profile
1907-
pCombinedAny, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("combined-incl-any", inclAnyLbl, exclLbl))
1907+
pCombinedAny, err := ds.NewMDMAndroidConfigProfile(ctx, *androidProfileForTest("combined-incl-any", inclAnyLbl, exclLbl), nil)
19081908
require.NoError(t, err)
19091909

19101910
profChecksum := getAndroidProfileChecksum(t, ds, pCombinedAll.ProfileUUID)
@@ -1970,11 +1970,11 @@ func testGetMDMAndroidProfilesContents(t *testing.T, ds *Datastore) {
19701970
p3 := androidProfileForTest("p3")
19711971
p3.RawJSON = []byte(`{"v": 3}`)
19721972

1973-
p1, err := ds.NewMDMAndroidConfigProfile(ctx, *p1)
1973+
p1, err := ds.NewMDMAndroidConfigProfile(ctx, *p1, nil)
19741974
require.NoError(t, err)
1975-
p2, err = ds.NewMDMAndroidConfigProfile(ctx, *p2)
1975+
p2, err = ds.NewMDMAndroidConfigProfile(ctx, *p2, nil)
19761976
require.NoError(t, err)
1977-
p3, err = ds.NewMDMAndroidConfigProfile(ctx, *p3)
1977+
p3, err = ds.NewMDMAndroidConfigProfile(ctx, *p3, nil)
19781978
require.NoError(t, err)
19791979

19801980
cases := []struct {
@@ -2049,7 +2049,7 @@ func testBulkUpsertMDMAndroidHostProfilesN(t *testing.T, ds *Datastore, batchSiz
20492049
// last profile is for a team
20502050
p.TeamID = &tm.ID
20512051
}
2052-
p, err := ds.NewMDMAndroidConfigProfile(ctx, *p)
2052+
p, err := ds.NewMDMAndroidConfigProfile(ctx, *p, nil)
20532053
require.NoError(t, err)
20542054
profiles[i] = p
20552055
}
@@ -2428,7 +2428,7 @@ func testListHostMDMAndroidProfilesPendingInstallWithVersion(t *testing.T, ds *D
24282428
profiles := make([]*fleet.MDMAndroidConfigProfile, 3)
24292429
for i := range profiles {
24302430
p := androidProfileForTest(fmt.Sprintf("profile-%d", i))
2431-
p, err := ds.NewMDMAndroidConfigProfile(ctx, *p)
2431+
p, err := ds.NewMDMAndroidConfigProfile(ctx, *p, nil)
24322432
require.NoError(t, err)
24332433
profiles[i] = p
24342434
}
@@ -2589,7 +2589,7 @@ func testBulkDeleteMDMAndroidHostProfiles(t *testing.T, ds *Datastore) {
25892589
profiles := make([]*fleet.MDMAndroidConfigProfile, 3)
25902590
for i := range profiles {
25912591
p := androidProfileForTest(fmt.Sprintf("profile-%d", i))
2592-
p, err := ds.NewMDMAndroidConfigProfile(ctx, *p)
2592+
p, err := ds.NewMDMAndroidConfigProfile(ctx, *p, nil)
25932593
require.NoError(t, err)
25942594
profiles[i] = p
25952595
}

server/datastore/mysql/mdm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func (ds *Datastore) BatchSetMDMProfiles(ctx context.Context, tmID *uint, macPro
606606
return ctxerr.Wrap(ctx, err, "batch set apple declarations")
607607
}
608608

609-
if updates.AndroidConfigProfile, err = ds.batchSetMDMAndroidProfiles(ctx, tx, tmID, androidProfiles); err != nil {
609+
if updates.AndroidConfigProfile, err = ds.batchSetMDMAndroidProfiles(ctx, tx, tmID, androidProfiles, profilesVariablesByIdentifier); err != nil {
610610
return ctxerr.Wrap(ctx, err, "batch set android profiles")
611611
}
612612

server/datastore/mysql/mdm_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ func testListMDMConfigProfiles(t *testing.T, ds *Datastore) {
16501650
{LabelName: labels[9].Name, LabelID: labels[9].ID},
16511651
}
16521652
}
1653-
_, err = ds.NewMDMAndroidConfigProfile(ctx, gcp)
1653+
_, err = ds.NewMDMAndroidConfigProfile(ctx, gcp, nil)
16541654
require.NoError(t, err)
16551655

16561656
gcp = fleet.MDMAndroidConfigProfile{ // H N and T
@@ -1664,7 +1664,7 @@ func testListMDMConfigProfiles(t *testing.T, ds *Datastore) {
16641664
{LabelName: labels[11].Name, LabelID: labels[11].ID},
16651665
}
16661666
}
1667-
_, err = ds.NewMDMAndroidConfigProfile(ctx, gcp)
1667+
_, err = ds.NewMDMAndroidConfigProfile(ctx, gcp, nil)
16681668
require.NoError(t, err)
16691669
}
16701670
// null label references to simulate profiles D, E and G being broken

server/datastore/mysql/scim.go

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,29 @@ func triggerResendProfilesUsingVariables(ctx context.Context, tx sqlx.ExtContext
13811381
"affected_vars": vars,
13821382
}
13831383

1384-
for _, query := range []string{appleUpdateStatusQuery, windowsUpdateStatusQuery, declarationUpdateStatusQuery} {
1384+
const androidUpdateStatusQuery = `
1385+
UPDATE
1386+
host_mdm_android_profiles hmap
1387+
JOIN hosts h
1388+
ON h.uuid = hmap.host_uuid
1389+
JOIN mdm_android_configuration_profiles macp
1390+
ON (macp.team_id = COALESCE(h.team_id, 0)) AND
1391+
macp.profile_uuid = hmap.profile_uuid
1392+
JOIN mdm_configuration_profile_variables mcpv
1393+
ON mcpv.android_profile_uuid = macp.profile_uuid
1394+
JOIN fleet_variables fv
1395+
ON mcpv.fleet_variable_id = fv.id
1396+
SET
1397+
hmap.status = NULL,
1398+
hmap.detail = NULL
1399+
WHERE
1400+
h.id IN (:host_ids) AND
1401+
hmap.operation_type = :operation_type_install AND
1402+
hmap.status IS NOT NULL AND
1403+
fv.name IN (:affected_vars)
1404+
`
1405+
1406+
for _, query := range []string{appleUpdateStatusQuery, windowsUpdateStatusQuery, declarationUpdateStatusQuery, androidUpdateStatusQuery} {
13851407
updateStmt, args, err := sqlx.Named(query, namedParams)
13861408
if err != nil {
13871409
return ctxerr.Wrap(ctx, err, "prepare resend profiles replace names")

server/datastore/mysql/scim_test.go

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2804,6 +2804,24 @@ func testTriggerResendCertTemplatesAndAppConfigs(t *testing.T, ds *Datastore) {
28042804
return err
28052805
})
28062806

2807+
// --- Android configuration profile resend ---
2808+
2809+
// Create an Android config profile with a variable.
2810+
androidProfile, err := ds.NewMDMAndroidConfigProfile(ctx, fleet.MDMAndroidConfigProfile{
2811+
TeamID: new(uint), // team 0
2812+
Name: "android-var-profile",
2813+
RawJSON: []byte(`{"screenCaptureDisabled": true, "shortSupportMessage": {"defaultMessage": "User $FLEET_VAR_HOST_END_USER_IDP_USERNAME"}}`),
2814+
}, []fleet.FleetVarName{fleet.FleetVarHostEndUserIDPUsername})
2815+
require.NoError(t, err)
2816+
2817+
// Create a host_mdm_android_profiles row in "verified" status.
2818+
ExecAdhocSQL(t, ds, func(q sqlx.ExtContext) error {
2819+
_, err := q.ExecContext(ctx,
2820+
`INSERT INTO host_mdm_android_profiles (host_uuid, profile_uuid, profile_name, status, operation_type, checksum) VALUES (?, ?, 'android-var-profile', 'verified', 'install', 'abc123')`,
2821+
host.UUID, androidProfile.ProfileUUID)
2822+
return err
2823+
})
2824+
28072825
// --- Managed app config resend ---
28082826

28092827
// Create an android enterprise (required for job queuing).
@@ -2853,7 +2871,17 @@ func testTriggerResendCertTemplatesAndAppConfigs(t *testing.T, ds *Datastore) {
28532871
})
28542872
assert.Equal(t, string(fleet.CertificateTemplatePending), certStatus, "cert template should be reset to pending")
28552873

2856-
// (2) Assert a software_worker job was queued for the managed app config.
2874+
// (2) Assert android config profile was reset to pending (status = NULL).
2875+
var androidProfileStatus *string
2876+
ExecAdhocSQL(t, ds, func(q sqlx.ExtContext) error {
2877+
return sqlx.GetContext(ctx, q,
2878+
&androidProfileStatus,
2879+
`SELECT status FROM host_mdm_android_profiles WHERE host_uuid = ? AND profile_uuid = ?`,
2880+
host.UUID, androidProfile.ProfileUUID)
2881+
})
2882+
assert.Nil(t, androidProfileStatus, "android profile status should be reset to NULL (pending)")
2883+
2884+
// (3) Assert a software_worker job was queued for the managed app config.
28572885
type jobRow struct {
28582886
Name string `db:"name"`
28592887
Args json.RawMessage `db:"args"`

server/fleet/datastore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3168,7 +3168,7 @@ type Datastore interface {
31683168
AndroidDatastore
31693169

31703170
// NewMDMAndroidConfigProfile creates a new Android MDM config profile.
3171-
NewMDMAndroidConfigProfile(ctx context.Context, cp MDMAndroidConfigProfile) (*MDMAndroidConfigProfile, error)
3171+
NewMDMAndroidConfigProfile(ctx context.Context, cp MDMAndroidConfigProfile, usesFleetVars []FleetVarName) (*MDMAndroidConfigProfile, error)
31723172

31733173
// GetMDMAndroidConfigProfile returns the Android MDM profile corresponding
31743174
// to the specified profile uuid.

0 commit comments

Comments
 (0)