From 073b652f7ce88ddcf63493d6db52d94356bea1cc Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 12 Jun 2025 16:58:15 +0300 Subject: [PATCH] fix: serialize only the adapter config, not the adapter spec Signed-off-by: Lars Wirzenius --- ci-broker.md | 1 - src/adapter.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci-broker.md b/ci-broker.md index 628b5a7e..cd0dfc23 100644 --- a/ci-broker.md +++ b/ci-broker.md @@ -446,7 +446,6 @@ when I run ./env.sh cib --config broker.yaml process-events then stderr contains "RADICLE_NATIVE_CI=" then stderr contains "foo: bar" -then stderr contains "API_KEY: xyzzy" when I run cibtool --db ci-broker.db event list then stdout is empty diff --git a/src/adapter.rs b/src/adapter.rs index 4b473792..4735ac95 100644 --- a/src/adapter.rs +++ b/src/adapter.rs @@ -120,7 +120,7 @@ impl Adapter { fn write_adapter_config(&self, tmpdir: &TempDir) -> Result { let filename = tmpdir.path().join("adapter.yaml"); - let yaml = serde_yml::to_string(self).map_err(AdapterError::AdapterConfigToYaml)?; + let yaml = serde_yml::to_string(&self.config).map_err(AdapterError::AdapterConfigToYaml)?; logger::adapter_temp_config(&filename, &yaml); std::fs::write(&filename, yaml.as_bytes()).map_err(AdapterError::AdapterConfigWrite)?;