Skip to content

cli: switch cluster config to goconfig.MutableConfig#1297

Open
bigbes wants to merge 1 commit into
v3from
bigbes/tntp-7390-cli-goconfig
Open

cli: switch cluster config to goconfig.MutableConfig#1297
bigbes wants to merge 1 commit into
v3from
bigbes/tntp-7390-cli-goconfig

Conversation

@bigbes
Copy link
Copy Markdown
Collaborator

@bigbes bigbes commented May 18, 2026

Migrate the loader, publish/show flows, and replicaset patch flows in cli/cluster and cli/replicaset to operate on goconfig.Config / MutableConfig + KeyPath instead of the in-tree libcluster.ClusterConfig hierarchy. The loader (cli/cluster.GetClusterConfig) is rewritten as a two-phase merge: env (TT_DEFAULT ignored) and file first, then a fill-only merge of remote storage (etcd/TCS, first reachable wins), then a fill-only merge of TT_DEFAULT. Storage I/O is plumbed through the gsconnect/go-storage abstraction (NewStorageConnection + NewRemoteStorage) and integrity is wired via GetStorageVerifiers / WithFileReadFunc / WithIntegrity. The new helpers in cli/cluster (scope, storage, BuildGoConfigFromBytes, BuildMutableFromBytes, FindInstance, FindGroupByReplicaset, InstanceConfig, Instances, LibclusterToConfig) replace the old typed wrappers and Instantiate path.

Part of TNTP-7390

@bigbes bigbes requested review from Mockird31 and sssciel May 18, 2026 07:16
@bigbes bigbes force-pushed the bigbes/tntp-7390-cli-goconfig branch from 9b841b1 to d47b34a Compare May 18, 2026 08:12
@bigbes bigbes added the full-ci Enables full ci tests label May 18, 2026
Migrate the loader, publish/show flows, and replicaset patch flows in
cli/cluster and cli/replicaset to operate on goconfig.Config /
MutableConfig + KeyPath instead of the in-tree libcluster.ClusterConfig
hierarchy. The loader (cli/cluster.GetClusterConfig) is rewritten as a
two-phase merge: env (TT_*_DEFAULT ignored) and file first, then a
fill-only merge of remote storage (etcd/TCS, first reachable wins),
then a fill-only merge of TT_*_DEFAULT. Storage I/O is plumbed through
the gsconnect/go-storage abstraction (NewStorageConnection +
NewRemoteStorage) and integrity is wired via GetStorageVerifiers /
WithFileReadFunc / WithIntegrity. The new helpers in cli/cluster (scope,
storage, BuildGoConfigFromBytes, BuildMutableFromBytes, FindInstance,
FindGroupByReplicaset, InstanceConfig, Instances, LibclusterToConfig)
replace the old typed wrappers and Instantiate path.

Part of TNTP-7390
@bigbes bigbes force-pushed the bigbes/tntp-7390-cli-goconfig branch from d47b34a to a339449 Compare May 18, 2026 08:23
Copy link
Copy Markdown
Member

@sssciel sssciel left a comment

Choose a reason for hiding this comment

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

CI is red

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables full ci tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants