3 Commits
Author SHA1 Message Date
Victor Lyuboslavsky 5ca87a055d Renamed activity tables and moved host activities cleanup to activity bounded context. (#41194) 2026-03-08 21:54:06 -05:00
Nico b6e62f539b Fix flaky test: TestGitOpsSoftwareIcons (#40680)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #40679


https://github.com/fleetdm/fleet/actions/runs/22472807405/job/65093438743

By looking at the logs, looks like there's a race condition between two
goroutines calling NewActivity, causing NewActivityFuncInvoked to be
stale:

<img width="678" height="166" alt="Screenshot 2026-02-27 at 9 48 21 AM"
src="https://github.com/user-attachments/assets/0b96f423-bec6-4634-9d83-d4c3fc2e5e8f"
/>
<img width="675" height="209" alt="Screenshot 2026-02-27 at 9 47 48 AM"
src="https://github.com/user-attachments/assets/3497991e-2c15-41a0-bda9-511721117b68"
/>
2026-02-27 10:24:20 -03:00
Victor Lyuboslavsky 913a5904c8 Move NewActivity to activity bounded context (#39521)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38536 

This PR moves all logic to create new activities to activity bounded
context.
The old service and ActivityModule methods are not facades that route to
the new activity bounded context. The facades will be removed in a
subsequent PR.

# Checklist for submitter

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

## 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

* **New Features**
* Added webhook support for activity events with configurable endpoint
and enable/disable settings.
* Enhanced automation-initiated activity creation without requiring a
user context.
* Improved activity service architecture with centralized creation and
management.

* **Improvements**
* Refactored activity creation to use a dedicated service layer for
better separation of concerns.
* Added support for host-specific and automation-originated activities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-25 14:11:03 -06:00