Skip to content

Commit c030c38

Browse files
razvansbernauer
andauthored
Apply suggestions from code review
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
1 parent d6943fc commit c030c38

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Added
88

9-
- Support for fault-tolerant execution ([#779]).
10-
Remove `spec.clusterConfig.faultTolerantExecution.configOverrides` and use "classic" role/group overrides ([#793]).
9+
- Support for fault-tolerant execution ([#779], [#793]).
1110
- Support for the client spooling protocol ([#793]).
1211

1312
[#779]: https://github.com/stackabletech/trino-operator/pull/779

rust/operator-binary/src/config/client_protocol.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl ResolvedClientProtocolConfig {
111111
("protocol.spooling.enabled".to_string(), "true".to_string()),
112112
(
113113
"protocol.spooling.shared-secret-key".to_string(),
114-
format!("${{ENV:{secret}}}", secret = ENV_SPOOLING_SECRET),
114+
format!("${{ENV:{ENV_SPOOLING_SECRET}}}"),
115115
),
116116
]);
117117
}
@@ -128,17 +128,19 @@ mod tests {
128128

129129
#[tokio::test]
130130
async fn test_spooling_config() {
131-
let config = ClientProtocolConfig::Spooling(ClientSpoolingProtocolConfig {
132-
location: "s3://my-bucket/spooling".to_string(),
133-
filesystem: SpoolingFileSystemConfig::S3(S3Config {
134-
connection:
135-
stackable_operator::crd::s3::v1alpha1::InlineConnectionOrReference::Reference(
136-
"test-s3-connection".to_string(),
137-
),
138-
iam_role: None,
139-
external_id: None,
140-
}),
141-
});
131+
let config_yaml = indoc::indoc! {r#"
132+
spooling:
133+
location: s3://my-bucket/spooling
134+
filesystem:
135+
s3:
136+
connection:
137+
reference: test-s3-connection
138+
"#};
139+
140+
let deserializer = serde_yaml::Deserializer::from_str(config_yaml);
141+
let config = serde_yaml::with::singleton_map_recursive::deserialize(deserializer)
142+
.expect("invalid test input");
143+
142144

143145
let resolved_spooling_config = ResolvedClientProtocolConfig::from_config(
144146
&config, None, // No client, so no external resolution

0 commit comments

Comments
 (0)