Skip to content

feat(cli): send CLI version on every request and forward it to policy providers#3088

Merged
migmartri merged 2 commits intochainloop-dev:mainfrom
migmartri:feat/cli-version-header
May 4, 2026
Merged

feat(cli): send CLI version on every request and forward it to policy providers#3088
migmartri merged 2 commits intochainloop-dev:mainfrom
migmartri:feat/cli-version-header

Conversation

@migmartri
Copy link
Copy Markdown
Member

Summary

  • The CLI attaches a Chainloop-Cli-Version header (formatted as <version>-<edition>, e.g. v1.94.2-oss) on every gRPC request to the Control Plane and CAS via unary/stream client interceptors in pkg/grpcconn.
  • The Control Plane reads the header and forwards it on outbound HTTP calls to policy providers (Resolve, ResolveGroup, ValidateAttachment).
  • Biz-layer methods that reach policy providers now accept a context.Context; ValidateAttachment adopts ProviderAuthOpts for parity with Resolve/ResolveGroup.

… providers

The CLI now attaches a Chainloop-Cli-Version header (formatted as
"<version>-<edition>", e.g. "v1.94.2-oss") on every gRPC request to the
Control Plane and CAS via a unary/stream client interceptor in
pkg/grpcconn. The Control Plane reads it via a new helper in
internal/usercontext/entities and forwards it on outbound HTTP calls to
policy providers (Resolve, ResolveGroup, ValidateAttachment).

The biz-layer methods that talk to policy providers now take a context.
ValidateAttachment switches to ProviderAuthOpts to keep parity with
Resolve/ResolveGroup.

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri requested a review from a team May 4, 2026 18:02
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
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 16 files

Copy link
Copy Markdown
Contributor

@matiasinsaurralde matiasinsaurralde left a comment

Choose a reason for hiding this comment

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

LGTM

@migmartri migmartri requested a review from a team May 4, 2026 20:19
@migmartri migmartri merged commit 2d79db6 into chainloop-dev:main May 4, 2026
15 checks passed
@migmartri migmartri deleted the feat/cli-version-header branch May 6, 2026 15:12
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