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

pomerium / pomerium / 16725584523
52%

Build:
DEFAULT BRANCH: main
Ran 04 Aug 2025 02:22PM UTC
Jobs 1
Files 526
Run time 550min
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

04 Aug 2025 02:12PM UTC coverage: 52.073% (-0.06%) from 52.134%
16725584523

push

github

web-flow
databroker: move gc to public interface, abort sync calls with invalid record versions (#5753)

## Summary
The databroker maintains a list of record changes over time. Those
changes are retrieved via the databroker `Sync` call. Both the in-memory
and postgres storage backends periodically remove old changes.

Since this logic is necessary for any storage backend, add a `Clean`
method to the public interface and start the background cleaner in the
databroker server rather than the storage backend itself. This makes it
easier to test.

Currently if a client attempts to `Sync` changes, but they've fallen too
far behind, we would not detect this and the client would never receive
the missing changes. The correct behavior is to abort the `Sync`, which
signals the client to do a full re-sync via `SyncLatest`. This PR
attempts to implement that behavior.

There is some risk with this change. If the assumptions I'm making about
how clients work turn out not to be true, we could end up with clients
continuously attempting to call `Sync` and never recovering.

## Related issues
-
[ENG-2640](https://linear.app/pomerium/issue/ENG-2640/core-databroker-sync-may-miss-changes)


## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review

71 of 143 new or added lines in 6 files covered. (49.65%)

16 existing lines in 6 files now uncovered.

23664 of 45444 relevant lines covered (52.07%)

75.71 hits per line

Uncovered Changes

Lines Coverage ∆ File
65
0.0
0.0% pkg/storage/storagetest/storagetest.go
4
76.13
0.21% pkg/storage/postgres/backend.go
3
73.52
0.77% internal/databroker/server.go

Coverage Regressions

Lines Coverage ∆ File
6
82.5
-3.0% internal/controlplane/xdsmgr/xdsmgr.go
4
70.71
-1.06% internal/autocert/manager.go
2
50.0
-26.47% pkg/storage/inmemory/config.go
2
76.13
0.21% pkg/storage/postgres/backend.go
1
82.24
-0.2% pkg/envoy/resource_monitor_linux.go
1
75.41
0.0% pkg/storage/postgres/registry.go
Jobs
ID Job ID Ran Files Coverage
1 16725584523.1 04 Aug 2025 02:22PM UTC 526
52.07
GitHub Action Run
Source Files on build 16725584523
  • Tree
  • List 526
  • Changed 20
  • Source Changed 13
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16725584523
  • e67d723e on github
  • Prev Build on main (#16681118055)
  • Next Build on main (#16732330868)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc