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

PMM-12762 Get notified about new version. #2951

Merged
merged 42 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9da3fd8
PMM-11261 Update PMM via watchtower
BupycHuk Feb 16, 2024
185ee21
PMM-11261 address comments and fix linter
BupycHuk Mar 8, 2024
cbfa33a
Merge branch 'v3' into PMM-11261-update-via-watchtower
BupycHuk Mar 8, 2024
dd60f3b
PMM-11261 fix linters and tests.
BupycHuk Mar 8, 2024
5cd04a0
PMM-11261 fix linters and tests.
BupycHuk Mar 8, 2024
036dffb
PMM-11261 fix linters.
BupycHuk Mar 13, 2024
ed7bcfe
PMM-11261 fix linters.
BupycHuk Mar 13, 2024
7179b9f
Merge branch 'v3' into PMM-11261-update-via-watchtower
BupycHuk Mar 13, 2024
7111d84
Update managed/cmd/pmm-managed/main.go
BupycHuk Mar 19, 2024
8178764
Update managed/cmd/pmm-managed/main.go
BupycHuk Mar 19, 2024
d66bea8
PMM-11261 Address comments.
BupycHuk Mar 19, 2024
1c3600a
PMM-11261 fix build.
BupycHuk Mar 19, 2024
4d62067
Merge branch 'v3' into PMM-11261-update-via-watchtower
BupycHuk Mar 21, 2024
1967263
Update docker-compose.yml
BupycHuk Mar 27, 2024
671ee0e
Merge branch 'v3' into PMM-11261-update-via-watchtower
BupycHuk Mar 27, 2024
f78a642
Update docker-compose.yml
BupycHuk Apr 2, 2024
cc7bb6f
Update docker-compose.yml
BupycHuk Apr 2, 2024
7bd962b
PMM-12762 Get notified about new version.
BupycHuk Apr 3, 2024
4104986
PMM-11261 Replace switch with if-else
BupycHuk Apr 8, 2024
3374e10
Merge branch 'PMM-11261-update-via-watchtower' into PMM-12762-get-not…
BupycHuk Apr 8, 2024
018ded1
PMM-12762 Fix conflicts, tests and linters.
BupycHuk Apr 8, 2024
2e7228b
PMM-12762 Add license header.
BupycHuk Apr 8, 2024
42baca0
PMM-12762 Get notified about new version.
BupycHuk Apr 15, 2024
32e669d
PMM-12762 Fix deadlock
BupycHuk Apr 15, 2024
302441b
PMM-12762 Fix linters.
BupycHuk Apr 15, 2024
d49ce3f
PMM-12762 add more log info.
BupycHuk Apr 16, 2024
d9357f6
PMM-12762 add more log info.
BupycHuk Apr 16, 2024
b1f4d64
PMM-12762 add more log info.
BupycHuk Apr 16, 2024
fe9a6b9
PMM-12762 add more log info.
BupycHuk Apr 16, 2024
1adc8f5
PMM-12762 add more log info.
BupycHuk Apr 16, 2024
2255735
PMM-12762 add more log info.
BupycHuk Apr 16, 2024
0479c9f
PMM-12762 set PMM version.
BupycHuk Apr 16, 2024
7045e32
PMM-12762 set PMM version.
BupycHuk Apr 16, 2024
9d89d22
Update managed/services/server/updater.go
BupycHuk Apr 16, 2024
e0f768c
Merge branch 'PMM-11261-update-via-watchtower' into PMM-12762-get-not…
BupycHuk Apr 16, 2024
3c36ad6
Merge branch 'v3' into PMM-12762-get-notified-about-new-version
BupycHuk Apr 19, 2024
e07cc83
PMM-12762 fix merge conflicts.
BupycHuk Apr 19, 2024
6291737
Update .github/workflows/managed.yml
BupycHuk Apr 20, 2024
26b57d5
PMM-12762 sort env variables.
BupycHuk Apr 22, 2024
a2766fa
Merge branch 'v3' into PMM-12762-get-notified-about-new-version
idoqo Jun 17, 2024
c6323b7
Merge branch 'v3' into PMM-12762-get-notified-about-new-version
idoqo Jun 22, 2024
dac9a3f
PMM-13028 Non blocking StartUpgrade operation (#2972)
BupycHuk Jun 24, 2024
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
8 changes: 4 additions & 4 deletions api-tests/server/updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ func TestCheckUpdates(t *testing.T) {
require.NotEmpty(t, res.Payload.Latest)
assert.True(t, strings.HasPrefix(res.Payload.Latest.Version, "2."),
"latest.version = %q should have '2.' prefix", res.Payload.Latest.Version)
assert.NotEmpty(t, res.Payload.Latest.FullVersion)
require.NotEmpty(t, res.Payload.Latest.Timestamp)
ts = time.Time(res.Payload.Latest.Timestamp)
hour, min, _ = ts.Clock()
assert.Zero(t, hour, "latest.timestamp should contain only date")
assert.Zero(t, min, "latest.timestamp should contain only date")

if res.Payload.UpdateAvailable {
assert.NotEqual(t, res.Payload.Installed.FullVersion, res.Payload.Latest.FullVersion)
assert.NotEmpty(t, res.Payload.Latest.Tag)
assert.NotEqual(t, res.Payload.Installed.FullVersion, res.Payload.Latest.Version)
assert.NotEqual(t, res.Payload.Installed.Timestamp, res.Payload.Latest.Timestamp)
assert.True(t, strings.HasPrefix(res.Payload.LatestNewsURL, "https://per.co.na/pmm/2."), "latest_news_url = %q", res.Payload.LatestNewsURL)
} else {
assert.Equal(t, res.Payload.Installed.FullVersion, res.Payload.Latest.FullVersion)
assert.Equal(t, res.Payload.Installed.Timestamp, res.Payload.Latest.Timestamp)
assert.Empty(t, res.Payload.Installed.FullVersion, res.Payload.Latest.Version)
assert.Empty(t, res.Payload.LatestNewsURL, "latest_news_url should be empty")
}
assert.NotEmpty(t, res.Payload.LastCheck)
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestCheckUpdates(t *testing.T) {
require.NoError(t, err)

assert.Equal(t, res.Payload.Installed, resForce.Payload.Installed)
assert.Equal(t, resForce.Payload.Installed.FullVersion != resForce.Payload.Latest.FullVersion, resForce.Payload.UpdateAvailable)
assert.Equal(t, resForce.Payload.Latest.Tag != "", resForce.Payload.UpdateAvailable)
assert.NotEqual(t, res.Payload.LastCheck, resForce.Payload.LastCheck)
})
}
Expand Down
10 changes: 5 additions & 5 deletions api/serverpb/json/client/server/check_updates_responses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions api/serverpb/json/client/server/start_update_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions api/serverpb/json/client/server/start_update_responses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions api/serverpb/json/serverpb.json
Original file line number Diff line number Diff line change
Expand Up @@ -720,22 +720,21 @@
"x-order": 4
},
"latest": {
"description": "VersionInfo describes component version, or PMM Server as a whole.",
"type": "object",
"properties": {
"full_version": {
"description": "Full version for debugging.",
"tag": {
"description": "Docker image tag.",
"type": "string",
"x-order": 1
},
"timestamp": {
"description": "Build or release date.",
"description": "Release date.",
"type": "string",
"format": "date-time",
"x-order": 2
},
"version": {
"description": "User-visible version.",
"description": "PMM Version.",
"type": "string",
"x-order": 0
}
Expand Down Expand Up @@ -805,7 +804,13 @@
"in": "body",
"required": true,
"schema": {
"type": "object"
"type": "object",
"properties": {
"new_image": {
"type": "string",
"x-order": 0
}
}
}
}
],
Expand Down
Loading
Loading