Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Change update logic to prevent downgrades #320

Merged
merged 2 commits into from
Sep 22, 2020
Merged

Conversation

DTMad
Copy link
Member

@DTMad DTMad commented Sep 22, 2020

No description provided.

@DTMad DTMad requested a review from lrgar September 22, 2020 10:18
Copy link
Contributor

@lrgar lrgar left a comment

Choose a reason for hiding this comment

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

Please add an entry to the changelog

@@ -187,6 +187,30 @@ func TestReconcile_PhaseSetCorrectly(t *testing.T) {
})
}

func TestNewerVersion(t *testing.T) {
logger := logf.ZapLoggerTo(os.Stdout, true)
assert.Equal(t, true, isDesiredNewer("1.200.1.12345", "1.201.1.12345", logger))
Copy link
Contributor

Choose a reason for hiding this comment

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

assert.True works as well.

if aa[i] < da[i] {
return true
} else if aa[i] > da[i] {
logger.Info("downgrade detected! downgrades are not supported")
Copy link
Contributor

Choose a reason for hiding this comment

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

On master, this probably should be an error.

@DTMad DTMad merged commit 011ed5b into release-0.8 Sep 22, 2020
@DTMad DTMad deleted the bug/AgentDowngrade branch September 22, 2020 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants