Repository navigation
fix(redshift-alpha): align qualified table names - #39304
ozelalisen wants to merge 1 commit into
Conversation
|
PRs without a linked issue will receive lower priority for review and merging. Please update the description to follow the PR template and include a line like |
|
|
||||||||||||||
|
|
||||||||||||||
|
Automated review A maintainer will still review this — treat the notes below as a starting point. 📌 Commit This PR ( This is a deliberate breaking change, confined to an experimental module and carrying an explicit 🔴 0 blocking · 🟡 0 recommended · ⚪ 0 optional Generated automatically. React 👍 or 👎 to tell us whether this review helped, so we can improve these reviews. |
Since 2.262.0, Table treats a dotted tableName as one identifier, but grants treat it as schema.table. A grant can then address a different table. - Quote each component of a dotted tableName separately in every table statement. - Complete the rollback of a rejected qualifier change or empty-component name without running statements, for tables created after 2.114.1 that: - keep their created qualifier; - have no empty component in their created or current name; - had no colon in their name, cluster or database at creation. - Those rollbacks still run as ordinary updates for other tables, and can fail again. - An update back to a table's original qualifier can be treated as a rollback and apply nothing, if an earlier release renamed the table without keeping its qualifier. For example, renaming analytics.orders to orders2 left it as analytics.orders2. This change doesn't repair such tables. Validation: - Build, lint and 378 unit tests pass. - Regenerated the six integ snapshots that embed the query provider; outside integ.database, their templates change only in its asset hash. integ.database now uses public.IntegTable and asserts the user's privileges on it. - On a development account, builds with this change: - completed both rollbacks without running statements; - deployed and passed five of the six integ tests, including the integ.database assertion. integ.cluster-distkey could not finish, because it needs more Elastic IP addresses than the account allows. BREAKING CHANGE: Table now interprets dots in tableName as schema.table or database.schema.table for every table operation, as grants already did. Tables created with 2.262.0 or later from a dotted tableName exist as one identifier, for example "analytics.orders" in the default schema; after upgrading, updates and RemovalPolicy.DESTROY deletion address analytics.orders instead. Names with empty components now fail at synthesis, and renames cannot add, remove or change the qualifier.
d4de676 to
045592a
Compare
Reason for this change
Since 2.262.0,
Tabletreats a dottedtableNameas one identifier, but grants treat it asschema.table. A grant can then address a different table.Description of changes
tableNameseparately in every table statement.analytics.orderstoorders2left it asanalytics.orders2. This change doesn't repair such tables.Describe any new or updated permissions being added
Production permissions are unchanged. In
integ.database, a test function can run and read a Redshift Data API query with the administrator secret and write logs, and the assertion can invoke it.Description of how you validated changes
integ.database, their templates change only in its asset hash.integ.databasenow usespublic.IntegTableand asserts the user's privileges on it.integ.databaseassertion.integ.cluster-distkeycould not finish, because it needs more Elastic IP addresses than the account allows.Checklist
BREAKING CHANGE:
Tablenow interprets dots intableNameasschema.tableordatabase.schema.tablefor every table operation, as grants already did. Tables created with 2.262.0 or later from a dottedtableNameexist as one identifier (for example"analytics.orders"in the default schema); after upgrading, updates andRemovalPolicy.DESTROYdeletion addressanalytics.ordersinstead. Names with empty components now fail at synthesis, and renames cannot add, remove or change the qualifier.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license