Skip to content

Commit fffd646

Browse files
committed
remove clientProtocol.configOverrides field
1 parent e916710 commit fffd646

2 files changed

Lines changed: 1 addition & 65 deletions

File tree

deploy/helm/trino-operator/crds/crds.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ spec:
114114
properties:
115115
spooling:
116116
properties:
117-
configOverrides:
118-
additionalProperties:
119-
type: string
120-
default: {}
121-
description: The `configOverrides` allow overriding arbitrary client protocol properties.
122-
type: object
123117
filesystem:
124118
oneOf:
125119
- required:

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

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::collections::{BTreeMap, HashMap};
1+
use std::collections::BTreeMap;
22

33
/// This module manages the client protocol properties, especially the for spooling.
44
/// Trino documentation is available here: https://trino.io/docs/current/client/client-protocol.html
@@ -37,10 +37,6 @@ pub struct ClientSpoolingProtocolConfig {
3737

3838
// Spooling filesystem properties. Only S3 is supported.
3939
pub filesystem: SpoolingFileSystemConfig,
40-
41-
/// The `configOverrides` allow overriding arbitrary client protocol properties.
42-
#[serde(default)]
43-
pub config_overrides: HashMap<String, String>,
4440
}
4541

4642
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
@@ -144,11 +140,6 @@ impl ResolvedClientProtocolConfig {
144140
format!("${{ENV:{secret}}}", secret = ENV_SPOOLING_SECRET),
145141
),
146142
]);
147-
148-
// Finally, extend the spooling manager properties with any user configuration
149-
resolved_config
150-
.spooling_manager_properties
151-
.extend(spooling_config.config_overrides.clone());
152143
}
153144
}
154145

@@ -273,7 +264,6 @@ mod tests {
273264
max_error_retries: None,
274265
upload_part_size: None,
275266
}),
276-
config_overrides: HashMap::new(),
277267
});
278268

279269
let resolved_spooling_config = ResolvedClientProtocolConfig::from_config(
@@ -298,52 +288,4 @@ mod tests {
298288
resolved_spooling_config.spooling_manager_properties
299289
);
300290
}
301-
302-
#[tokio::test]
303-
async fn test_spooling_config_overrides() {
304-
let config = ClientProtocolConfig::Spooling(ClientSpoolingProtocolConfig {
305-
location: "s3://my-bucket/spooling".to_string(),
306-
filesystem: SpoolingFileSystemConfig::S3(S3SpoolingConfig {
307-
connection:
308-
stackable_operator::crd::s3::v1alpha1::InlineConnectionOrReference::Reference(
309-
"test-s3-connection".to_string(),
310-
),
311-
iam_role: None,
312-
external_id: None,
313-
max_error_retries: None,
314-
upload_part_size: None,
315-
}),
316-
config_overrides: HashMap::from([(
317-
"protocol.spooling.retrieval-mode".to_string(),
318-
"STORAGE".to_string(),
319-
)]),
320-
});
321-
322-
let resolved_spooling_config = ResolvedClientProtocolConfig::from_config(
323-
&config, None, // No client, so no external resolution
324-
"default",
325-
)
326-
.await
327-
.unwrap();
328-
329-
let expected_props = BTreeMap::from([
330-
(
331-
"fs.location".to_string(),
332-
"s3://my-bucket/spooling".to_string(),
333-
),
334-
(
335-
"protocol.spooling.retrieval-mode".to_string(),
336-
"STORAGE".to_string(),
337-
),
338-
(
339-
"spooling-manager.name".to_string(),
340-
"filesystem".to_string(),
341-
),
342-
]);
343-
344-
assert_eq!(
345-
expected_props,
346-
resolved_spooling_config.spooling_manager_properties
347-
);
348-
}
349291
}

0 commit comments

Comments
 (0)