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

nats-io / nats-server / 10748707679
83%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2024 05:36AM UTC
Jobs 1
Files 57
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

07 Sep 2024 01:18AM UTC coverage: 85.241% (+0.1%) from 85.111%
10748707679

push

github

web-flow
(2.11) ADR-44: JetStream Asset Versioning in Metadata (#5850)

Implements
[ADR-44](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-44.md)

Initial addition of JetStream Asset Versioning, containing:
- generating stream and consumer metadata
  - created server version: `_nats.created.server.version`
  - created server API level: `_nats.created.server.api_level`
  - required server API level: `_nats.server.require.api_level`
- logging supported API level upon startup: `[INF]   API Level:       1`

<br>

Note that stream and consumer metadata is only set/updated upon:
- creating a new stream/consumer
- updating a stream/consumer
_(created metadata will not be set for pre-existing assets, only
required level will be updated)_

<br>

Many tests are added ensuring that:
- restoring streams from backups doesn't set this metadata
_(if it doesn't exist, for example restoring a backup from a previous
version)_
- restarting a server (or upgrading) doesn't set this metadata
  _(if it doesn't exist, for example due to upgrading)_
- updating consumer `PauseUntil` ups or lowers required API level
- metadata is consistently reported through add, update and info
requests
- only stream/consumer/meta leader determine the metadata, so that there
can be no skew in metadata if followers were allowed to update as well
- users can't manually supply these `_nats.>` metadata fields, they will
be overwritten to the appropriate values
- if the metadata is missing during an update, the metadata is preserved
_(for example an update by a client that doesn't know about metadata
yet)_

These tests check for both non-clustered R1 setups and clustered R3
setups.

<br>

This PR doesn't fully implement
[ADR-44](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-44.md).
There will be follow-up PRs later on to add support for:
- dynamic metadata, like `_nats.server.version` and
`_nats.server.api_... (continued)

66500 of 78014 relevant lines covered (85.24%)

1163457.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10748707679.1 07 Sep 2024 05:36AM UTC 0
85.24
GitHub Action Run
Source Files on build 10748707679
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10748707679
  • a10dc6a6 on github
  • Prev Build on main (#10732563336)
  • Next Build on main (#10757112177)
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