Repository navigation
test(external): bind file access policy in boundary fixtures - #30439
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 3ad7ba128aa581a47f73b93b023c796bdf5cc7f1
Assessment: approve
Reviewed all four replacements and their admission, cancellation and cleanup paths. Reusing the existing file-access policy correctly repairs fixture setup without weakening assertions or authorization rules. No production behavior or runtime cost changes; no actionable findings.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Full pkg/sql/colexec/external package passed in 34.686 seconds with -count=1 and -vet=all, including all four repaired suites and 28 subcases.
-
Frozen-base overlay reproduced missing-policy failures in all 28 subcases. Reversing the four replacements reconstructs the base file byte-for-byte, confirming assertion preservation.
-
Isolation preflight, formatting and source-integrity checks passed. Fresh native prerequisites were verified against 192 inputs and seven library hashes.
-
Commands, source fingerprints, exit receipts and retained logs were reconciled in /home/xupeng/.local/state/mo-bot/jobs/16bf83ffa2a5ecb5ae92b481/attempt-1/validation-evidence.json. Source remains unchanged.
Limitations:
-
Frozen CI reports preflight failure and skipped main checks; its failure log was unavailable. No CI success or completed author race run is claimed.
-
One unrelated Arrow integration test skipped because MinIO was not installed. No fresh race or BVT run was required for these sequential fixture-only changes.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30185: test-fixture follow-up to the SQL file access policy introduced by #30212.
The affected boundary tests were introduced by #30364 (related to #30341). Their bare contexts became incompatible when #30212 added mandatory acquisition policy. This PR fixes the resulting base-main UT failure observed in #30297 CI.
What this PR does / why we need it:
Four
ReadFileOffsettest suites construct bare contexts while readingetl:fixtures. The SQL file factory requires an explicit access policy, so all 28 subcases fail at admission before exercising delimiter boundaries and probe ownership.Bind the existing
fileservice.WithSQLFileAccess(t.Context(), "sys", "moadmin")policy in these four fixture contexts, matching neighboring external-reader tests. Preserve every existing row, offset, cancellation, error-precedence and probe-close assertion. Production code and authorization rules are unchanged. One test file, four replacements, zero net added lines.Validation
47b9690d: the full external package fails with the same four suites and missing-policy error.pkg/sql/colexec/externalUT: PASS (35.204s,-count=1).go vetpassed; golangci-lint 2.14.0 / Go 1.27.1: 0 issues.-racerun for all four suites and their 28 subcases: PASS (1.163s,-count=1).