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

Hardcode use_tuf_autoupdater in startup settings so that v1.5.3 can use it #1648

Merged
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 ee/agent/startupsettings/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func (s *startupSettingsWriter) setFlags() error {
for flag, getter := range s.storedFlags {
updatedFlags[flag.String()] = getter()
}
updatedFlags["use_tuf_autoupdater"] = "enabled" // Hardcode for backwards compatibility
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth a comment about what version this is for. I can imagine wanting to drop it in the future.


if _, err := s.kvStore.Update(updatedFlags); err != nil {
return fmt.Errorf("updating flags: %w", err)
Expand Down
4 changes: 4 additions & 0 deletions ee/agent/startupsettings/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func TestOpenWriter_NewDatabase(t *testing.T) {
require.NoError(t, err, "getting startup value")
require.Equal(t, updateChannelVal, string(v1), "incorrect flag value")

v2, err := s.kvStore.Get([]byte("use_tuf_autoupdater"))
require.NoError(t, err, "getting startup value")
require.Equal(t, "enabled", string(v2), "incorrect flag value")

require.NoError(t, s.Close(), "closing startup db")
}

Expand Down
Loading