Skip to content

test(external): bind file access policy in boundary fixtures - #30439

Merged
XuPeng-SH merged 1 commit into
matrixorigin:mainfrom
XuPeng-SH:fix/external-boundary-test-access
Oct 16, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:mainfrom
XuPeng-SH:fix/external-boundary-test-access

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • BUG
  • Test and CI

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 ReadFileOffset test suites construct bare contexts while reading etl: 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

  • Reproduced on clean latest main 47b9690d: the full external package fails with the same four suites and missing-policy error.
  • Full pkg/sql/colexec/external UT: PASS (35.204s, -count=1).
  • Incremental SCA for the changed package: gofmt clean; go vet passed; golangci-lint 2.14.0 / Go 1.27.1: 0 issues.
  • Focused -race run for all four suites and their 28 subcases: PASS (1.163s, -count=1).

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 3ad7ba128aa581a47f73b93b023c796bdf5cc7f1

Review completed. Read the assessment.

@mergify mergify Bot added kind/bug Something isn't working kind/test-ci labels Oct 16, 2026
@matrix-meow matrix-meow added the size/XS Denotes a PR that changes [1, 9] lines label Oct 16, 2026

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

This branch was previously deployed

1 inactive deployment
ci — 3ad7ba12 Deployed Oct 16, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants