Skip to content

Commit

Permalink
fix: add cluster description to pegboard client config (#1461)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Nov 25, 2024
1 parent 27f0bb2 commit ddb8a99
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker/dev-full/rivet-client/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ client:
logs:
redirect_logs: true
foundationdb:
cluster_description: docker
cluster_id: docker
address:
!static
Expand Down
1 change: 1 addition & 0 deletions packages/infra/client/config/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ impl Metrics {
#[derive(Clone, Deserialize)]
#[serde(rename_all = "snake_case", deny_unknown_fields)]
pub struct FoundationDb {
pub cluster_description: String,
pub cluster_id: String,
pub address: FoundationDbAddress,
}
Expand Down
4 changes: 2 additions & 2 deletions packages/infra/client/manager/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ pub async fn init_fdb_config(config: &Config) -> Result<()> {
.collect::<Vec<_>>()
.join(",");

// Should match Ctx::fdb_cluster_path
fs::write(
config.client.data_dir().join("fdb.cluster"),
format!(
"fdb:{cluster_id}@{joined}",
"{cluster_description}:{cluster_id}@{joined}",
cluster_description = config.client.foundationdb.cluster_description,
cluster_id = config.client.foundationdb.cluster_id,
),
)
Expand Down
1 change: 1 addition & 0 deletions packages/infra/client/manager/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ pub async fn init_client(gen_path: &Path, working_path: &Path) -> Config {
},
metrics: Default::default(),
foundationdb: FoundationDb {
cluster_description: "fdb".into(),
cluster_id: "fdb".into(),
address: FoundationDbAddress::Static(vec!["127.0.0.1:4500".parse().unwrap()]),
},
Expand Down

0 comments on commit ddb8a99

Please sign in to comment.