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

roachtest: Update lib/pq block list #142038

Merged

Conversation

spilchen
Copy link
Contributor

The recent autocommit_before_ddl change (#141145) has affected three lib/pq tests that were not designed with autocommit behavior in mind.

These tests were executing the following sequence:

BEGIN
CREATE TEMP TABLE
COPY

Since CREATE TEMP TABLE now triggers an auto-commit, the subsequent COPY command fails because it must run inside an active transaction. The error observed was: "pq: COPY is only allowed inside a transaction."

Epic: none
Release note: none

Closes #141899

@spilchen spilchen requested a review from a team February 26, 2025 15:52
@spilchen spilchen self-assigned this Feb 26, 2025
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@annrpom annrpom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty for taking these on; we also want to slap backport labels for this for when we merge the backports for the auto commit pr, right?

@@ -30,6 +30,11 @@ var libPQBlocklist = blocklist{
"pq.TestRowsColumnTypes": "41688",
"pq.TestRuntimeParameters": "12137",
"pq.TestStringWithNul": "26366",
// The following tests fail because they weren't designed for the
// autocommit_before_ddl behaviour in CRDB.
"pq.TestCopyInWrongType": "unknown",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: instead of "unknown", can we put in a short verbal description, or just this PR number so there's a breadcrumb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I couldn't find a suitable precedence for this sort of thing.

The recent autocommit_before_ddl change (cockroachdb#141145) has affected three
lib/pq tests that were not designed with autocommit behavior in mind.

These tests were executing the following sequence:
```
BEGIN
CREATE TEMP TABLE
COPY
```

Since CREATE TEMP TABLE now triggers an auto-commit, the subsequent COPY
command fails because it must run inside an active transaction. The
error observed was: "pq: COPY is only allowed inside a transaction."

Epic: none
Release note: none

Closes cockroachdb#141899
@spilchen spilchen force-pushed the gh-141899/250226/1057/lib/pq/pr-ready branch from 83b0ce6 to 448e551 Compare February 26, 2025 18:20
Copy link
Contributor Author

@spilchen spilchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)

@@ -30,6 +30,11 @@ var libPQBlocklist = blocklist{
"pq.TestRowsColumnTypes": "41688",
"pq.TestRuntimeParameters": "12137",
"pq.TestStringWithNul": "26366",
// The following tests fail because they weren't designed for the
// autocommit_before_ddl behaviour in CRDB.
"pq.TestCopyInWrongType": "unknown",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I couldn't find a suitable precedence for this sort of thing.

@spilchen
Copy link
Contributor Author

spilchen commented Feb 26, 2025

ty for taking these on; we also want to slap backport labels for this for when we merge the backports for the auto commit pr, right?

Yes, good point. I'll get this back ported. I'll leave the labels off this PR because I don't want blathers to create a new PR. Instead I'll cherry pick the commit into these two PRs: #141851 and #141987

@spilchen
Copy link
Contributor Author

TFTR!

bors r+

@craig craig bot merged commit b418813 into cockroachdb:master Feb 26, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roachtest: lib/pq failed
4 participants