Skip to content

Conversation

@sgress454
Copy link
Contributor

@sgress454 sgress454 commented Dec 27, 2025

Related issue: Resolves #35458

Details

This PR adds new metadata to the ActivityEditedAppStoreApp activity relating to the app's auto-update schedule. The data will be included with every ActivityEditedAppStoreApp activity regardless of whether the values changed. I have an open question about this on the activity docs PR.

One functional change to note here is that the act of recording the activity has been moved up a level into the endpoint code, because the activity now contains metadata from two different service methods (one that updates the VPP app, and one that creates the auto-update schedule).

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Comment on lines -131 to +132
updatedApp, err := svc.UpdateAppStoreApp(ctx, req.TitleID, req.TeamID, fleet.AppStoreAppUpdatePayload{
updatedApp, activity, err := svc.UpdateAppStoreApp(ctx, req.TitleID, req.TeamID, fleet.AppStoreAppUpdatePayload{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we update the app itself and its auto-update schedule using separate service methods, we can't gather all of the info we need for the activity inside UpdateAppStoreApp() anymore. So I updated to that method to return an activity that we can then send after all of the updates are done.

Comment on lines 156 to 160
// Re-fetch the software title to get the updated auto-update config.
updatedTitle, err := svc.SoftwareTitleByID(ctx, req.TitleID, req.TeamID)
if err != nil {
return updateAppStoreAppResponse{Err: err}, nil
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-fetching here allows us to annotate the activity with auto-update schedule data even if it's not sent in the request (because we're just editing the app's display name, for example).

@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

❌ Patch coverage is 38.70968% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.88%. Comparing base (99d313f) to head (3514d6d).
⚠️ Report is 94 commits behind head on main.

Files with missing lines Patch % Lines
ee/server/service/vpp.go 27.77% 13 Missing ⚠️
server/service/vpp.go 53.84% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #37715   +/-   ##
=======================================
  Coverage   65.88%   65.88%           
=======================================
  Files        2361     2361           
  Lines      187305   187313    +8     
  Branches     8011     8011           
=======================================
+ Hits       123401   123411   +10     
+ Misses      52622    52618    -4     
- Partials    11282    11284    +2     
Flag Coverage Δ
backend 67.73% <38.70%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sgress454
Copy link
Contributor Author

@rachaelshaw this needs a +1 from you, for the auto-updated docs

@sgress454 sgress454 merged commit e356842 into main Jan 6, 2026
50 checks passed
@sgress454 sgress454 deleted the sgress454/35458-auto-update-software-activity-updates branch January 6, 2026 16:52
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.

iOS/iPad VPP auto-updates: Activity updates

4 participants