Skip to content

[Server] Expect READ METADATA in the shared-parents batch test - #2137

Merged
timothyw553 merged 1 commit into
unitycatalog:mainfrom
shba24:fix-shared-parents-test-read-metadata
Nov 6, 2026
Merged

timothyw553 merged 1 commit into
unitycatalog:mainfrom
shba24:fix-shared-parents-test-read-metadata

Conversation

@shba24

@shba24 shba24 commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes

main's unit tests fail on UnityAccessEvaluatorTest.batchChecksSharedParentsOncePerList, on H2, PostgreSQL and MySQL. Every open PR's "All tests" job fails with it, because CI tests each PR merged with main.

#2105 added the test on a base that did not have #2086 yet. #2086 changed GET_TABLE's parent checks from authorize(OWNER) to authorizeAny(OWNER, READ_METADATA), so on main the test fails with:

Wanted:  authorize(<principal>, metastore, <id>, OWNER)
Actual:  authorizeAny(<principal>, metastore, <id>, OWNER, READ METADATA)

The test now verifies the checks that GET_TABLE makes on main. It still checks what #2105 meant it to check: each shared parent check runs once for the whole list, and only the table's own check runs per item. Test-only change.

Tested: build/sbt "server/testOnly io.unitycatalog.server.auth.decorator.UnityAccessEvaluatorTest", 37/37 pass. Before the change, the test fails on clean main (6e752d4).

This pull request and its description were written by Isaac.

unitycatalog#2105 added batchChecksSharedParentsOncePerList on a base without
unitycatalog#2086, which changed GET_TABLE's parent checks to
authorizeAny(OWNER, READ_METADATA). On main the test fails with
"Wanted authorize(..., metastore, ..., OWNER), actual
authorizeAny(..., metastore, ..., OWNER, READ METADATA)".

The test now verifies the checks GET_TABLE makes on main. It still
checks that each shared parent check runs once for the list.

Signed-off-by: Shubham Bansal <[email protected]>
Co-authored-by: Isaac <[email protected]>
@shba24

shba24 commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@timothyw553
timothyw553 merged commit 7464399 into unitycatalog:main Nov 6, 2026
20 checks passed
@yili-db yili-db mentioned this pull request Nov 6, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants