Skip to content

feat: remove product-config & clean up#692

Open
razvan wants to merge 15 commits into
mainfrom
refactor/remove-product-config
Open

feat: remove product-config & clean up#692
razvan wants to merge 15 commits into
mainfrom
refactor/remove-product-config

Conversation

@razvan

@razvan razvan commented Jun 5, 2026

Copy link
Copy Markdown
Member

@maltesander maltesander self-requested a review June 8, 2026 07:43
Comment thread rust/operator-binary/src/crd/history.rs Outdated
Comment thread rust/operator-binary/src/config/writer.rs Outdated
Comment thread rust/operator-binary/src/history/controller.rs
Comment thread rust/operator-binary/Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Comment thread CHANGELOG.md
Comment thread rust/operator-binary/src/crd/history.rs Outdated
@razvan razvan marked this pull request as ready for review June 9, 2026 11:56
Comment thread rust/operator-binary/src/crd/history.rs Outdated
Comment on lines 140 to 149
impl KeyValueOverridesProvider for v1alpha1::ConfigOverrides {
fn get_key_value_overrides(&self, file: &str) -> BTreeMap<String, Option<String>> {
let field = match file {
SPARK_DEFAULTS_FILE_NAME => self.spark_defaults_conf.as_ref(),
SPARK_ENV_SH_FILE_NAME => self.spark_env_sh.as_ref(),
JVM_SECURITY_PROPERTIES_FILE => self.security_properties.as_ref(),
_ => None,
};
field
.map(KeyValueConfigOverrides::as_product_config_overrides)
.unwrap_or_default()
match file {
SPARK_DEFAULTS_FILE_NAME => self.spark_defaults_conf.overrides.clone(),
SPARK_ENV_SH_FILE_NAME => self.spark_env_sh.overrides.clone(),
JVM_SECURITY_PROPERTIES_FILE => self.security_properties.overrides.clone(),
_ => BTreeMap::new(),
}
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can remove this for now until we come up with a jvm solution (this is basically default behavior).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment on lines +797 to +805
fn defined_key_value_overrides(
config_overrides: &v1alpha1::ConfigOverrides,
) -> BTreeMap<String, String> {
config_overrides
.get_key_value_overrides(SPARK_ENV_SH_FILE_NAME)
.into_iter()
.filter_map(|(key, value)| value.map(|value| (key, value)))
.collect()
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is also defined in the history controller.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

removed both as I refactored to_spark_env_sh_string() to make them unnecessary.

Comment on lines +44 to +45
pub namespace: String,
pub owner_reference: OwnerReference,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In other PRs and opensearch we use another type and split for the ownerref:

  1. namespace String -> NamespaceName
  2. i would remove owner_reference and add name (type ClusterName) and uid.
  3. Optional: add a private metadata field (https://github.com/stackabletech/opensearch-operator/blob/e22da414396d3bf63bb1495ac85a7223fd246dee/rust/operator-binary/src/controller.rs#L257) and implement Resource (https://github.com/stackabletech/opensearch-operator/blob/e22da414396d3bf63bb1495ac85a7223fd246dee/rust/operator-binary/src/controller.rs#L368).

Please check if this is required for e.g. connect as well.

Comment thread rust/operator-binary/src/history/controller/validate.rs
@razvan

razvan commented Jun 9, 2026

Copy link
Copy Markdown
Member Author
--- FAIL: kuttl (1861.77s)
    --- FAIL: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/iceberg_openshift-false_spark-iceberg-4.0.1 (92.01s)
        --- PASS: kuttl/harness/hbase-connector_openshift-false_spark-hbase-connector-3.5.8_hbase-2.6.4_hdfs-latest-3.4.2_zookeeper-latest-3.9.5 (252.08s)
        --- PASS: kuttl/harness/custom-log-directory_openshift-false_spark-4.1.1_hdfs-latest-3.4.2_zookeeper-latest-3.9.5 (239.00s)
        --- PASS: kuttl/harness/overrides_openshift-false_spark-4.1.1 (146.86s)
        --- PASS: kuttl/harness/spark-pi-private-s3_openshift-false_spark-4.1.1 (131.21s)
        --- PASS: kuttl/harness/spark-connect_openshift-false_spark-connect-4.1.1_s3-use-tls-true (168.40s)
        --- PASS: kuttl/harness/logging_openshift-false_spark-logging-4.1.1_ny-tlc-report-0.3.0 (369.52s)
        --- PASS: kuttl/harness/product-config-compat_openshift-false_spark-regression-3.5.8 (50.20s)
        --- PASS: kuttl/harness/pyspark-ny-public-s3_openshift-false_spark-4.1.1 (141.73s)
        --- FAIL: kuttl/harness/delta-lake_openshift-false_spark-delta-lake-4.0.1 (973.65s)
        --- PASS: kuttl/harness/resources_openshift-false_spark-4.1.1 (125.23s)
        --- PASS: kuttl/harness/spark-ny-public-s3_openshift-false_spark-4.1.1_s3-use-tls-true (182.23s)
        --- PASS: kuttl/harness/pyspark-ny-public-s3-image_openshift-false_spark-4.1.1_ny-tlc-report-0.3.0 (164.48s)
        --- PASS: kuttl/harness/spark-examples_openshift-false_spark-4.1.1 (57.75s)
        --- PASS: kuttl/harness/spark-history-server_openshift-false_spark-4.1.1_s3-use-tls-true (236.08s)
        --- PASS: kuttl/harness/smoke_openshift-false_spark-4.1.1_s3-use-tls-true (197.29s)
FAIL
ERROR:root:kuttl failed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants