Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

test-on-staging

БесплатноБез исполняемых скриптовНе проверен

Test a change on a branch's staging server or on Labs — know when a push is live, inspect or patch a chart's config remotely without a browser, pick the right…

owidот owid★ 1 574 звезды на GitHub

Об этом скилле

Testing on staging

  • When a push is live: test or hand over a link only once the commit's buildkite/grapher-automated-staging-environment/grapher-build status is success (usually 1–2 min; earlier, you get the old version): gh api repos/owid/owid-grapher/commits/<sha>/status --jq '.statuses[] | select(.context == "buildkite/grapher-automated-staging-environment/grapher-build") | .state'. Server-rendered pages and bespoke components need …/grapher-bake instead. failure means the push won't show up; after ~10 min, say it may still be building. The bake ends by restarting the site, so a few seconds of failed requests then aren't a bug.
  • On Labs the commit that deploys is the labs branch, which owidbot rebuilds after each push to a PR with the labs label: wait until git fetch -q origin labs && git merge-base --is-ancestor <sha> origin/labs succeeds, then check the status above on the origin/labs tip. Link labs.owid.io; the admin tools below don't work there.
  • yarn tsx devTools/callAdminApi.ts get <chartId> --branch <branch> / set <chartId> '<jsonPatch>' --branch <branch> / unset <chartId> <field> --branch <branch>: inspect or change a chart's config on any staging-site-<branch> (or --host for local/prod) without the browser.
  • Auth is ADMIN_API_KEY in .env — one shared key works against every staging server (not per-branch), since admin_api_keys ships in the private data dump every staging build restores from (see db/exportMetadataTables.ts). It's the same key etl already uses; no need to mint a new one.
  • STAGING=1 yarn startAdminDevServer runs the admin locally against the current branch's staging database (STAGING=<branch> for another branch's), so you see a code change on save instead of after a deploy and a bake. Staging MySQL listens on Tailscale, so it needs no tunnel and no extra credentials. Two things to keep in mind: it is read-write on a database other people may be testing against, and every query pays the round trip (~10x the local latency), so it is somewhere to check behaviour, not to measure performance. STAGING works for any server-side entry point, not just the admin.
  • During the post-push rebake the staging box is saturated — load average ~250 on 16 cores — so anything timed in that window measures the bake, not the code. Check pgrep -f buildLocalBake over ssh before believing a slow number.
  • Don't wait for the static-site rebake (~10-13 min) to check or share a chart — http://staging-site-<branch>/admin/charts/<id>/preview reflects both chart-config edits and pushed code changes within ~1-3 min. Default to this link (not the public /grapher/<slug> page) whenever pointing someone at a chart on staging.
  • A branch's /search and /api/search work without any label: they search production's indices (pages, explorer-views-and-charts, …) with a search-only key that forces Algolia analytics off, so a PR that only changes the search UI or the search API needs nothing and sees the results readers get. The staging-algolia label is for PRs that change what gets indexed (baker/algolia/): it switches the server to the separate staging Algolia application and builds a full index of the branch's own, prefixed staging-site-<branch>-, on every push. Each such index costs ~34k records of the staging application's shared record quota, and when that runs out every labelled bake fails with "You have exceeded your Record quota"; the staging application also has a small monthly search quota, so don't add the label just to get search results, and don't benchmark against a labelled server. To check which index a deployment searches, test through its /search or /api/search rather than probing an app directly.
  • /search deep links and screenshots: add &resultType=all (a bare URL can open on the Data tab and hide Data Insights/Writing), and dismiss the cookie banner first — it's fixed-position and lands mid-page in full-page shots.
Полный SKILL.md на GitHub

Установить test-on-staging в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл test-on-staging?

Test a change on a branch's staging server or on Labs — know when a push is live, inspect or patch a chart's config remotely without a browser, pick the right preview link to share, and know when a PR needs its own search index. Use after pushing a change to check or share on staging-site-<branch> or labs.owid.io, when reading or changing a chart config on a remote server, or when pointing someone at a chart on staging.

Как установить скилл test-on-staging?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл test-on-staging запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить test-on-staging с