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

pomerium / pomerium / 22148878381
45%

Build:
DEFAULT BRANCH: main
Ran 18 Feb 2026 04:58PM UTC
Jobs 1
Files 671
Run time 2min
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

18 Feb 2026 04:46PM UTC coverage: 44.305% (-0.07%) from 44.379%
22148878381

push

github

web-flow
databroker: add first-class record auto-expiry via Options TTL (#6121)

## Summary

The databroker has no mechanism for automatically expiring records based
on time. Records accumulate indefinitely unless explicitly cleaned up by
application code. This adds a `ttl` field (`google.protobuf.Duration`)
to the `Options` proto message, enabling per-type automatic record
expiry as a first-class databroker feature.

Records whose `modified_at` timestamp is older than the configured TTL
are automatically deleted during the existing periodic cleanup cycle (~1
minute). Both storage backends (Pebble/file and Postgres) enforce TTL
and create proper tombstone entries so sync clients are notified of
deletions.

Key design decisions:
- **`modified_at`-based** — uses the existing timestamp on every Record;
updating a record resets its TTL clock
- **Periodic sweep** — runs in the 1-minute cleaner, not inline on
Put/Patch
- **Per-type, not per-record** — TTL is set on Options, matching how
`capacity` works

The first use is a 15-minute TTL on `SessionBindingRequest` records.

## Related issues

-
[ENG-3600](https://linear.app/pomerium/issue/ENG-3600/databroker-add-first-class-record-auto-expiry-via-options-ttl)

## User Explanation

No user-facing changes. This is an internal databroker infrastructure
improvement that prevents unbounded accumulation of temporary records.

## Checklist

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

---------

Co-authored-by: Caleb Doxsey <caleb@doxsey.net>

98 of 334 new or added lines in 6 files covered. (29.34%)

18 existing lines in 4 files now uncovered.

32560 of 73491 relevant lines covered (44.3%)

116.64 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
88.96
0.78% pkg/storage/postgres/postgres.go
4
79.74
-0.36% pkg/storage/postgres/migrate.go
6
79.16
0.27% pkg/storage/postgres/backend.go
7
77.24
0.89% pkg/storage/file/backend.go
13
69.86
-0.75% internal/databroker/server_backend.go
204
0.0
0.0% pkg/storage/storagetest/storagetest.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
75.41
0.0% pkg/storage/postgres/registry.go
2
75.0
-0.72% internal/databroker/config_source.go
2
48.28
0.0% internal/databroker/server_clustered_follower.go
13
85.78
-6.37% config/config_source.go
Jobs
ID Job ID Ran Files Coverage
1 22148878381.1 18 Feb 2026 04:58PM UTC 671
44.3
GitHub Action Run
Source Files on build 22148878381
  • Tree
  • List 671
  • Changed 15
  • Source Changed 7
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22148878381
  • 932af922 on github
  • Prev Build on main (#22148793519)
  • Next Build on main (#22148893008)
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