Skip to content

Commit 0875185

Browse files
committed
refactor(conf): rename BlobBackends proto message to ManagedCASBackends
The proto message and its YAML field describe configuration for *managed* CAS backends (provisioned and operated by Chainloop), not generic blob storage. Rename: * proto message `BlobBackends` -> `ManagedCASBackends` * proto field `blob_backends` -> `managed_cas_backends` in both controlplane and artifact-cas Bootstrap messages * matching Go field on the regenerated `*conf.Bootstrap` (`ManagedCasBackends`) and references in wire.go / wire_gen.go * commented-out example block in both `config.devel.yaml` No behavioural change; the only deployments that read this block today are local-dev configs (gitignored config.local.yaml) which have been updated separately. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: 234a03ed-b238-4506-95f0-235242842db2
1 parent 7457ed2 commit 0875185

10 files changed

Lines changed: 178 additions & 174 deletions

File tree

app/artifact-cas/cmd/wire.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func wireApp(*conf.Bootstrap, *conf.Server, *conf.Auth, credentials.Reader, log.
3939
service.ProviderSet,
4040
loader.LoadProviders,
4141
newLoaderOptions,
42-
wire.FieldsOf(new(*conf.Bootstrap), "BlobBackends"),
42+
wire.FieldsOf(new(*conf.Bootstrap), "ManagedCasBackends"),
4343
newApp,
4444
serviceOpts,
4545
newProtoValidator,
@@ -48,11 +48,11 @@ func wireApp(*conf.Bootstrap, *conf.Server, *conf.Auth, credentials.Reader, log.
4848
}
4949

5050
// newLoaderOptions builds the loader.Options struct from the deployment
51-
// Bootstrap. When `blob_backends.s3_access_point` is absent (the common
52-
// case for on-prem) S3AccessPoint stays nil and the provider is not
53-
// registered, leaving the binary's behaviour identical to the pre-managed
54-
// CAS world.
55-
func newLoaderOptions(in *conf.BlobBackends, l log.Logger) *loader.Options {
51+
// Bootstrap. When `managed_cas_backends.s3_access_point` is absent (the
52+
// common case for on-prem) S3AccessPoint stays nil and the provider is
53+
// not registered, leaving the binary's behaviour identical to the
54+
// pre-managed-CAS world.
55+
func newLoaderOptions(in *conf.ManagedCASBackends, l log.Logger) *loader.Options {
5656
opts := &loader.Options{Logger: l}
5757
if in == nil || in.GetS3AccessPoint() == nil {
5858
return opts

app/artifact-cas/cmd/wire_gen.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/artifact-cas/configs/config.devel.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ auth:
4141
public_key_path: ${PUBLIC_KEY_PATH:../../devel/devkeys/cas.pub}
4242

4343
# Optional managed CAS provider (S3 Access Points). Mirrors the
44-
# controlplane's blob_backends block — both binaries must agree on the
45-
# settings since each independently instantiates the provider. Leave
46-
# commented out for on-prem deployments that don't use managed CAS.
47-
# blob_backends:
44+
# controlplane's managed_cas_backends block — both binaries must agree
45+
# on the settings since each independently instantiates the provider.
46+
# Leave commented out for on-prem deployments that don't use managed CAS.
47+
# managed_cas_backends:
4848
# s3_access_point:
4949
# base_role_arn: arn:aws:iam::123456789012:role/chainloop-cas-tenant
5050
# region: us-east-1

app/artifact-cas/internal/conf/conf.pb.go

Lines changed: 57 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/artifact-cas/internal/conf/conf.proto

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ message Bootstrap {
2525
Auth auth = 2;
2626
Observability observability = 3;
2727
credentials.v1.Credentials credentials_service = 4;
28-
// Deployment-level configuration for storage backend providers that
29-
// need ambient knobs beyond what's stored per-CASBackend. Optional —
28+
// Deployment-level configuration for managed CAS storage backends
29+
// (provisioned and operated by Chainloop, not by tenants). Optional —
3030
// omitting a sub-block keeps the corresponding provider unregistered.
31-
BlobBackends blob_backends = 5;
31+
ManagedCASBackends managed_cas_backends = 5;
3232

3333
message Observability {
3434
Sentry sentry = 1;
@@ -83,11 +83,11 @@ message Server {
8383
HTTP http_metrics = 3;
8484
}
8585

86-
// BlobBackends mirrors the controlplane's `BlobBackends` block. Defined
87-
// independently here so the artifact-cas binary doesn't depend on the
88-
// controlplane's protobuf package. Keep field numbering in sync across
89-
// both definitions.
90-
message BlobBackends {
86+
// ManagedCASBackends mirrors the controlplane's `ManagedCASBackends`
87+
// block. Defined independently here so the artifact-cas binary doesn't
88+
// depend on the controlplane's protobuf package. Keep field numbering
89+
// in sync across both definitions.
90+
message ManagedCASBackends {
9191
S3AccessPoint s3_access_point = 1;
9292

9393
message S3AccessPoint {

app/controlplane/cmd/wire.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func wireApp(context.Context, *conf.Bootstrap, credentials.ReaderWriter, log.Log
6161
wire.Bind(new(biz.CASClient), new(*biz.CASClientUseCase)),
6262
serviceOpts,
6363
wire.Value([]biz.CASClientOpts{}),
64-
wire.FieldsOf(new(*conf.Bootstrap), "Server", "Auth", "Data", "CasServer", "ReferrerSharedIndex", "Onboarding", "PrometheusIntegration", "PolicyProviders", "NatsServer", "FederatedAuthentication", "OperationAuthorizationProvider", "BlobBackends"),
64+
wire.FieldsOf(new(*conf.Bootstrap), "Server", "Auth", "Data", "CasServer", "ReferrerSharedIndex", "Onboarding", "PrometheusIntegration", "PolicyProviders", "NatsServer", "FederatedAuthentication", "OperationAuthorizationProvider", "ManagedCasBackends"),
6565
wire.FieldsOf(new(*conf.Data), "Database"),
6666
dispatcher.New,
6767
authz.NewCasbinEnforcer,
@@ -129,11 +129,11 @@ func serviceOpts(l log.Logger, authzUC *biz.AuthzUseCase, pUC *biz.ProjectUseCas
129129
}
130130

131131
// newLoaderOptions builds the loader.Options struct from the deployment
132-
// Bootstrap. When `blob_backends.s3_access_point` is absent (the common
133-
// case for on-prem) S3AccessPoint stays nil and the provider is not
134-
// registered, leaving the binary's behaviour identical to the pre-managed
135-
// CAS world.
136-
func newLoaderOptions(in *conf.BlobBackends, l log.Logger) *loader.Options {
132+
// Bootstrap. When `managed_cas_backends.s3_access_point` is absent (the
133+
// common case for on-prem) S3AccessPoint stays nil and the provider is
134+
// not registered, leaving the binary's behaviour identical to the
135+
// pre-managed-CAS world.
136+
func newLoaderOptions(in *conf.ManagedCASBackends, l log.Logger) *loader.Options {
137137
opts := &loader.Options{Logger: l}
138138
if in == nil || in.GetS3AccessPoint() == nil {
139139
return opts

0 commit comments

Comments
 (0)