feat(databases-on-aws): add Drizzle ORM guidance to DSQL skill - #266
feat(databases-on-aws): add Drizzle ORM guidance to DSQL skill#266praba2210 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Adds Aurora DSQL guidance and eval coverage for using Drizzle ORM via the newly shipped @aws/aurora-dsql-drizzle adapter, bringing TypeScript/Drizzle to parity with existing ORM guidance.
Changes:
- Adds Drizzle adapter setup/migration gotchas to the ORM overview and language reference docs.
- Extends DSQL linting guidance with Drizzle-specific generation/transform steps.
- Adds new Drizzle-related functional and trigger eval cases; bumps plugin version to 1.9.0.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/evals/databases-on-aws/dsql/trigger_evals.json | Adds trigger/non-trigger queries for Drizzle-on-DSQL vs Drizzle-on-Postgres routing. |
| tools/evals/databases-on-aws/dsql/evals.json | Adds functional evals validating correct Drizzle adapter and migration guidance. |
| tools/evals/databases-on-aws/README.md | Updates eval counts and documents the new Drizzle eval entries. |
| plugins/databases-on-aws/skills/dsql/references/orm-guides/overview.md | Adds Drizzle adapter row and a detailed gotchas section for setup/migrations/retries/FKs. |
| plugins/databases-on-aws/skills/dsql/references/language.md | Adds a Drizzle subsection under JS/TS with key adapter and workflow pointers. |
| plugins/databases-on-aws/skills/dsql/references/dsql-lint.md | Adds Drizzle generation guidance and notes CLI exit codes. |
| plugins/databases-on-aws/skills/dsql/references/auth/connectivity-tools.md | Adds Drizzle adapter row and updates specialized-adapter count. |
| plugins/databases-on-aws/skills/dsql/SKILL.md | Adds Drizzle to description/tags and updates ORM workflow naming/table text. |
| plugins/databases-on-aws/.codex-plugin/plugin.json | Bumps plugin version to 1.9.0. |
| plugins/databases-on-aws/.claude-plugin/plugin.json | Bumps plugin version to 1.9.0. |
| .claude-plugin/marketplace.json | Bumps marketplace plugin version to 1.9.0. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
44b5fb3 to
20ec178
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
20ec178 to
81dc30a
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
81dc30a to
ff5f660
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
|
Looks good to me, but also running agent review now and will update |
Agent-Lead Code reviewThe Drizzle guidance is useful, but I found seven validated issues. The highest-impact issue is the CLI exit-code guidance, which can send users down the wrong recovery path or bypass the skill's existing acknowledgement gate. Validated findings
|
Aurora DSQL shipped @aws/aurora-dsql-drizzle, which the skill had no coverage of. Adds a Drizzle gotchas section to the ORM guide at EF Core depth, registers the adapter in language.md, connectivity-tools.md, dsql-lint.md, and the SKILL.md triggers and workflow. Adds two functional evals and three trigger cases. Version goes to 1.9.0 since #261 already claims 1.8.0.
ff5f660 to
52f65cc
Compare
|
Thanks — ran all seven against
On the FK note: native foreign-key handling needs |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
| - **Prisma:** Use `prisma migrate diff --from-empty --to-schema-datamodel ./prisma/schema.prisma --script` to emit SQL to stdout, then lint. | ||
| - **Drizzle:** Run `npx aurora-dsql-drizzle generate --out ./drizzle -- --config drizzle.config.ts` — the adapter runs `drizzle-kit generate` and pipes each statement through `dsql-lint`, preserving `--> statement-breakpoint` markers (`transform` and `lint` run those steps alone). It lints one statement at a time, so cross-statement fixes do not apply — see [orm-guides/overview.md](orm-guides/overview.md). | ||
| `aurora-dsql-drizzle` exit codes differ by mode — `generate` and `transform` run `dsql-lint --fix`, `lint` only reports: | ||
| - `generate`, `transform`: `0` clean — apply the migration; `1` some diagnostics need a hand-written rewrite — see Handling Unfixable Errors below; `3` fixed with advisories — review the flagged statements, then apply. One advisory statement sets `3` for the whole run, e.g. `NOT VALID` added to a foreign key. |
There was a problem hiding this comment.
This should preserve the workflow’s existing acknowledgement requirement for fixed_with_warning output. “Review, then apply” could allow an agent to proceed without user acknowledgement.
Suggested replacement:
3fixed with advisories — show the diagnostics and transformed SQL to the user, obtain acknowledgement, then apply.
|
|
||
| ### Drizzle (TypeScript) | ||
|
|
||
| Requires `drizzle-orm` `^0.45` (0.45.x — the peer range pins the minor), `pg` 8+, Node.js 20+, and |
There was a problem hiding this comment.
The foreign-key behavior below requires @aws/dsql-lint 0.2.17+, but the published adapter accepts versions starting at 0.2.14. Please add the version floor here so existing lockfiles cannot silently remove foreign keys.
Suggested language:
Requires
drizzle-orm^0.45,pg8+, Node.js 20+,drizzle-kitas a dev dependency, and@aws/dsql-lint0.2.17+. Update older lockfiles before generating migrations.
Adds Aurora DSQL guidance for the newly shipped
@aws/aurora-dsql-drizzleadapter, bringing Drizzle to parity with the existing EF Core coverage.Related
Changes
New content
references/orm-guides/overview.md—Drizzle (TypeScript)section: adapter row, requirements, and an 11-row gotchas table (setup, requireduser, OCC retry, retry exhaustion, migrations, generate,SERIAL, breakpoints, identity columns, foreign keys, resume). Placed between Django and EF Core to keep the file alphabetical.references/language.md—#### Drizzleunder JavaScript/TypeScript, alphabetically before Prisma.tools/evals/.../evals.json— evals 22 (data-layer setup) and 23 (migration failure), LLM-judge, 4 assertions each.tools/evals/.../trigger_evals.json— 2 should-trigger cases, 1 should-not-trigger control (Drizzle against self-hosted PostgreSQL).Extended existing content
SKILL.md— Drizzle added to the description, tags, ORM-guides table, and the Workflow 11 heading.references/auth/connectivity-tools.md— Drizzle row in the adapters table; count 4 → 5.references/dsql-lint.md— Drizzle added to the ORM-output list, plus a bullet foraurora-dsql-drizzle generateand the CLI exit codes.references/orm-guides/overview.md— Drizzle added to the shared foreign-key preamble (raw-SQL hook and composite-mapping lists).tools/evals/databases-on-aws/README.md— counts (21→23 prompts, 85→93 assertions, 37→40 trigger cases) and two table rows.Verification — every technical claim was checked against the adapter source, its committed example migrations, and live
dsql_lint: peer ranges andengines, the required-userguard, optionalregion, retry defaults and argument order,sys.wait_for_job, breakpoint rejection, CLI exit codes, theserial_typeandat_unsupported_alter_column_add_generatedrules, and that drizzle-kit emits noIF NOT EXISTS.mise run lint,fmt:check, andtest(125 passed) are green.Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.