Skip to content

About

Dashboard to monitor OBS builds and download Artifacts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PPG OBS Dashboard

A real-time build monitoring dashboard for PPG packages on the Open Build Service. The dashboard polls OBS on a schedule and consumes RabbitMQ build events, stores state in SQLite, and renders a live board view with per-package rollup states and a build event log.

What you get

  • Package cards showing live rollup state (building, failed, succeeded, published) across all PPG OBS projects.
  • Per-target build event log: build started, succeeded, failed, published — filterable by tag and time window.
  • Artifacts view — binary package download links and container image pull commands, browsable by version, repo, and arch; covers dev builds, releases, and PRs.
  • CVEs tab — the packages to bump to clear HIGH and CRITICAL CVEs in staging images, what the current staging image already fixes for each released image, and the per-image CVE table; new entries since your last look are marked.
  • Tag-based filtering (RPM, DEB, container) and version selector.
  • PR build tracking: dedicated board context per OBS PR branch.
  • SSE-based live updates — cards and event log update in real time without a page refresh.

Quick start

git clone <repo-url> obs-dashboard
cd obs-dashboard

cp .env.example .env     # add OBS credentials (required)

task dev                 # http://localhost:4000

task dev builds and starts both the Go backend and the Vite dev server in Docker. The frontend proxies API calls to the backend, so only :4000 needs to be open.

Configuration

Secrets and runtime settings live in .env. An optional config.yaml provides the same knobs in YAML form — environment variables always take precedence.

.env

Variable Default Purpose
OBS_USERNAME (required) OBS account username
OBS_PASSWORD (required) OBS account password
OBS_BASE_URL https://api.opensuse.org OBS API base URL
MQ_URL amqps://opensuse:opensuse@rabbit.opensuse.org:5671/ RabbitMQ connection URL
POLL_INTERVAL 2m How often the poller fetches OBS build results
DB_PATH /data/obsboard.db SQLite database path (inside the container)
EVENT_RETENTION 7d How long build events are kept
HTTP_PORT 4000 Port the backend listens on

Copy .env.example for a pre-filled template.

config.yaml (optional)

config.yaml.example shows the equivalent YAML structure. Useful if you prefer file-based config or need to set fields not exposed as env vars (e.g. obs_root). The file is read on startup; environment variables override any value it contains.

Authentication

Anyone can view the dashboard. Actions that change state (Rebuild, the telemetry toggle) require signing in with an allowlisted @percona.com Google account.

  1. In Google Cloud Console → APIs & Services → Credentials, create an OAuth client of type Web application with these authorized redirect URIs:
    • https://dashboard.obs.pg.labs.percona.com/auth/callback
    • http://localhost:5173/auth/callback (local dev)
  2. Set in .env (single-quote values that contain $):
    • GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
    • OBS_DASHBOARD_ADMINS — comma-separated emails that are always allowed
  3. Set auth.public_url in config.yaml (or AUTH_PUBLIC_URL) to the URL the dashboard is served from, as scheme and host only (no path). It drives both the OAuth redirect (<public_url>/auth/callback) and the Origin check on actions, so sign-in only works from that exact origin.
  4. Local development: set AUTH_PUBLIC_URL=http://localhost:5173 in .env. The dev UI is served by Vite on 5173 (the backend on 4000 serves only /api); leaving the production value from the example config would send the OAuth redirect to the production callback and make every action fail with 403.

Once GOOGLE_CLIENT_ID is set, GOOGLE_CLIENT_SECRET and public_url are required or startup fails. Sessions last auth.session_ttl (env AUTH_SESSION_TTL, default 168h).

Admins and anyone they add can manage the allowlist on the Settings tab. Removing someone ends their sessions immediately.

Without GOOGLE_CLIENT_ID the dashboard runs read-only: there is no Sign in button and action endpoints return 401.

Release tab

The Release tab cuts PPG releases from the dashboard. A signed-in user selects release units, approves the generated changelogs, watches the pre-release sync and QA, and approves the final release. Each step is an action on the percona/obs-packaging GitHub repository; the dashboard holds no release state of its own. The design is in docs/superpowers/specs/2026-11-11-release-tab-design.md.

To enable it, set one of these:

  • A GitHub App (preferred):

    • RELEASE_GITHUB_APP_ID (or release.github_app_id): the App ID. Not secret.
    • RELEASE_GITHUB_APP_PRIVATE_KEY (or release.github_app_private_key): the App's private key PEM, base64-encoded on one line: base64 -w0 app.private-key.pem. Set it in the environment, not in the config file.

    The App must be installed on the repository with these permissions: contents write, pull_requests write, actions write, checks read and metadata read. The installation ID is discovered from the repository; it is not configured. GitHub actions appear as <app-slug>[bot].

  • RELEASE_GITHUB_TOKEN (or release.github_token): a classic personal access token with the repo and workflow scopes. All GitHub actions appear as the token's owner. This remains as the fallback.

If both the App pair and the token are set, the App pair wins, so the token can stay in place during the switch and be removed afterwards. If only one of the two App values is set, or the key is not valid base64 or not an RSA private key, the dashboard still starts but the Release tab cannot reach GitHub. It does not fall back to the token, so the misconfiguration stays visible.

RELEASE_GITHUB_REPO (or release.github_repo) sets the repository to act on. Default percona/obs-packaging.

Settings → General has a read-only "GitHub connection" card. It shows which mode is in use, whether the App is installed on the repository and the permissions it was granted, and has a "Test connection" button.

With neither the App pair nor a token the feature is off: the tab is hidden, the status endpoint reports it as disabled and the other release routes return 404.

The tab requires the obs-packaging changes listed in section 6 of the design (cut workflow, sync gate, Jenkins annotation, run names, unit list file, deletion report). It does not work against a repository that lacks them.

Who performed each step is recorded only in the dashboard's own audit log. It is never written to GitHub, because the repository is public.

QA tab

The QA tab shows the results of the PPG nightly QA, the obs-nightly-qa.yml workflow of release.github_repo. Manual OBS QA Run runs and release QA are not shown. Reading the tab is public; marking known failures needs a signed-in user.

For each PostgreSQL major the overview shows the status, the failing and total builds, the last run, its run time and the last five nightly runs. A row opens the major's detail view: the last run and its time window, its failing builds by platform, the slowest build, and the builds that did not run. The tab also lists the nightlies that are running or queued, with their jobs, and every current failure, with the platforms that failed and since when it fails.

The tab uses the release GitHub connection described above, so it is shown when that connection is configured. The credentials need read access to Actions and Contents. The nightly workflow must write each job's name into a qa-job.txt file in its qa-report-* artifacts. Without that file, a build that did not run links to the workflow run instead of its job, and a QA job that left no report (it timed out, or its runner was lost) cannot be told from one that does not exist: the major then shows fewer builds, with no sign that any are missing. With the file, such a job is listed under "did not run". The reports must also carry each qa entry's name (written by percona_obs qa run --report-json): it is what tells apart entries that share a Jenkins job, such as the ubi8, ubi9 and ubi10 container lanes. Without it those builds count as one, and a mark on one covers the others. A failure from a report written before entry names cannot be marked: the tab says when it can be.

A mark follows the entry's name. Renaming or removing a qa: entry in obs-packaging starts its "failing since" count again and leaves its mark matching nothing; such marks are listed under "Known, not seen in recent runs", where they can be cleared.

Jenkins is optional. When it is configured, the tab adds build durations, the platforms that failed and the slowest build. Without it, those values are missing and the rest of the tab works. Set QA_JENKINS_URL, QA_JENKINS_USER and QA_JENKINS_TOKEN (or the qa: section of config.yaml). The token is sent only to build URLs under QA_JENKINS_URL. A Jenkins that refuses the credentials or cannot be reached turns Jenkins off for that refresh and adds a warning to the tab.

A signed-in user can mark a failure as known. A known mark records the ticket and a short title, applies to one major or to all majors, and is shown on the failure in the tab. A mark stays until someone clears it, even when the build passes again. Marks that are passing now are listed separately so that stale marks are visible. Any signed-in user can mark or clear any mark, and every change is recorded in the audit log. The ticket links to https://perconadev.atlassian.net/browse/{ticket} by default, where {ticket} is replaced by the ticket key. Set QA_TICKET_URL to use another address.

The dashboard refreshes the QA data every 10 minutes, and every minute while a nightly is unfinished. Finished runs are stored in its SQLite database and kept for 90 days, so the tab has data right after a restart.

Development

task dev          # start backend (:4000) + Vite dev server (:5173), hot reload
task down         # stop the development stack

The working tree is bind-mounted into the frontend container, so edits appear live. Backend changes require a container rebuild (task down && task dev).

Production

task redeploy     # (re)build and (re)start the production stack
task prod-logs    # tail production logs
task down-prod    # stop the production stack

The production build compiles the frontend into static assets and embeds them in a single Go binary inside a minimal Alpine image. Persistent state lives in ./data (bind-mounted into the container).

Upgrading to multi-instance

The first start of a multi-instance build migrates the SQLite database in place: it strips the <obs_root>: prefix from every stored project name (isv:percona:ppg:17 → ppg:17) and stamps the legacy instance on stored build targets and target events. The migration runs once and cannot be undone by an older binary, which would re-insert root-prefixed rows next to the migrated ones.

  • Before rolling out, stop the stack and back up the database (data/obsboard.db, i.e. DB_PATH on the host).
  • To roll back, stop the stack, restore that backup, and start the older image.

About

Dashboard to monitor OBS builds and download Artifacts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages