-
Notifications
You must be signed in to change notification settings - Fork 782
Uploading new installer to FMA turns FMA to custom package #29959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #29959 +/- ##
==========================================
- Coverage 64.18% 64.11% -0.07%
==========================================
Files 1859 1863 +4
Lines 181882 182317 +435
Branches 5331 5331
==========================================
+ Hits 116734 116892 +158
- Misses 55965 56224 +259
- Partials 9183 9201 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@iansltx -- is there something I'm missing to make the last two tests pass? |
iansltx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the feedback here (which should drastically shrink the PR), we should cover this with tests. With the suggested implementation, a data store test should be sufficient as long as you can get an FMA set up in the "arrange" part of the test.
| dirty["Package"] = true | ||
|
|
||
| // Clear the fleet_maintained_app_id because the installer file changed | ||
| if err := svc.ds.ClearFleetMaintainedAppID(ctx, existingInstaller.InstallerID); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be around L480, or probably part of ds.SaveInstallerUpdates, specifically the touchUploaded override. I believe that turns this change into a one-liner (since we can unconditionally null out FMA ID there), plus tests.
|
IIRC docs are broken here because a PR upstream hasn't been merged due to lack of approver availability, so not concerned about that since the other tests are passing. |
| require.NoError(t, err) | ||
|
|
||
| // Set fleet_maintained_app_id manually (simulate maintained app) | ||
| _, err = ds.writer(ctx).ExecContext(ctx, `UPDATE software_installers SET fleet_maintained_app_id = 42 WHERE id = ?`, installerID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing this is breaking tests. FMA table needs to have something in it to satisfy the foreign key constraint.
|
@RachelElysia I confirmed the test failure was what I expected it to be, so that needs to be fixed (so tests pass) before this merges. |
iansltx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tweaks!
Issue
Closes #28687
Description
Screenrecording of fix
Screen.Recording.2025-06-12.at.9.52.42.AM.mov
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.