You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG-43: cmapi_sync_drift_total and cmapi_namespaces are declared, and no code feeds them #172
DoneWork merged into the integration branch; the comment gives the pull request, the merge and the proofbugSomething isn't workingclass:INVInnovation: a new feature, design, idea or methodsev:lowA small defect, a defect no code path reaches yet, or a cleanupstatus:openNo fix yet
What is wrong: Two metrics are in the code and always have no sample. cmapi_sync_drift_total{cluster_id} is the source of the KPI "Drift events", and cmapi_namespaces{cluster_id, state} is the source of "Managed coverage". No code calls .inc() or .set() on either. A dashboard or an alert on them shows nothing, which looks like "no drift".
Where:cmapi/src/cmapi/core/observability.py:44-45 (SYNC_DRIFT, NAMESPACES). grep -rn "SYNC_DRIFT\|NAMESPACES\." cmapi/src finds only the two definitions.
How to prove it: A test of the service suite runs the worker on a cluster that is out of sync with no open request, and reads /metrics. cmapi_sync_drift_total must be 1. A second test reads cmapi_namespaces after the watch cache has listed a managed and an unmanaged namespace.
Measured or inferred: Measured on 2026-11-13 by the search above, at 290ac5f.
Severity: Low.
What must hold after the fix: The worker counts a drift when it sees one, and the registry sets the namespace counts from the watch cache. Or the two definitions are removed until that code exists. docs/17 marks each KPI built when its metric has a sample.
Research:docs/17-kpis.md has the definitions and their sources.
Solution (inline, not applied): Not written here. Where the tag is In-Progress, the fix is on branch kpis.
Done: pull request #203 merged to main (89ecb07). GitHub Actions run 43530250572 was green on the exact head 248f7e2 (six jobs). The merged tree is the tree that the native suite ran on: 716 passed. Native on macOS: test_namespaces_metric.py 3 passed (before, /metrics had only the HELP and TYPE lines of both metrics): one managed, one unmanaged and two reserved namespaces give cmapi_namespaces 1, 1 and 2, and a cluster that is not listed has no sample. cmapi_sync_drift_total is removed until code can see a drift (Argo CD, Wave 2); docs/17 keeps Drift events as designed and marks Managed coverage built (7 live, 4 built, 10 designed). Not measured: a scrape by Prometheus, or any value on a cluster.
DoneWork merged into the integration branch; the comment gives the pull request, the merge and the proofbugSomething isn't workingclass:INVInnovation: a new feature, design, idea or methodsev:lowA small defect, a defect no code path reaches yet, or a cleanupstatus:openNo fix yet
Activity
Records: #195, #197, #201, #198 merged (main ae62d3a); #202 and #172 …
ephico2real2 commentedon Nov 14, 2026
Done: pull request #203 merged to
main(89ecb07). GitHub Actions run 43530250572 was green on the exact head248f7e2(six jobs). The merged tree is the tree that the native suite ran on: 716 passed. Native on macOS:test_namespaces_metric.py3 passed (before,/metricshad only theHELPandTYPElines of both metrics): one managed, one unmanaged and two reserved namespaces givecmapi_namespaces1, 1 and 2, and a cluster that is not listed has no sample.cmapi_sync_drift_totalis removed until code can see a drift (Argo CD, Wave 2);docs/17keeps Drift events asdesignedand marks Managed coveragebuilt(7 live, 4 built, 10 designed). Not measured: a scrape by Prometheus, or any value on a cluster.