Skip to content
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

Use previous package filename for activity if installer edit doesn't change the package #22177

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ define HELP_TEXT
make generate-go - Generate and bundle required go code
make generate-js - Generate and bundle required js code
make generate-dev - Generate and bundle required code in a watch loop
make generate-doc - Generate updated API documentation for activities, osquery flags

make clean - Clean all build artifacts
make clean-assets - Clean assets only
Expand Down
2 changes: 1 addition & 1 deletion docs/Contributing/Audit-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ Generated when a software installer is updated in Fleet.

This activity contains the following fields:
- "software_title": Name of the software.
- "software_package": Filename of the installer. `null` if the installer package was not modified.
- "software_package": Filename of the installer as of this update (including if unchanged).
- "team_name": Name of the team on which this software was updated. `null` if it was updated on no team.
- "team_id": The ID of the team on which this software was updated. `null` if it was updated on no team.
- "self_service": Whether the software is available for installation by the end user.
Expand Down
9 changes: 5 additions & 4 deletions ee/server/service/software_installers.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ func (svc *Service) UpdateSoftwareInstaller(ctx context.Context, payload *fleet.
}

activity := fleet.ActivityTypeEditedSoftware{
SoftwareTitle: existingInstaller.SoftwareTitle,
TeamName: teamName,
TeamID: payload.TeamID,
SelfService: existingInstaller.SelfService,
SoftwareTitle: existingInstaller.SoftwareTitle,
TeamName: teamName,
TeamID: payload.TeamID,
SelfService: existingInstaller.SelfService,
SoftwarePackage: &existingInstaller.Name,
}

var payloadForNewInstallerFile *fleet.UploadSoftwareInstallerPayload
Expand Down
2 changes: 1 addition & 1 deletion server/fleet/activities.go
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ func (a ActivityTypeEditedSoftware) ActivityName() string {
func (a ActivityTypeEditedSoftware) Documentation() (string, string, string) {
return `Generated when a software installer is updated in Fleet.`, `This activity contains the following fields:
- "software_title": Name of the software.
- "software_package": Filename of the installer.` + " `null` " + `if the installer package was not modified.
- "software_package": Filename of the installer as of this update (including if unchanged).
- "team_name": Name of the team on which this software was updated.` + " `null` " + `if it was updated on no team.
- "team_id": The ID of the team on which this software was updated.` + " `null` " + `if it was updated on no team.
- "self_service": Whether the software is available for installation by the end user.`, `{
Expand Down
Loading