Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka authored Jun 20, 2024
2 parents cd767f1 + 00cec66 commit 9d94e74
Show file tree
Hide file tree
Showing 73 changed files with 1,062 additions and 1,047 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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
push: true
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 9d94e74

Please sign in to comment.