Skip to content

Add checkQueryIntegrity call to DispatchManager#24574

Merged
rschlussel merged 1 commit intoprestodb:masterfrom
kevintang2022:add-check-query-integrity-call-to-dispatch
Feb 21, 2025
Merged

Add checkQueryIntegrity call to DispatchManager#24574
rschlussel merged 1 commit intoprestodb:masterfrom
kevintang2022:add-check-query-integrity-call-to-dispatch

Conversation

@kevintang2022
Copy link
Contributor

@kevintang2022 kevintang2022 commented Feb 16, 2025

Description

  • Add checkQueryIntegrity call back to DispatchManager. Based on these past PRs, the check was removed by mistake. This is the PR that moved logic from SqlQueryManager to DispatchManager. This is the PR that added the checkQueryIntegrity call.
  • Update AccessControlContext to include extra fields like catalog and sqlNamespace, which are required for the new type of ACL unifiedcheck.

Motivation and Context

Github issue: https://github.com/orgs/prestodb/discussions/24526

Impact

  • Check query integrity will be called on each query

Test Plan

Add tests to TestQueryManager.java to check for inclusion of catalog and sqlNamespace fields in AccessControlContext.

Contributor checklist

Deployed change to a test cluster and ran verifier tests: https://our.internmc.facebook.com/intern/presto/verifier/results/?test_id=211218

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

@kevintang2022 kevintang2022 marked this pull request as ready for review February 19, 2025 17:39
@kevintang2022 kevintang2022 changed the title Add catalog and schema to access control context Add checkQueryIntegrity call to DispatchManager Feb 19, 2025
@shangm2
Copy link
Contributor

shangm2 commented Feb 19, 2025

LGTM. Thanks for spotting the issue and fixing it. Maybe add a verifier run for testing.

shangm2
shangm2 previously approved these changes Feb 19, 2025
@kevintang2022 kevintang2022 force-pushed the add-check-query-integrity-call-to-dispatch branch from 04496cc to 88852b6 Compare February 19, 2025 17:51
@kevintang2022 kevintang2022 force-pushed the add-check-query-integrity-call-to-dispatch branch 2 times, most recently from 8192ec6 to 5a0b323 Compare February 19, 2025 18:42
@kevintang2022
Copy link
Contributor Author

…AccessControlContext

Add call to check query integrity

Checkstyle

Fix constrcutor usage

Fix usages of constructor

Whitespace

Add test coverage for access control context

Rename to schema from sqlnamespace

Fix catalog name
@kevintang2022 kevintang2022 force-pushed the add-check-query-integrity-call-to-dispatch branch from d85651d to 87fb774 Compare February 20, 2025 17:39
@rschlussel rschlussel merged commit e2ee434 into prestodb:master Feb 21, 2025
53 checks passed
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