Skip to content

feat: remove product config#804

Open
adwk67 wants to merge 14 commits into
mainfrom
feat/smooth-operator/remove-product-config
Open

feat: remove product config#804
adwk67 wants to merge 14 commits into
mainfrom
feat/smooth-operator/remove-product-config

Conversation

@adwk67
Copy link
Copy Markdown
Member

@adwk67 adwk67 commented Jun 3, 2026

Computes the merged env and webserver_config.py overrides directly from the
CRD (role <- role-group), replacing the product-config override path.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com## Description

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

adwk67 and others added 7 commits June 3, 2026 09:28
Computes the merged env and webserver_config.py overrides directly from the
CRD (role <- role-group), replacing the product-config override path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces transform_all_roles_to_config / validate_all_roles_and_groups_config
with direct role iteration plus merged_overrides(). Folds the dereferenced
authentication/authorization objects into ValidatedAirflowCluster so downstream
build steps read them from the validated cluster. The product-config crate is
still used for the Flask config writer (removed in a later step).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drops the defunct --product-config section from the commandline reference
and notes the removal of product-config validation in the changelog.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Vendors the Flask Python-config writer locally (flask_config_writer) and drops
the airflow-operator's direct product-config dependency. The rendered
webserver_config.py is unchanged (the vendored writer is byte-for-byte faithful
to the crate). product-config remains a transitive dependency via
stackable-operator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…iter

Renames the vendored writer back to its upstream name and groups it under a
`framework` module (mirroring the convention in trino-operator), signalling it
as vendored code that is a candidate for a shared crate. The same writer is
still used by superset-operator via the product-config crate. No behaviour
change; the writer body is unchanged from the crate source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@adwk67 adwk67 marked this pull request as ready for review June 3, 2026 12:32
Comment thread docs/modules/airflow/pages/reference/commandline-parameters.adoc
Comment on lines 576 to 585
@@ -574,9 +577,9 @@ pub async fn reconcile_airflow(
airflow,
&validated.image,
&rolegroup,
&validated_rg_config.product_config_properties,
&dereferenced.authentication_config,
&dereferenced.authorization_config,
&validated_rg_config.overrides.config_file_overrides,
&validated.authentication_config,
&validated.authorization_config,
&validated_rg_config.merged_config.logging,
&Container::Airflow,
)?;
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 would not pass the airflow cluster anymore but use the ValidatedCluster. Will remove alot of parameters.

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 thread rust/operator-binary/src/airflow_controller.rs
adwk67 and others added 7 commits June 3, 2026 15:10
Relocates the vendored Flask config writer from
framework/flask_app_config_writer to config/writer, matching hdfs-operator's
config/writer.rs convention (no operator keeps a vendored writer under
framework/, which trino reserves for v2 upstream mirrors). Converts config.rs
into a config/ module. No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…onfig

Moves the webserver_config.py rendering (defaults + config overrides + the
FILE_HEADER/FILE_FOOTER python blocks + the Flask writer call) out of
build_rolegroup_config_map into a dedicated config::webserver_config::build().
The header/footer key constants and the related error variants move with it.

Drops three debug! traces of intermediate config maps that no longer have a
call site after the extraction; the rendered webserver_config.py is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…_map

Extracts build_rolegroup_config_map out of airflow_controller into a dedicated
controller/build/config_map module with its own error enum, matching the
controller/build/config_map.rs layout in hdfs- and trino-operator. The
controller now wraps it via a single BuildConfigMap error variant; the
ConfigMap-only error variants move into the new module.

No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…anch

Patches operator-rs to the smooth-operator branch (matching trino- and
hdfs-operator) and actually consumes it: AirflowConfigOverrides.webserver_config_py
now uses stackable_operator::v2::config_overrides::KeyValueConfigOverrides — the
Merge-capable variant trino/hdfs use — instead of the v1 type. Drops the v1
KeyValueOverridesProvider impl and the as_product_config_overrides() call;
merged_overrides reads the override map directly (role <- role-group extend), so
the rendered webserver_config.py is unchanged (39 tests pass).

The CRD gains `nullable: true` on the webserver_config.py override values (v2
allows null to delete a key). Regenerated extra/crds.yaml, Cargo.nix, and
crate-hashes.json.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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