• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

opendefensecloud / artifact-conduit / 34157362038
86%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 08:00PM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 07:54PM UTC coverage: 85.762% (+1.4%) from 84.322%
34157362038

push

github

web-flow
feat(metrics): add ARC domain metrics (#471)

## What

`pkg/metrics` with ARC's first domain metrics, plus the wiring to expose
them:

- `arc_orders{namespace,phase}` and
`arc_artifactworkflows{namespace,artifact_type,mode,phase}`, read from
the manager cache at scrape time
- cron freshness ->
`arc_artifactworkflow_last_scheduled_timestamp_seconds` and
`..._last_success_timestamp_seconds`, one series per `(namespace,
artifact_type)` carrying the oldest timestamp
- `arc_artifactworkflow_completions_total`,
`arc_artifactworkflow_duration_seconds`,
`arc_reconcile_errors_total{controller,reason}`
- ArtifactWorkflows now carry `arc.opendefense.cloud/artifact-type`

Two pre-existing bugs fixed on the way, separate commits:

- cron status updates were skipped. `updated = updated ||
h.setStatusFromWorkflow(...)` short circuits -> once any earlier field
had marked the status dirty the call never ran, so phase and completion
time were never updated
- `cloneObjectMeta` handed out the Order's own label map by reference ->
writing the new label would have mutated the Order

No chart or docs changes, those follow in separate PRs.

## Why

ARC had no domain metrics at all, `observability.md` said so outright. A
dashboard could show whether the reconciler was busy or erroring, not
whether orders actually went through. This is the metrics half of #316,
the dashboard needs them to exist first.

The non-obvious calls:

- collector reads the cache at scrape time instead of setting gauges in
reconcile -> deleted objects stop being reported by themselves, no stale
series on leader handover
- collector is leader gated. every replica serves `/metrics`, only the
leader reconciles -> ungated, two replicas read exactly double
- cron freshness takes the oldest, not the newest. `time() -
last_success > threshold` has to fire on the stalest workflow, not be
masked by a healthy sibling
- duration comes from Argo's `StartedAt`/`FinishedAt`. ARC sets
`CompletionTime` only for Succeed... (continued)

253 of 296 new or added lines in 9 files covered. (85.47%)

4 existing lines in 1 file now uncovered.

1030 of 1201 relevant lines covered (85.76%)

1053.24 hits per line

Uncovered Changes

Lines Coverage ∆ File
32
79.52
-3.77% pkg/controller/order_controller.go
6
84.15
0.03% pkg/controller/workflow_handler.go
3
84.69
1.88% pkg/controller/artifactworkflow_controller.go
2
93.75
pkg/controller/metrics.go

Coverage Regressions

Lines Coverage ∆ File
4
84.15
0.03% pkg/controller/workflow_handler.go
Jobs
ID Job ID Ran Files Coverage
1 34157362038.1 07 Sep 2026 08:00PM UTC 12
85.76
GitHub Action Run
Source Files on build 34157362038
  • Tree
  • List 12
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34157362038
  • 80097333 on github
  • Prev Build on main (#34090661669)
  • Next Build on main (#34348575121)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc