Skip to content

Commit

Permalink
Merge branch 'main' into PMM-12333
Browse files Browse the repository at this point in the history
  • Loading branch information
surbhat1595 authored Mar 28, 2024
2 parents c0ab3b3 + 4d55273 commit e1bb2c7
Show file tree
Hide file tree
Showing 21 changed files with 721 additions and 486 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:

steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@v2.2.1

workflow_failure:
if: ${{ failure() }}
Expand All @@ -169,4 +169,4 @@ jobs:

steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
uses: rtCamp/action-slack-notify@v2.2.1
6 changes: 3 additions & 3 deletions agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package config
import (
"fmt"
"io/fs"
"log"
"net"
"net/url"
"os"
Expand Down Expand Up @@ -414,10 +413,11 @@ func Application(cfg *Config) (*kingpin.Application, *string) {
}).Bool()

app.Flag("version", "Show application version").Short('v').Action(func(*kingpin.ParseContext) error {
// We use fmt instead of log package to provide proper output for --json flag.
if *jsonF {
log.Println(version.FullInfoJSON())
fmt.Println(version.FullInfoJSON()) //nolint:forbidigo
} else {
log.Println(version.FullInfo())
fmt.Println(version.FullInfo()) //nolint:forbidigo
}
os.Exit(0)

Expand Down
2 changes: 1 addition & 1 deletion agent/serviceinfobroker/service_info_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (sib *ServiceInfoBroker) getPostgreSQLInfo(ctx context.Context, dsn string,
if err != nil && !errors.Is(err, sql.ErrNoRows) {
res.Error = err.Error()
}
res.PgsmVersion = pgsmVersion
res.PgsmVersion = &pgsmVersion

return &res
}
Expand Down
2 changes: 1 addition & 1 deletion agent/serviceinfobroker/service_info_broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func TestServiceInfoBroker(t *testing.T) {
}, 0)
require.NotNil(t, resp)
assert.Equal(t, []string{"postgres", "pmm-agent"}, resp.DatabaseList)
assert.Equal(t, "", resp.PgsmVersion)
assert.Equal(t, "", *resp.PgsmVersion)
})

t.Run("MongoDBWithSSL", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions api-tests/server/advisors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func TestChangeSecurityChecks(t *testing.T) {
}
})

t.Run("change interval error", func(t *testing.T) {
t.Run("unrecognized interval is ignored", func(t *testing.T) {
t.Cleanup(func() { restoreCheckIntervalDefaults(t) })

resp, err := managementClient.Default.SecurityChecks.ListSecurityChecks(nil)
Expand All @@ -185,7 +185,7 @@ func TestChangeSecurityChecks(t *testing.T) {
}

_, err = managementClient.Default.SecurityChecks.ChangeSecurityChecks(params)
pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid value for enum type: \"unknown_interval\"")
require.NoError(t, err)

resp, err = managementClient.Default.SecurityChecks.ListSecurityChecks(nil)
require.NoError(t, err)
Expand Down
844 changes: 423 additions & 421 deletions api/agentpb/agent.pb.go

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion api/agentpb/agent.pb.validate.go

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

2 changes: 1 addition & 1 deletion api/agentpb/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ message ServiceInfoResponse {
// A list of PostgreSQL databases.
repeated string database_list = 4;
// A version of pg_stat_monitor, empty if unavailable.
string pgsm_version = 5;
optional string pgsm_version = 5;
}

// JobStatusRequest is a ServerMessage asking pmm-agent for job status.
Expand Down
Loading

0 comments on commit e1bb2c7

Please sign in to comment.