fleet/server
Victor Lyuboslavsky 7deade8057
Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #37806 

Removed `ds.ListActivities` from the legacy datastore and updated
code/tests to use the new activity bounded context instead.

The changes to `cron.go` and most changes to `mysql/activities_test.go`
will eventually be migrated to the activity bounded context. The current
changes are an intermediate step.

The issues tracked by https://github.com/fleetdm/fleet/issues/38234 will
be addressed in additional/parallel PRs shortly.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
  - Done in the previous PR

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Migrated activity retrieval from direct datastore calls to a
service-based architecture for improved maintainability and consistency.
* Enhanced system context handling for background automation tasks to
ensure proper authorization during scheduled operations.
* Streamlined activity recording for automated processes with dedicated
system identity tracking.

* **Tests**
* Updated test infrastructure with new helpers for activity service
integration across test suites.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2026-01-23 07:42:09 -06:00
..
acl/activityacl Activity bounded context: /api/latest/fleet/activities (1 of 2) (#38115) 2026-01-19 09:07:14 -05:00
activity Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478) 2026-01-23 07:42:09 -06:00
archtest Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
authz Global observers and maintainers can now officially read user details (#38558) 2026-01-21 13:55:10 -06:00
aws_common Feat 1817 add iam auth to mysql and redis (#32488) 2025-09-04 10:08:47 -05:00
bindata
config Implement trusted proxies config (#38471) 2026-01-19 22:13:37 -06:00
contexts Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478) 2026-01-23 07:42:09 -06:00
cron Add SCEP endpoint for host identity. (#30589) 2025-07-11 11:44:07 -03:00
datastore Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478) 2026-01-23 07:42:09 -06:00
errorstore Fixed potential panic in error handler when Redis is down. (#31643) 2025-08-06 17:14:31 +02:00
fleet Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478) 2026-01-23 07:42:09 -06:00
goose Use UTC timestamps for DB migrations (#36228) 2025-11-24 15:49:10 -06:00
health
launcher Add missing platform_like during orbit enrollment (#32671) 2025-09-05 16:05:19 -03:00
live_query Fix lingering live queries keys in Redis (#33928) 2025-10-08 06:36:38 -03:00
logging Fix nats_test.go flaky tests (#37976) 2026-01-07 14:08:42 -03:00
mail [Bug fix] Unclear error message: Update users email via API (#36579) 2025-12-02 10:52:31 -06:00
mdm Porting fix from micromdm/scep (#38638) 2026-01-22 13:34:53 -06:00
mock Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478) 2026-01-23 07:42:09 -06:00
platform Implement trusted proxies config (#38471) 2026-01-19 22:13:37 -06:00
policies Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
ptr Clean up android app config data layer, fix no-team persist bug (#37740) 2025-12-30 09:35:41 -06:00
pubsub Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
service Activity bounded context: /api/latest/fleet/activities (2 of 2) (#38478) 2026-01-23 07:42:09 -06:00
shellquote Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
sso End-user authentication for Window/Linux setup experience: backend (#34835) 2025-10-31 11:16:42 -05:00
test Automatic retry of failed policy automations of scripts and software installs (#38018) 2026-01-12 17:30:51 -06:00
variables DCSW: Support all IDP variables in Windows config profiles (#34707) 2025-10-24 10:10:58 -03:00
version
vulnerabilities created mac vim mapping software transformer (#38333) 2026-01-21 12:33:14 -06:00
webhooks Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
websocket
worker Bugfix: apply a special-case for Xcode VPP app verification (#38539) 2026-01-21 17:16:13 -05:00
utils.go Fix CleanupExpiredHosts to prevent deletion of DEP-assigned hosts (#28313) 2025-04-18 12:49:03 -05:00
utils_test.go