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-13133 Upgrade pg_query_go to v5 #3000

Merged
merged 16 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
b0d7b05
Bump google.golang.org/protobuf from 1.32.0 to 1.34.1 in /tools
dependabot[bot] May 15, 2024
bca5ad9
chore: upgrade google.golang.org/protobuf in the root as well
ademidoff May 15, 2024
f506bb7
chore: upgrade github.com/bufbuild/buf to the latest
ademidoff May 15, 2024
b0f14a2
chore: upgrade github.com/pganalyze/pg_query_go to the latest
ademidoff May 15, 2024
daf0293
fix: postgresql query test
ademidoff May 15, 2024
e6a3ab4
fix: pgstatstatements test
ademidoff May 15, 2024
a4e3570
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff May 21, 2024
28342db
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff May 22, 2024
0fb1ba1
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff May 27, 2024
db01613
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff May 29, 2024
e3e14a9
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff Jun 1, 2024
e4baa4a
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff Jun 5, 2024
34261a4
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff Jun 5, 2024
21827d2
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff Jun 5, 2024
563770c
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff Jun 5, 2024
bf09b5b
Merge branch 'main' into dependabot-tools-google.golang.org-protobuf-…
ademidoff Jun 17, 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
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": ""
}

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
2 changes: 1 addition & 1 deletion api/agentlocalpb/agentlocal.pb.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.pb.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/collector.pb.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/inventorypb/agent_status.pb.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/inventorypb/agents.pb.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/inventorypb/log_level.pb.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/inventorypb/nodes.pb.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/inventorypb/services.pb.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/managementpb/actions.pb.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/managementpb/agent/agent.pb.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/managementpb/alerting/alerting.pb.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/managementpb/alerting/params.pb.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/managementpb/annotation.pb.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/managementpb/azure/azure.pb.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/managementpb/backup/artifacts.pb.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/managementpb/backup/backups.pb.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/managementpb/backup/common.pb.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/managementpb/backup/errors.pb.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/managementpb/backup/locations.pb.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/managementpb/backup/restores.pb.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/managementpb/boolean_flag.pb.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/managementpb/checks.pb.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/managementpb/dbaas/components.pb.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/managementpb/dbaas/db_clusters.pb.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/managementpb/dbaas/dbaas.pb.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/managementpb/dbaas/kubernetes.pb.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/managementpb/dbaas/logs.pb.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/managementpb/dbaas/psmdb_clusters.pb.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/managementpb/dbaas/pxc_clusters.pb.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/managementpb/dbaas/templates.pb.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/managementpb/dump/dump.pb.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/managementpb/external.pb.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/managementpb/haproxy.pb.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/managementpb/ia/alerts.pb.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/managementpb/ia/channels.pb.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/managementpb/ia/rules.pb.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/managementpb/ia/status.pb.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/managementpb/metrics.pb.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/managementpb/mongodb.pb.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/managementpb/mysql.pb.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/managementpb/node.pb.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/managementpb/node/node.pb.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/managementpb/pagination.pb.go

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

Loading
Loading