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

pomerium / pomerium / 17504064342
52%

Build:
DEFAULT BRANCH: main
Ran 05 Sep 2025 08:54PM UTC
Jobs 1
Files 555
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

05 Sep 2025 08:44PM UTC coverage: 54.182% (-0.09%) from 54.273%
17504064342

push

github

web-flow
databroker: add clustered follower server (#5815)

## Summary
Add a clustered follower databroker server. The clustered follower
server is intended to be a follower node in a cluster of databroker
nodes. It will forward all requests to a leader node.

Forwarding is done via a forwarding databroker server. For every method
called on the forwarding server the corresponding client method will be
called. Incoming metadata is copied to outgoing metadata to support
passing the signed JWT or other metadata. In addition we set a
`pomerium-forwarder-id` metadata value to detect cycles. (`ForwardUnary`
and `ForwardStream` would be methods on `Forwarder` but Go doesn't
support methods with generic arguments, so it's passed as an argument
instead)

The clustered follower server also supports a
`pomerium-cluster-request-mode` metadata value to explicitly request the
desired forwarding behavior. `default` forwards all requests to the
leader. `local` handles read-only requests with the local databroker
backend. `leader` requires the node to be a leader, which means it
always errors out for the follower server.

Subsequent PRs will introduce the clustered leader server and finally
the clustered server which will be used when databroker cluster options
are set and dispatches to the follower/leader server based on the node's
role. In addition, a subsequent PR will update the clustered follower
server to synchronize data from the leader to the local databroker
backend.

## Related issues
-
[ENG-2722](https://linear.app/pomerium/issue/ENG-2722/databroker-add-clustered-server)


## Checklist

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

99 of 259 new or added lines in 5 files covered. (38.22%)

25 existing lines in 8 files now uncovered.

26347 of 48627 relevant lines covered (54.18%)

89.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
94
24.8
internal/databroker/server_clustered_follower.go
47
17.54
internal/databroker/server_forwarding.go
13
0.0
pkg/grpc/databroker/metadata.go
4
91.49
pkg/grpcutil/forward.go
2
88.24
pkg/grpcutil/errors.go

Coverage Regressions

Lines Coverage ∆ File
6
77.62
-1.74% pkg/storage/postgres/backend.go
4
70.71
-1.06% internal/autocert/manager.go
4
87.7
-0.52% pkg/storage/postgres/postgres.go
3
90.69
0.0% config/config_source.go
3
85.53
0.0% pkg/storage/postgres/iterate.go
2
90.91
0.0% pkg/fanout/receive.go
2
83.9
-0.98% pkg/ssh/channel.go
1
82.24
-0.2% pkg/envoy/resource_monitor_linux.go
Jobs
ID Job ID Ran Files Coverage
1 17504064342.1 05 Sep 2025 08:54PM UTC 555
54.18
GitHub Action Run
Source Files on build 17504064342
  • Tree
  • List 555
  • Changed 10
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17504064342
  • 129747a2 on github
  • Prev Build on main (#17475248072)
  • Next Build on main (#17595315956)
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