Commit 61a81f9
committed
test: disable metrics on the embedded stored_schema cache
The embedded SpiceDB helper (pkg/spicedb/spicedb.go) already disables metrics
on the dispatch and namespace caches, but left the stored_schema cache at its
default (Metrics: true). That cache registers Prometheus collectors named
"stored_schema" on the global registry, so when more than one embedded instance
is created in a single test process the second registration intermittently
fails with "duplicate metrics collector registration attempted", flaking the
Unit and e2e CI jobs.
With Metrics: false the cache is built without registering anything (see
CacheConfig.Complete in spicedb's server package), so multiple embedded
instances can no longer collide.
Unrelated to the REST mapper concurrency fix in this PR; included only because
this flake was blocking CI on this branch (and on main).
Signed-off-by: Víctor Roldán Betancort <vroldanbet@authzed.com>1 parent 726364a commit 61a81f9
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
48 | 60 | | |
49 | 61 | | |
50 | 62 | | |
| |||
0 commit comments