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

pomerium / pomerium / 21443506677
44%

Build:
DEFAULT BRANCH: main
Ran 28 Jan 2026 03:13PM UTC
Jobs 1
Files 615
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

28 Jan 2026 03:06PM UTC coverage: 46.02% (+0.05%) from 45.97%
21443506677

push

github

web-flow
core/protoutil: implement sorting of arbitrary protobuf messages (#6064)

## Summary
Add support for sorting a slice of arbitrary protobuf messages.

This is implemented via field masks. Each field mask path is used to
reference a field of a protobuf message. For example, with:

```proto
message Example {
  string id   = 1;
  string name = 2;
}
```

You can use a field mask path of `name` to sort a list of `Example`
messages by name. Sorting of scalar types uses the standard
`cmp.Compare` function, as well as `bytes.Compare` for `[]byte`,
duration and timestamp support, and `proto.Marshal` for any other
message type. A final repeated field is supported by comparing lists of
values.

The field mask path can support embedded messages. For example, with:

```proto
message Inner {
  string name = 1;
}
message Outer {
  Inner inner = 1;
}
```

You can use a field mask path of `inner.name` to sort a list of `Outer`
messages. A repeated inner message is not supported, nor are map types,
though support for these could probably be added in the future.

## Related issues
-
[ENG-3495](https://linear.app/pomerium/issue/ENG-3495/corestorage-implement-arbitrary-sorting-for-protobuf-messages)


## Checklist

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

118 of 180 new or added lines in 2 files covered. (65.56%)

28 existing lines in 6 files now uncovered.

30887 of 67117 relevant lines covered (46.02%)

105.89 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
12
61.54
6.37% pkg/storage/order_by.go
50
65.28
pkg/protoutil/compare.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
75.41
0.0% pkg/storage/postgres/registry.go
2
51.35
-0.38% internal/databroker/server_clustered_follower.go
3
90.69
0.0% config/config_source.go
4
76.39
-0.83% pkg/storage/postgres/backend.go
8
82.5
-3.0% internal/controlplane/xdsmgr/xdsmgr.go
10
87.0
-0.24% pkg/ssh/manager.go
Jobs
ID Job ID Ran Files Coverage
1 21443506677.1 28 Jan 2026 03:13PM UTC 615
46.02
GitHub Action Run
Source Files on build 21443506677
  • Tree
  • List 615
  • Changed 12
  • Source Changed 1
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21443506677
  • 6dfd82e6 on github
  • Prev Build on main (#21375473598)
  • Next Build on main (#21458011535)
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