Skip to content
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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OSCTRL_VERSION=0.5.9
OSCTRL_VERSION=0.6.0
OSQUERY_VERSION=5.23.1
NGINX_VERSION=1.31.0-alpine
POSTGRES_VERSION=13.5-alpine
Expand Down
2 changes: 1 addition & 1 deletion cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ func initializeLoggers(cfg config.YAMLConfigurationService) {
}

// @title osctrl API
// @version 0.5.9
// @version 0.6.0
// @description API service for osctrl, a fast and efficient osquery management solution.
// @termsOfService https://github.com/jmpsec/osctrl
// @contact.name osctrl
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/features/health/HealthPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function makeStatus(overrides: Partial<HealthStatus> = {}): HealthStatus {
{ id: 'tls', name: 'osctrl-tls', status: 'stale', summary: 'last reported 4m0s ago' },
{ id: 'workers', name: 'Workers', status: 'degraded', summary: 'alerts worker dropped 12 hits' },
],
upgrade: { current: '0.5.8', suggested: '0.5.8', latest: '0.5.9', up_to_date: true, checked: true, skew: false },
upgrade: { current: '0.5.8', suggested: '0.5.8', latest: '0.6.0', up_to_date: true, checked: true, skew: false },
...overrides,
};
}
Expand Down Expand Up @@ -156,13 +156,13 @@ describe('HealthPage', () => {

it('shows upgrade status and hides the skew row when versions agree', async () => {
renderPage();
expect(await screen.findByText('0.5.9')).toBeInTheDocument();
expect(await screen.findByText('0.6.0')).toBeInTheDocument();
expect(screen.queryByText(/version mismatch/i)).not.toBeInTheDocument();
});

it('calls out version skew between services', async () => {
mockGetHealth.mockResolvedValue(makeStatus({
upgrade: { current: '0.5.8', suggested: '0.5.8', latest: '0.5.9', up_to_date: true, checked: true, skew: true, api_version: '0.5.8', tls_version: '0.5.7' },
upgrade: { current: '0.5.8', suggested: '0.5.8', latest: '0.6.0', up_to_date: true, checked: true, skew: true, api_version: '0.5.8', tls_version: '0.5.7' },
}));
renderPage();
expect(await screen.findByText(/version mismatch/i)).toBeInTheDocument();
Expand Down
2 changes: 1 addition & 1 deletion osctrl-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ info:
url: https://github.com/jmpsec/osctrl/blob/master/LICENSE
termsOfService: https://github.com/jmpsec/osctrl
title: osctrl API
version: 0.5.9
version: 0.6.0
paths:
/:
get:
Expand Down
6 changes: 3 additions & 3 deletions pkg/health/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ func TestUpgradeInfoBeforeAnyCheck(t *testing.T) {

func TestUpgradeInfoAfterCheck(t *testing.T) {
c := NewVersionCache("0.5.8")
c.Set(version.VersionData{LatestRelease: "0.5.9", SuggestedRelease: "0.5.8"})
c.Set(version.VersionData{LatestRelease: "0.6.0", SuggestedRelease: "0.5.8"})
info := c.Info("0.5.8")
require.True(t, info.Checked)
require.Equal(t, "0.5.9", info.Latest)
require.Equal(t, "0.6.0", info.Latest)
require.Equal(t, "0.5.8", info.Suggested)
require.False(t, info.Skew)
}

func TestUpgradeInfoReportsServiceSkew(t *testing.T) {
c := NewVersionCache("0.5.8")
c.Set(version.VersionData{LatestRelease: "0.5.9", SuggestedRelease: "0.5.8"})
c.Set(version.VersionData{LatestRelease: "0.6.0", SuggestedRelease: "0.5.8"})
info := c.Info("0.5.7")
require.True(t, info.Skew)
require.Equal(t, "0.5.7", info.TLS)
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

const (
// OsctrlVersion to have the version for all components
OsctrlVersion = "0.5.9"
OsctrlVersion = "0.6.0"
// OsqueryVersion to have the version for osquery defined
OsqueryVersion = "5.23.1"
// VersionDataURL to have the URL to retrieve the latest version for all osctrl components
Expand Down
Loading