Skip to content

fix(nats): honor replicas for audit stream and tune attestation bundle cache#3050

Merged
migmartri merged 2 commits intochainloop-dev:mainfrom
migmartri:fix/nats-stream-replicas-config
Apr 16, 2026
Merged

fix(nats): honor replicas for audit stream and tune attestation bundle cache#3050
migmartri merged 2 commits intochainloop-dev:mainfrom
migmartri:fix/nats-stream-replicas-config

Conversation

@migmartri
Copy link
Copy Markdown
Member

@migmartri migmartri commented Apr 16, 2026

Summary

  • The chainloop-audit JetStream stream was created without a Replicas field, so it stayed at 1 replica regardless of the nats_server.replicas config. It now uses the configured replica count from the NATS connection.
  • The NATS KV cache startup log (chainloop-attestation-bundles, chainloop-policy-eval-bundles) now includes the replicas value so operators can confirm what the controlplane is requesting at bucket create/update time.
  • Tune the attestation bundle cache: TTL 5d → 48h, max size 100MB → 200MB.

…eplicas

The chainloop-audit JetStream stream was created without a Replicas field,
so it always defaulted to 1 regardless of nats_server.replicas. Propagate
the configured replica count from the NATS connection so the stream is
created (or updated) with the right replication factor.

Also include replicas in the NATS KV cache startup log so operators can
confirm the value the controlplane is actually requesting.

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
…size

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri changed the title fix(nats): honor replicas config for audit stream and log KV bucket replicas fix(nats): honor replicas for audit stream and tune attestation bundle cache Apr 16, 2026
@migmartri migmartri requested a review from a team April 16, 2026 23:11
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@migmartri migmartri merged commit ce95390 into chainloop-dev:main Apr 16, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants