Skip to content

ci: sync the router-trades Grafana dashboards on each push to main - #1600

Merged
kayibal merged 1 commit into
mainfrom
ci/sync-router-trades-dashboards
Oct 14, 2026
Merged

kayibal merged 1 commit into
mainfrom
ci/sync-router-trades-dashboards

Conversation

@kayibal

@kayibal kayibal commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Moves the Router Trades and Router Trade Detail Grafana dashboards into this repository, and pushes them to Grafana from main-workflow.yaml with the org workflow sync-grafana-dashboards.yaml (propeller-heads/ci-cd-templates#94).

  • crates/tycho-execution/substreams/tycho-router-trades/grafana/ contains the two dashboards, exported from live Grafana on 2026-10-13. Only id and version are removed; the uids (tycho-router-trades, tycho-router-trade-detail) are unchanged, so existing links keep working.
  • The new sync-router-trades-dashboards job runs on every push to main, independently of the other jobs. It sends only the dashboard files the push changed, to the tycho folder (cedg0rrcu7h1cb). When no dashboard changed, it sends nothing.
  • .github/workflows/README.md describes the job and how to change a dashboard: edit in Grafana, export the JSON, commit it over the file.

Before merging

  • The GRAFANA_SA_TOKEN repository secret must be set, for a service account with Edit permission on the tycho folder.
  • The first push to main sends both dashboards, because their files are new. This moves them from the General folder to tycho. Their content is the same as the live version, but any UI edit made after the export date is overwritten.

Testing

The exported JSON imports cleanly into a separate test dashboard (tycho-router-trades-ci-test). The live dashboards were not modified. actionlint passes on main-workflow.yaml.

🤖 Generated with Claude Code

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Tycho Oct 14, 2026
WHY:
The Router Trades and Router Trade Detail dashboards were only in Grafana.
People changed them in the Grafana UI, and no copy in git recorded the
changes. The copy in a terraform-infrastructure branch was older than the
live dashboard and did not have three of its panels.

HOW:
- Add the live JSON of the two dashboards in
  `tycho-router-trades/grafana/`. The export removes only `id` and
  `version`. The `uid` values do not change, thus links to the dashboards
  continue to work.
- Add the `sync-router-trades-dashboards` job to `main-workflow.yaml`. The
  job calls `sync-grafana-dashboards.yaml` from ci-cd-templates. It sends
  only the dashboard files that a push changed, to the `tycho` folder.
- Tell in the workflows README how to change a dashboard: edit it in
  Grafana, export the JSON and commit it over the file.

ADDITIONAL NOTES:
The job needs the `GRAFANA_SA_TOKEN` secret. The service account needs Edit
permission on the `tycho` folder. The first push to main sends the two
dashboards, because their files are new. This moves them from the General
folder to the `tycho` folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kayibal
kayibal force-pushed the ci/sync-router-trades-dashboards branch from b9d8295 to 1e43e29 Compare October 14, 2026 10:33
@kayibal
kayibal merged commit ed8bbf1 into main Oct 14, 2026
30 checks passed
@kayibal
kayibal deleted the ci/sync-router-trades-dashboards branch October 14, 2026 10:39
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Tycho Oct 14, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants