Skip to content
Connect an agent
Hosted diagrams and plans

The drift dashboard

The drift dashboard shows, in one place, which diagrams across an organisation's repositories still match the files they are drawn from. The GitHub Action finds drift in each repository by itself on every plan; with report-drift turned on, each run also sends what it found to the organisation's Drift tab in the portal.

For
  • GitHub Actions

TL;DR

QuestionAnswer
How do I turn it on?Give the Action's generate step report-drift: true and an organisation key in PLOTWORK_API_KEY.
What is sent?Metadata only: the repository, the ref, the commit, the event, the run and pull request links, and per diagram its name, path, status, change counts and CODEOWNERS owners. Never a diagram, a file, or the names of what changed.
Where do I read it?The organisation's Drift tab in the portal. Every member can read it, readers included.
What narrows it?Stale only (drifted or failed), and one owner or team, or the diagrams with no owner.
Which plan?Pro and Enterprise. On Free a report is refused with a notice and nothing is stored; the check itself still runs.
How long is a run kept?By the organisation owner's plan, in the table under How long runs are kept.
Can it fail my build?No. A refused or unsent report is a notice in the log; the check's own result decides the exit code.

1. Turn on reporting

  1. In the portal, open the organisation and choose the Keys tab. Make a key that can do diagrams ("Diagrams" or "Diagrams and the audit log"). A key made "Audit log only" cannot send a report, and a personal key is refused.
  2. Store it as a repository or organisation secret named PLOTWORK_API_KEY.
  3. Add report-drift: true to the step that runs generate, and pass the key to that step.
yaml
name: diagramson:  pull_request:  push:    branches: [main]permissions:  contents: readjobs:  check:    runs-on: ubuntu-latest    steps:      - uses: actions/checkout@v7        with:          persist-credentials: false      - uses: plotwork-official/plotwork-action@dcec4036897b73bd3ea724b3991f4fd0ac880757 # v1.0.0-beta.14        with:          command: generate          mode: check          report-drift: true        env:          PLOTWORK_API_KEY: ${{ secrets.PLOTWORK_API_KEY }}

The samples pin the latest release of the Action by its commit. @v1 becomes available at the first stable release.

The run reports to the organisation named by the rules-org input, else by brand.organization in the repository's plotwork.config.json, else to the key's own organisation. Reporting works in check mode and in write mode. A pull request from a fork gets no secrets from GitHub Actions, so its run says the key is missing and reports nothing.

When the report is stored, the run logs a notice, "Sent to the drift dashboard", with a link to the organisation's Drift tab.

2. What is sent

The Action builds the report from the run's own result and leaves everything else out. The diagram is compared with its files on the machine that runs the job; only the outcome travels.

SentNot sent
The repository's owner/name, the git ref, the commit, the eventA diagram's source or picture
Links to the run and to the pull requestA file's content, or a path a source reads
For each diagram: its name from the settings, its output path, its statusThe names or details of what was added, removed or changed
How many items were added, removed and changed, and how many errorsThe key, which goes only in a header
Its owners, as CODEOWNERS writes them for the diagram and its sourcesAnything about the person who pushed

A diagram's status is one of four:

StatusMeaning
In stepThe diagram matches its files.
DriftedThe files changed and the diagram did not.
WrittenThe run wrote the diagram again.
FailedThe run could not make the diagram.

One report holds up to 250 diagrams, and each diagram up to 20 owners. A repository with more diagrams splits its generate settings.

Each run replaces what its repository showed before. A diagram taken out of the repository's settings leaves the dashboard with the next run. The organisation's audit log records that CI sent a report, with the repository and how many diagrams it checked.

3. Read the Drift tab

Open the organisation in the portal and choose the Drift tab. Nothing on it changes anything; only CI writes to it.

PartWhat it shows
TotalsRepositories, diagrams, drifted and failed, across every report, before any filter
A repository cardIts name, when it was last checked, and links to its latest run and pull request
A diagramIts status as a mark and a word, its name and path, its change counts, and its owners
OrderFailed and drifted diagrams first, so a stale one is never below an in-step one

Two filters narrow the list, and the tab says how many diagrams they leave:

FilterNarrows to
Stale onlyDiagrams that drifted or failed
Owner or teamOne owner from those the diagrams name, or the diagrams with no owner in CODEOWNERS

Show all clears both. Owners come from the repository's CODEOWNERS, so a team that owns the folder a diagram is written to, or the files it is drawn from, sees its diagrams by choosing its handle.

4. How long runs are kept

The organisation owner's plan decides, and a daily clean-up removes older runs and statuses:

PlanDrift dashboardRuns kept
FreeNoNothing is stored
ProYes90 days
EnterpriseYes365 days, or the days the contract sets

The dashboard goes with the organisation when it is deleted.

5. Plans

The dashboard belongs to the organisation owner's plan, like the organisation's other limits.

The owner's planWhat happens
FreeThe Action still checks every diagram and fails the pull request on drift. A report is refused with plan.drift_dashboard_not_included, logged as a notice, and nothing is stored. The Drift tab offers the owner the plans and tells everyone else the owner can upgrade.
Pro or EnterpriseReports are stored and shown.
Moved down to FreeThe tab stops showing reports at once, and the next daily clean-up removes what was stored.

See also

PageWhy
Diagrams in CIThe Action's check and its inputs
Enterprise rolloutReusable workflows, required checks and CODEOWNERS across many repositories
OrganisationsRoles, and the organisation keys a report needs
Audit logThe record of each report CI sent
Plans and billingWhat Pro and Enterprise include
Privacy policyWhat the dashboard stores, and for how long