Skip to content

Commit

Permalink
Merge branch 'main' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Jun 24, 2024
2 parents f97f194 + 413cf3e commit 0b405e8
Show file tree
Hide file tree
Showing 61 changed files with 930 additions and 917 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push to registries
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./.devcontainer/Dockerfile
context: .
Expand Down
2 changes: 1 addition & 1 deletion agent/agents/postgres/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sort"
"strings"

pgquery "github.com/pganalyze/pg_query_go/v2"
pgquery "github.com/pganalyze/pg_query_go/v5"
"github.com/pkg/errors"
)

Expand Down
7 changes: 6 additions & 1 deletion agent/agents/postgres/parser/testdata/query019.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"error": "error on parsing sql query: subquery in FROM must have an alias"
"tables": [
"credit_card_wo_complaints",
"without_complaints"
],
"error": ""
}

2 changes: 1 addition & 1 deletion agent/agents/postgres/pgstatmonitor/stat_monitor_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"time"

"github.com/AlekSi/pointer"
pgquery "github.com/pganalyze/pg_query_go/v2"
pgquery "github.com/pganalyze/pg_query_go/v5"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"gopkg.in/reform.v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,12 @@ func TestPGStatStatementsQAN(t *testing.T) {
require.Len(t, buckets, 1)

var fingerprint string
tables := []string{tableName}

switch engineVersion {
case "9.4", "9.5", "9.6":
fingerprint = fmt.Sprintf(`INSERT /* CheckMBlkReadTime controller='test' */ INTO %s (customer_id, first_name, last_name, active) VALUES (?, ?, ?, ?)`, tableName)

tables = []string{}
default:
fingerprint = fmt.Sprintf(`INSERT /* CheckMBlkReadTime controller='test' */ INTO %s (customer_id, first_name, last_name, active) VALUES ($1, $2, $3, $4)`, tableName)
}
Expand All @@ -412,7 +414,7 @@ func TestPGStatStatementsQAN(t *testing.T) {
Queryid: actual.Common.Queryid,
Fingerprint: fingerprint,
Database: "pmm-agent",
Tables: []string{tableName},
Tables: tables,
Comments: map[string]string{"controller": "test"},
Username: "pmm-agent",
AgentId: "agent_id",
Expand Down
16 changes: 8 additions & 8 deletions api/agentlocalpb/agentlocal.pb.go

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

Loading

0 comments on commit 0b405e8

Please sign in to comment.