检查 Superset 的使用情况,找出适合当前工作方式但尚未使用的功能,给出建议并介绍选项;用户选定后,可协助设置定时运行、并行工作区或共享任务等功能。
- 查找尚未使用的 Superset 功能
- 设置定时运行的智能体
- 在多个工作区并行处理任务
在新的 Neon 分支上生成 Drizzle 数据库迁移,并检查生产环境风险,包括表大小、锁顺序、执行时长和数据迁移;大型或繁忙表的改动还会进行负载演练。
Create a database migration with Drizzle on a fresh Neon branch, and check it is safe to run against production under load. Use when changing the packages/db schema, generating migrations, or reviewing one.
实测评分 未实测
查看安装方法此技能使用 Drizzle 生成数据库结构变更文件,并在应用到生产环境前检查安全性。它会在新的 Neon 分支上试验变更,检查受影响的表大小、锁的获取顺序以及每条 SQL 的执行时间。对于大型或频繁使用的表,还可以使用 pgbench 进行负载演练。
当你要修改 packages/db 中的结构,或审查已经生成的迁移时,可以使用此技能。它能帮助发现列类型变更导致整表重写、锁竞争,以及读取目标切换到新表或新列时遗漏数据迁移等风险。
该项目需要使用 Neon、Drizzle 和 Bun;负载测试还需要 pgbench。迁移只能应用到开发分支;共享和生产数据库应通过指定的部署流程更新。手动编辑生成文件需要明确确认。生产设置下,每条 SQL 的执行时间上限为 60 秒。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月29日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
A migration that is correct on a quiet database can still take production down. On 17 September
2026 migration 0119 rewrote ingest.webhook_events (about 540 GB with indexes) while holding
ACCESS EXCLUSIVE on the auth tables, and took the API down. Generate the migration with the steps
below, then clear the safety checklist before opening the PR.
.env files at it. NEON_ORG_ID and
NEON_PROJECT_ID are in .env; the Neon list_projects tool needs org_id passed in.packages/db/src/schema/.bunx drizzle-kit generate --name="<sample_name_snake_case>" from packages/db.Never hand-edit packages/db/drizzle/ (.sql files, meta/_journal.json, snapshots) without
explicit user confirmation. Change the schema and let drizzle-kit generate write the files. The
one legitimate reason to ask for that confirmation is statement order (rule 3).
.agents/skills/trpc-compat/SKILL.md)Run this read-only against production, with the tables your migration touches:
begin transaction read only;
select c.oid::regclass as table_name,
pg_size_pretty(pg_total_relation_size(c.oid)) as total_size,
c.reltuples::bigint as approx_rows
from pg_class c
where c.oid in ('ingest.webhook_events'::regclass, 'automation_events'::regclass);
rollback;
Sizes on 2026-09-19, indexes included:
| Table | Size | Rows |
|---|---|---|
ingest.webhook_events | about 540 GB | ~199M |
automation_events | about 245 GB | ~54M |
PgDialect.migrate in drizzle-orm 0.45.2 (pg-core/dialect.js) wraps the loop over every pending
migration in a single session.transaction.
ALTER COLUMN ... SET DATA TYPE between types that are not binary-coercible rewrites the whole
table and its indexes under ACCESS EXCLUSIVE. Enum to text on ingest.webhook_events was the
outage.
Safe shapes:
ALTER TYPE ... ADD VALUE.An insert locks its own table, then takes RowShare on each foreign-key parent. DROP TABLE ... CASCADE, DROP CONSTRAINT and ADD CONSTRAINT ... FOREIGN KEY lock the referenced tables too. A
migration that locks a parent before the child deadlocks against in-flight inserts.
auth.organizations before automation_events and
deadlocked 3 attempts out of 3 under load.automation_events statement first fixed it (4 of 4).drizzle-kit picks statement order, so this is the one legitimate reason to hand-order a generated
file. Get explicit user confirmation first, and say why in a SQL comment above the moved statement,
because regenerating restores the bad order. See
packages/db/drizzle/0119_plugin_oauth_clients_and_connectors.sql for the pattern.
| Table | Why it is hot |
|---|---|
auth.users, auth.organizations | Read by every authenticated request. ACCESS EXCLUSIVE for more than a moment is an outage. |
automation_events, ingest.webhook_events | Held in a transaction almost continuously by the dispatch sweep (redispatchUndispatched) and the retention job (enforce-retention). A 5 second lock wait succeeded from about 44% of start times. A migration that needs their table lock should first wait on the job's own advisory lock (the singleFlight key), which lets the running batch finish without queueing inserts; 0122_webhook_events_swap_to_short_retention.sql is the pattern. |
Because of rule 1, a statement queued behind a lock on automation_events keeps every lock the
transaction already holds, including any on the auth tables.
#7317 pointed every integration lookup at a new, empty connections table with no backfill. 2,393
live integrations read as disconnected until packages/trpc/scripts/backfill-connections.ts ran.
CI cannot catch this: unit tests mock the lookup layer
(mock.module("@superset/trpc/connectors", ...)). Ship the backfill with the schema change.
A workspace's own Neon branch is a copy-on-write child of production at the same 0.25 to 2 CU size. A quiet rehearsal is not enough: the first one for 0119 passed in 2.3s and missed the deadlock entirely. pgbench found it immediately.
Rehearse when the migration locks a table in rule 4 or rewrites or scans a large table. A migration that only touches small tables that no job holds open does not need it: check the sizes, the lock order and the statement types, and say in the PR that you did not rehearse and why.
.env
has two DATABASE_URL entries and the last one is the workspace branch.pgbench -n -f reads.sql -f inserts.sql -c <clients> -T <seconds>).PGOPTIONS="-c lock_timeout=5s -c statement_timeout=60s" bun drizzle-kit migrate.Job deploy-database in .github/workflows/deploy-production.yml:
PGOPTIONS: -c lock_timeout=5s -c statement_timeout=60s.packages/db/src/verify-migrations-applied.ts, which fails unless the newest migration
recorded in the database equals the newest journal entry.A migration that needs longer than 60 seconds for one statement fails by design. Do that work online instead (rule 2).
deploy-preview.yml names the Neon branch after the PR head ref and reuses it across pushes. Once
the branch has applied a migration, later pushes that change that migration make the PR's database
check a no-op. Delete the Neon branch to force a real run.
Workflow pitfalls from the same incident (pipefail, production secrets) are in
docs/deploy-workflows.md.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
检查 Superset 的使用情况,找出适合当前工作方式但尚未使用的功能,给出建议并介绍选项;用户选定后,可协助设置定时运行、并行工作区或共享任务等功能。
把重复任务配置为 Superset 自动化,整理智能体指令、定时或事件触发条件及运行工作区。经明确确认后创建设置,检查已保存的条件,并查看首次运行结果以调整指令。
通过 Superset 工作区的浏览器查看网页、点击、输入并检查截图或控制台信息,可用于预览运行中的网页应用、检查界面操作和表单流程。
依据 Stripe 官方文档和 API 参数定义实现支付、订阅、发票及 Webhook 集成,涵盖产品选择、沙盒测试和事件处理,并通过 Webhook 判断支付与订阅状态。
通过 Chrome DevTools Protocol 操作正在运行的 Electron 桌面应用,复现界面问题并验证修改。按实际操作流程检查页面跳转,记录截图,并对照路由、滚动位置、焦点元素和保存状态等信息。
分析 GitHub Actions 失败日志,定位最早的有效错误,区分代码缺陷、环境问题、间歇性失败和原有故障,并对照基准分支说明失败与 PR 的关系及后续处理建议。