شعار Upgrade Preflight

Upgrade Preflight

مؤسسةشائع
lightdash
upgrade-preflight

تتحقق هذه المهارة مما إذا كان تشغيل ترقية Lightdash مستضافة ذاتيًا آمنًا، وتفسر إجابة الأدوات دون المبالغة في استنتاج ما تعنيه. استخدمها عند ترقية نسخة مستضافة ذاتيًا، أو التخطيط لنافذة صيانة، أو الإجابة عن سؤال «هل هذه الترقية آمنة؟»، أو معالجة عملية ترحيل فاشلة أو معلّقة أو متوقفة أو عالقة بسبب قفل — وتشمل `lightdash upgrade-check` و`migrate preflight`، وكيفية اتخاذ القرار بناءً على رموز الخروج وJSON، والنتائج التي تبدو مطمئنة لكنها تعني «تعذّر التحقق».

Add to TypingMind

نظرة عامة

الناشرlightdash
المستودعlightdash
اسم المهارةupgrade-preflight
النجوم
6.1K
التفريعات
778
الملفات المرفقة
1
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 1

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها lightdash على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Upgrade Preflight في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/lightdash/lightdash/tree/main/skills/upgrade-preflight
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lightdash/lightdash.git /tmp/lightdash
mkdir -p .claude/skills
cp -r /tmp/lightdash/skills/upgrade-preflight .claude/skills/upgrade-preflight
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Upgrade Preflight في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Upgrade Preflight تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Upgrade Preflight بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Upgrade preflight

Decide whether a self-hosted Lightdash upgrade is safe to run, and report the answer accurately.

Scope

Use this when helping an operator upgrade a self-hosted instance: choosing a target version, planning a window, gating a pipeline, or recovering a migration that failed or hung.

Don't use this for Lightdash Cloud (upgrades are managed), dbt or semantic-layer work, or developing Lightdash itself.

The human-facing references are upgrade safety (what the signals mean) and the upgrade runbook (execution sequences, per-platform invocation, recovery, rollback). This skill is the agent-facing layer: what to run, what to branch on, and what not to conclude. Link the operator to those pages rather than paraphrasing them.

Vocabulary

One term per concept, matching the docs: a span is a from-version to a to-version; verdict is upgrade-check's answer about a span; a check is one item the preflight reports; decision is the preflight's overall answer; the lease is the row a migrating node holds while it works.

Two layers, in this order

Two commands. They answer different questions and neither substitutes for the other.

lightdash upgrade-checkmigrate preflight
QuestionIs this span safe in principle?Will this database take it right now?
WhereAnywhere — the @lightdash/cli, no login, no databaseInside the image, with database env credentials
ReadsThe public release-safety index on GitHubThe live database + the artifact baked into the image
Invocationlightdash upgrade-check --from 1.130.0 --to 1.138.0 [--json]pnpm -F backend migrate-production preflight [--json] [--strict] [--force]

Run upgrade-check first. It is the decision layer: it can tell the operator not to attempt the span at all, or that they must stop at an intermediate release, before anyone touches the instance. migrate preflight is the execution layer and cannot see the span — it knows only the image it runs in and the ledger in front of it. A preflight decision of proceed never licenses a span whose verdict was not true.

Gate on exit codes and JSON

Both commands print human text by default and a machine payload under --json. Branch on the exit code, then read named fields — not the rendered text. The words RED, UNSAFE and abort all appear in the prose of runs that are fine, and the human renderer is not a contract.

Exit codes are binary in both commands: 0 success, 1 everything else — an unsafe verdict, an aborted decision, or an error such as an unreachable index or a rejected flag. There is no severity ladder in the exit code; the severity lives in the payload. A non-zero exit means "stop and read the payload", never "this specific thing went wrong".

upgrade-check — branch on safe (boolean). It is true only when verdict is true, requiredStops is empty, and the from-version is not below minPreviousVersion.

  • verdict is tri-state: true, false, or "unknown". "unknown" is not a pass — a release in the span is unindexed or indexed as unknown, so the command fails closed. Report it as "cannot verify this span", never as "clear" or "probably fine". This is the output most likely to be mis-summarised into an all-clear.
  • requiredStops non-empty means the span must be split into several upgrades, not that it is forbidden.
  • A rollback span is rejected with an error rather than a verdict; rollback guidance is in the runbook.

migrate preflight — branch on decision: proceed, proceed-with-warnings, abort, or force-proceed. Equivalently, gate on summary.red and summary.yellow.

  • severity is the class of a check, not its result. postgres-version is always a red-class check; on a healthy server it reports {"severity": "red", "outcome": "pass"} and renders as [RED PASS]. Only severity: "red" with outcome: "fail" is a failure — that pairing is what summary.red counts. Read outcome, or read summary.
  • summary.red > 0 ⇒ abort (or force-proceed if --force was passed). summary.yellow > 0 alone ⇒ proceed-with-warnings; under --strict ⇒ abort. info checks never gate.
  • The payload prints before the command exits, so on an abort you get the full JSON on stdout and the reason on stderr with exit 1. Parse the payload rather than treating the exit code as opaque.
  • migrate up runs this same gate internally before claiming the lease, so a red check blocks the upgrade whether or not anyone ran preflight first. Running it separately buys the answer before the window, not a different answer.

Full worked payloads for both commands, with every field annotated: output reference.

The readings that look calm but are not

proceed-with-warnings is not proceed. It is a distinct decision and it exits 0. Every yellow check is something a human chose to be told about — surface each one with its message, rather than collapsing the run to "preflight passed".

A version-path yellow means the image cannot verify its own upgrade path. {"id": "version-path", "severity": "yellow", "outcome": "warn"} means no baked release-safety.json was found. Required-stop verification was skipped, not satisfied — and because that artifact is also what tells the preflight which tables the pending migrations touch, its absence blinds three more checks:

  • held-locks and long-transactions get no table list, so they report pass — "No other sessions hold relation locks on pending-migration DDL tables" — having looked at nothing.
  • disk-headroom reports pass with data.applicable: false.
  • Every pending-migrations entry carries metadataAvailable: false and an empty tables array.

An artifact-less image therefore produces one yellow and three reassuring passes. When version-path warns, describe the lock, transaction and disk checks as unverified rather than clear, and rely on upgrade-check for the span question — it reads the public index and does not depend on the image. metadataAvailable: false on individual migrations means the same thing at a finer grain.

A quiet activity reading can mean "could not look". held-locks and long-transactions report outcome: "warn" with a non-null data.probeError when the probe itself failed — a restricted role, a dropped connection — and data.locks / data.transactions are empty in that case exactly as they are in a clean read. Check probeError before describing a table as quiet.

A disk-headroom pass has three meanings. Read data: applicable: false means no pending migration is known to scan or rewrite, so nothing was measured; source: "unavailable" means PostgreSQL cannot report free space and no external signal was configured (the operator sets MIGRATION_PREFLIGHT_DISK_HEADROOM_BYTES to give the check a number to compare against data.minimumBytes). Only source: "configured" with sufficient availableBytes is a measured pass.

A fresh-install pass says nothing about upgrading. An empty knex_migrations ledger makes version-path pass with "this is a fresh install rather than an upgrade path" — a statement about the ledger, not a verdict on a span.

Severity encodes consequence, not size. pending-migrations is info however many migrations it lists, and a single held AccessExclusiveLock on a small table is a yellow worth stopping for. Rank findings by what they do, never by counts in the payload — and note the preflight emits no timing or row-count figures at all, so any duration quoted for a migration window is invented. Describe the shape of the risk and let the operator time it.

Decisions that belong to the operator

Four actions are deliberately reserved for a human. The agent's job in each is to produce the evidence and hand over.

  • --force — report the failing checks from the abort payload and stop there. It is the operator's override: pass --force only when they instruct it after seeing those checks, and echo back which checks are being overridden first. It converts an abort into force-proceed, exits 0, and prints an override banner to stderr.
  • --actor — migrate unlock requires an attribution string, and it is written into the lease and run history as the person who cleared it. Ask the operator for their identity and pass exactly that (--actor "alex@example.com"); a placeholder, a hostname or the agent's own name would attribute the unlock to someone who did not authorise it.
  • A parked lease — parked means the migrator exhausted its retries and stopped on purpose, and it refuses to re-run the same app version. Report the parked state with its failing migration and error, and point to the runbook's recovery section. Retrying is the operator's call once the cause is fixed or a corrected version is deployed.
  • Remediation SQL — the preflight reports conditions and emits no fix script. Hand each finding to the operator and their DBA rather than composing DDL from it.

The verdict is deterministic for a given index, so a re-run that disagrees means the span or the index changed — not that the first answer was noise.

Upgrade checklist

Copy this into the working notes and tick as you go:

markdown
- [ ] Operator has confirmed a database backup (there are no down-migrations)
- [ ] Span checked: `upgrade-check` returns `safe: true` (or every required stop planned as its own hop)
- [ ] Preflight run against the instance: `decision` is `proceed`, or every yellow check surfaced and accepted by the operator
- [ ] Upgrade executed per the runbook for this platform
- [ ] Migrations finished: `migrate status --json` shows `state: idle` with no pending migrations
- [ ] Readiness verified: `/api/v1/readyz` returns 200

Running the commands

Run these exactly as written, substituting only the <angle-bracket> placeholders. upgrade-check runs anywhere the CLI is installed; the migrate commands must run inside the image, with the database environment present.

bash
# 1. Check the span (no login, no database access needed)
lightdash upgrade-check --from <current-version> --to <target-version> --json

# 2. Preflight — Kubernetes, as a one-off run
kubectl exec deploy/<release>-lightdash -- \
  pnpm -F backend migrate-production preflight --json

# 2. Preflight — docker compose, in a throwaway container
docker compose run --rm --entrypoint pnpm lightdash \
  -F backend migrate-production preflight --json

# 3. Inspect state at any point
kubectl exec deploy/<release>-lightdash -- \
  pnpm -F backend migrate-production status --json

# 4. Verify readiness after the upgrade
curl -sS -o /dev/null -w '%{http_code}\n' https://<host>/api/v1/readyz

In CI, add --strict so warnings block the pipeline rather than passing with a decision no one reads.

Preflight opens a database connection but changes nothing, so it is safe to run ahead of a window. Prefer a one-off Job over exec-ing into a serving pod when you want a clean run — the runbook has the full manifests, the Helm sequence and the readiness checks.

When a migration is already in flight

migrate status [--json] reports a state of idle, migrating, stale or parked, plus the lease holder and run history.

  • migrating with a recent heartbeat is healthy work in progress — wait.
  • stale recovers on its own when another node takes over the expired lease.
  • parked is the operator's call (above).

migrate wait [--timeout-ms <ms>] blocks until migrations finish (default 30 minutes, or MIGRATION_WAIT_TIMEOUT_MS) and takes over an expired lease. Give a hung migration time before anyone touches the lease; the runbook's recovery section is the authority on what comes next.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Upgrade Preflight؟

تتحقق هذه المهارة مما إذا كان تشغيل ترقية Lightdash مستضافة ذاتيًا آمنًا، وتفسر إجابة الأدوات دون المبالغة في استنتاج ما تعنيه. استخدمها عند ترقية نسخة مستضافة ذاتيًا، أو التخطيط لنافذة صيانة، أو الإجابة عن سؤال «هل هذه الترقية آمنة؟»، أو معالجة عملية ترحيل فاشلة أو معلّقة أو متوقفة أو عالقة بسبب قفل — وتشمل `lightdash upgrade-check` و`migrate preflight`، وكيفية اتخاذ القرار بناءً على رموز الخروج وJSON، والنتائج التي تبدو مطمئنة لكنها تعني «تعذّر التحقق».

لماذا تستخدم Upgrade Preflight على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Upgrade Preflight عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Upgrade Preflight في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/lightdash/lightdash/tree/main/skills/upgrade-preflight. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Upgrade Preflight؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Upgrade Preflight؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Upgrade Preflight معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Upgrade Preflight مجانية؟

نشرها lightdash على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل
شعار affaan-m

Documentation Lookup

affaan-m
المجتمعشائع

استخدم أحدث وثائق المكتبات وأطر العمل عبر Context7 MCP بدلًا من بيانات التدريب. تُفعّل هذه المهارة لأسئلة الإعداد ومراجع API وأمثلة التعليمات البرمجية، أو عندما تذكر إطار عمل (مثل React،…

40.4K
270.2K
الملفات: 1
عرض
شعار affaan-m

Everything Claude Code

affaan-m
المجتمعشائع

اتفاقيات التطوير وأنماطه لمشروع everything-claude-code. مشروع JavaScript يستخدم تنسيق Conventional Commits.

40.4K
270.2K
الملفات: 1
عرض
شعار openclaw

Discord User Post

openclaw
مؤسسةشائع

انشر رسالة معتمدة بصفتك مستخدم Discord المسجّل دخوله عبر تطبيق Discord لسطح المكتب. استخدم هذا لإعلانات الإصدارات أو غيرها من المنشورات المباشرة التي يكتبها المستخدم على Discord؛ وليس للإرسال إلى قنوات OpenClaw أو الروبوتات…

82.2K
391K
الملفات: 1
عرض
شعار openclaw

Test Audit

openclaw
مؤسسةشائع

استخدم هذه المهارة كلما كتبت الاختبارات أو غيّرتها أو راجعتها أو أجريت مراجعة شاملة لها. بوابة اعتماد للاختبارات الجديدة، إضافة إلى سير عمل لتدقيق الاختبارات منخفضة القيمة أو المرتبطة بالتنفيذ أو المكررة، وواجهات…

82.2K
391K
الملفات: 1
عرض

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇