Skip to content

fix(bb-distributed-data): validate SQL with dsql-lint - #446

Open
amaksimo wants to merge 6 commits into
aws-devtools-labs:mainfrom
amaksimo:docs/refresh-dsql-compatibility
Open

amaksimo wants to merge 6 commits into
aws-devtools-labs:mainfrom
amaksimo:docs/refresh-dsql-compatibility

Conversation

@amaksimo

@amaksimo amaksimo commented Aug 26, 2026 •

Copy link
Copy Markdown

Problem

bb-distributed-data maintained its own Aurora DSQL compatibility rules. Those rules had drifted from DSQL and rejected supported SQL, including foreign keys.

Issue #, if available: None

Changes

  • Replace the duplicated compatibility rules with @aws/dsql-lint 0.2.x for local and synth-time migration validation.
  • Allow foreign keys and verify that the local mock enforces them.
  • Keep the block's transaction, row-limit, and runtime DDL permission checks.
  • Correct the database-selection guidance: Aurora DSQL is PostgreSQL wire-protocol compatible and supports foreign keys and SQL-language functions; row-level security, triggers, procedures, and PL/pgSQL functions still require Database.
  • Link to the official Aurora DSQL SQL compatibility documentation for the complete support matrix.

The foreign-key lint support was released in awslabs/aurora-dsql-tools#147.

Validation

  • Live Aurora DSQL cluster: foreign keys created and enforced; row-level security, CREATE TRIGGER, CREATE PROCEDURE, and LANGUAGE plpgsql were rejected; LANGUAGE SQL functions succeeded.
  • npm run build
  • mise exec node@22 -- npm test --workspace @aws-blocks/bb-distributed-data (159 passed)
  • npm run lint
  • npm run lint:deps
  • npm run check:api
  • npm run sync-docs:check
  • Changeset and catalog tests (45 passed)
  • Full workspace CI pending

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@amaksimo
amaksimo requested a review from a team as a code owner August 26, 2026 18:58
@changeset-bot

changeset-bot Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c34c6f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@aws-blocks/bb-distributed-data Patch
@aws-blocks/blocks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@amaksimo amaksimo changed the title docs(bb-distributed-data): refresh DSQL compatibility fix(bb-distributed-data): validate SQL with dsql-lint Aug 26, 2026
@amaksimo
amaksimo marked this pull request as draft August 26, 2026 23:16
@amaksimo
amaksimo marked this pull request as ready for review August 27, 2026 02:24

This branch has not been deployed

No deployments
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.

1 participant