Skip to content

Commit

Permalink
For R.C. - Use previous package filename for activity if installer ed…
Browse files Browse the repository at this point in the history
…it doesn't change the package (#22188)



Co-authored-by: Ian Littman <[email protected]>
  • Loading branch information
RachelElysia and iansltx committed Sep 18, 2024
1 parent ad6db5a commit 3a7e899
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
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

0 comments on commit 3a7e899

Please sign in to comment.