Skip to content

[ENG-1012] docs: cancelling runs from CI - #60

Open
agoldis wants to merge 7 commits into
mainfrom
docs/currents-cancel
Open

[ENG-1012] docs: cancelling runs from CI#60
agoldis wants to merge 7 commits into
mainfrom
docs/currents-cancel

Conversation

@agoldis

@agoldis agoldis commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

User description

Documents cancelling a Currents run from CI: the currents cancel command (currents-dev/currents-reporter#380, backend currents-dev/currents#3279) and the GitHub action (currents-dev/cancel-run-gh-action#11).

What changed

  • New page resources/reporters/currents-cmd/currents-cancel.md — usage, GitHub Actions and GitLab examples, and the behaviours worth knowing: it is safe for every job of a parallelized run to call it, and cancelling before any results were uploaded succeeds rather than failing the step.
  • New page getting-started/ci-setup/github-actions/cancel-runs.md — the GitHub Actions article: the if: cancelled() step, which credential to use, a full workflow, and how it pairs with concurrency: cancel-in-progress: true, which is what creates abandoned runs in the first place.
  • getting-started/ci-setup/github-actions/README.md — the section landing page was an empty heading. It now lists what is in the section, grouped as setup, reruns and cancellation.
  • dashboard/runs/cancel-run.md — new "Cancelling Runs from CI" section, and the GitHub action examples now use the record key the job already has. The API key is documented as the second option rather than the only one, and the stale "api-token, github-run-id and github-run-attempt are still required" note is gone — none of them are required now.
  • NavigationSUMMARY.md entries for both new pages.

Note on timing

The command ships in a future @currents/cmd release and the action in a new v1 tag; the director route both call has to be deployed first. Worth holding this until they are out.


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Document how the currents cancel CLI and the cancel-run-gh-action GitHub action stop in-progress Currents runs when a workflow is cancelled. Update the dashboard docs and GitHub Actions guides to explain credentials, run identification, and the new cancellation pages in navigation.

TopicDetails
GitHub Actions Add GitHub Actions guidance for cancelling a workflow cleanly, including the cancel-run-gh-action step, example workflow inputs, and section navigation.
Modified files (4)
  • SUMMARY.md
  • dashboard/runs/cancel-run.md
  • getting-started/ci-setup/github-actions/README.md
  • getting-started/ci-setup/github-actions/cancel-runs.md
Latest Contributors(2)
UserCommitDate
agoldis@gmail.comdocs: name the run ID ...July 26, 2026
agoldis@users.noreply....docs: add AI section o...July 22, 2026
Cancel runs Document cancelling in-progress runs from CI with currents cancel, covering authentication, run identification, and the cases where repeated or early cancellation still succeeds.
Modified files (3)
  • dashboard/runs/cancel-run.md
  • resources/reporters/currents-cmd/README.md
  • resources/reporters/currents-cmd/currents-cancel.md
Latest Contributors(2)
UserCommitDate
agoldis@gmail.comdocs: name the run ID ...July 26, 2026
miguel@currents.devExamples linksMarch 10, 2026
Review this PR on Baz | Customize your next review

A cancelled CI job stops reporting mid-run, so the run stays in progress until
the project's inactivity timeout. `currents cancel` cancels it using the record
key the job already holds, on any CI provider.

- new page under @currents/cmd, listed in the subcommands and in SUMMARY
- a "Cancelling Runs from CI" section on the cancel-run page, above the API and
  GitHub Action sections
- a note on the GitHub Action section, since that route needs an API key
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 49716659-4679-4a6f-afed-61566845726e

📥 Commits

Reviewing files that changed from the base of the PR and between 616e4ab and 9f2259b.

📒 Files selected for processing (6)
  • SUMMARY.md
  • dashboard/runs/cancel-run.md
  • getting-started/ci-setup/github-actions/README.md
  • getting-started/ci-setup/github-actions/cancel-runs.md
  • resources/reporters/currents-cmd/README.md
  • resources/reporters/currents-cmd/currents-cancel.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/currents-cancel

Comment @coderabbitai help to get the list of available commands.

The GitHub Actions section had no landing page and no cancellation article,
and the cancellation examples still required an API key plus the GitHub run id
and attempt.

- new "Cancel Runs on Workflow Cancellation" article: the `if: cancelled()`
  step, both credentials, and how it pairs with `cancel-in-progress: true`
- the GitHub Actions README now lists what is in the section
- the action examples in cancel-run.md use the record key the job already has,
  with the API key kept as a second option
@agoldis agoldis changed the title docs: add currents cancel docs: cancelling runs from CI Jul 25, 2026
agoldis and others added 2 commits July 24, 2026 22:09
SUMMARY.md conflicted because this branch had rewritten every list marker from
`*` to `-`. Kept main's markers, which is what GitBook writes, and re-added the
two new entries on top.
`currents cancel` now accepts --run-id / CURRENTS_RUN_ID as well as the CI
build id.

Also state what happens when a job does not set CURRENTS_CI_BUILD_ID: the
generated CI build id includes the test framework, so a cancelling step that
rebuilds the value from environment variables does not find the run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYks4ynK7rmCmDuVTVuo1b
Comment thread dashboard/runs/cancel-run.md
Comment thread dashboard/runs/cancel-run.md
Comment thread getting-started/ci-setup/github-actions/cancel-runs.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md
Comment thread resources/reporters/currents-cmd/currents-cancel.md
@agoldis agoldis changed the title docs: cancelling runs from CI [ENG-1012] docs: cancelling runs from CI Jul 26, 2026
Points the input list at the action's README, which is where it is
maintained, rather than at this page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agoldis and others added 2 commits July 26, 2026 00:05
ci-build-id.md recommends `${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}`, and the other cancellation pages already use it. Also moves the GitLab CI build id to the pipeline level, where the reporting job reads the same value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both the command and the action accept either identifier; the intros only mentioned the CI build ID.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant