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

Add update-now functionality to TUF autoupdater #1579

Merged
merged 12 commits into from
Feb 8, 2024

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Feb 5, 2024

@RebeccaMahany RebeccaMahany marked this pull request as ready for review February 6, 2024 16:06
cmd/launcher/launcher.go Show resolved Hide resolved
ee/tuf/autoupdate.go Show resolved Hide resolved
ee/tuf/autoupdate.go Show resolved Hide resolved
ee/tuf/autoupdate.go Outdated Show resolved Hide resolved
ee/tuf/autoupdate.go Outdated Show resolved Hide resolved
ee/tuf/autoupdate.go Show resolved Hide resolved
Copy link
Contributor

@James-Pickett James-Pickett left a comment

Choose a reason for hiding this comment

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

NICE

Copy link
Contributor

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Woo! LGTM

ee/tuf/autoupdate.go Show resolved Hide resolved
Comment on lines +272 to +274
binariesToUpdate := make([]autoupdatableBinary, 0)
for _, b := range updateRequest.BinariesToUpdate {
if val, ok := autoupdatableBinaryMap[b.Name]; ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could invert this, and use https://pkg.go.dev/slices#DeleteFunc to remove non matches from updateRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've got to build a new slice from updateRequest anyway, might as well leave the request unmodified

@RebeccaMahany RebeccaMahany added this pull request to the merge queue Feb 8, 2024
@RebeccaMahany RebeccaMahany mentioned this pull request Feb 8, 2024
7 tasks
Merged via the queue into kolide:main with commit 610099c Feb 8, 2024
26 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/tuf-update-now branch February 8, 2024 14:40
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.

3 participants