feat(tenancy): create database using schema from existing tenant when a project is in tenant mode#295
Merged
Conversation
…Issue() and consolidate validateOnly issue creation
… a project is in tenant mode
|
Your Render PR Server URL is https://internal-preview-pr-295.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-c76kd9pg7hp1tkm2qvjg. |
Contributor
Author
tianzhou
requested changes
Dec 30, 2021
spinningbot
commented
Dec 30, 2021
tianzhou
requested changes
Dec 30, 2021
spinningbot
commented
Dec 30, 2021
tianzhou
requested changes
Dec 30, 2021
spinningbot
commented
Dec 30, 2021
h3n4l
added a commit
that referenced
this pull request
Jun 10, 2026
…SpanWithCatalog Activates the omni lineage fixes for the seven audited Trino under-masking vectors (BYT-9674..BYT-9680, sub-issues of BYT-9142): columns reaching a sensitive base column through derived tables, CTEs, UNNEST, scalar subqueries, set-operation arms, views, and SELECT * over derived relations previously had empty/wrong lineage, so the result masker fell through to NoneMasker and returned the values unmasked. - Bump github.com/bytebase/omni to v0.0.0-20260610061900 (bytebase/omni#286 additive lineage resolver, #296 provably-width-correct star expansion, #295 catalog-aware view lineage). - The query-span extractor now calls analysis.GetQuerySpanWithCatalog with a catalog built from instance metadata: views carry their defining query (so lineage through a view reaches the base-table columns masking config attaches to) and tables carry their column lists (so omni expands SELECT * to the exact projection — the positional masker stays aligned). Catalogs load lazily and TRANSITIVELY: a view definition referencing another catalog pulls that catalog in, so cross-catalog views resolve. Metadata fetches reuse the extractor's cache. - completion.go fills catalog.View.Definition too (shared catalog model). - IsPlainField now keys on the mapped physical source set (the additive resolver restates a plain column as written + qualified refs, which dedupe back to one column); inert for Trino, documented drift for repeated-column expressions. Tests: 7 consumer-level audit regressions (query_span_lineage_test.go, one per leak vector — including the SELECT*-over-derived positional repro pinned at exact width/order) + 8 view-lineage tests carried from the superseded #20560 plus a new cross-catalog view test. Full trino parser/schema + api/v1 suites green. Notes for review: - omni now surfaces a view definition's base tables in AccessTables, so access checks also consider tables read through views (visibility change). - The pre-existing USING/NATURAL-join opaque-star positional residual is unchanged: appended view-def tables land at the END of AccessTables, beyond the executed result width, so they are never indexed by the masker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d-bytebase
pushed a commit
that referenced
this pull request
Jun 10, 2026
…alog (BYT-9674..9680) (#20565) * feat(trino): catalog-aware masking lineage — bump omni, wire GetQuerySpanWithCatalog Activates the omni lineage fixes for the seven audited Trino under-masking vectors (BYT-9674..BYT-9680, sub-issues of BYT-9142): columns reaching a sensitive base column through derived tables, CTEs, UNNEST, scalar subqueries, set-operation arms, views, and SELECT * over derived relations previously had empty/wrong lineage, so the result masker fell through to NoneMasker and returned the values unmasked. - Bump github.com/bytebase/omni to v0.0.0-20260610061900 (bytebase/omni#286 additive lineage resolver, #296 provably-width-correct star expansion, #295 catalog-aware view lineage). - The query-span extractor now calls analysis.GetQuerySpanWithCatalog with a catalog built from instance metadata: views carry their defining query (so lineage through a view reaches the base-table columns masking config attaches to) and tables carry their column lists (so omni expands SELECT * to the exact projection — the positional masker stays aligned). Catalogs load lazily and TRANSITIVELY: a view definition referencing another catalog pulls that catalog in, so cross-catalog views resolve. Metadata fetches reuse the extractor's cache. - completion.go fills catalog.View.Definition too (shared catalog model). - IsPlainField now keys on the mapped physical source set (the additive resolver restates a plain column as written + qualified refs, which dedupe back to one column); inert for Trino, documented drift for repeated-column expressions. Tests: 7 consumer-level audit regressions (query_span_lineage_test.go, one per leak vector — including the SELECT*-over-derived positional repro pinned at exact width/order) + 8 view-lineage tests carried from the superseded #20560 plus a new cross-catalog view test. Full trino parser/schema + api/v1 suites green. Notes for review: - omni now surfaces a view definition's base tables in AccessTables, so access checks also consider tables read through views (visibility change). - The pre-existing USING/NATURAL-join opaque-star positional residual is unchanged: appended view-def tables land at the END of AccessTables, beyond the executed result width, so they are never indexed by the masker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(trino): extract shared loadCatalogMetadata for completion + span catalog builders SonarCloud flagged the span-catalog builder as a structural clone of the completion builder (26.1% duplication on new code). One helper now populates a catalog's schemas/tables/views (with definitions) for both paths; the span builder keeps its transitive worklist, completion its per-keystroke shape. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.