feat: rewrite controller as validated pipeline stages#790
Draft
adwk67 wants to merge 6 commits into
Draft
Conversation
Introduce the framework module with validated type wrappers that enforce constraints at parse time rather than at each use site. Includes attributed_string_type macro for generating validated newtypes, and typed wrappers for Kubernetes (NamespaceName, Uid) and operator (ProductName, OperatorName, etc.) concepts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the remaining framework infrastructure: builder helpers for metadata, PDB, pod containers, and statefulsets; KVP label generation for recommended and selector labels; product logging configuration; and role/role-group utility functions. All modules are marked #[allow(dead_code)] pending controller integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the monolithic airflow_controller with a structured pipeline of dereference → validate → build → apply → update_status stages. Each stage operates on validated, type-safe data rather than raw CRD types. Remove airflow_controller.rs and operations/ modules whose logic has been absorbed into the new pipeline. Update product_logging.rs, controller_commons.rs, and service.rs signatures for the new validated types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
These PRs are primarily for validating the refactoring process and can be ignored, merged, closed etc. as we see fit.
Summary
frameworkmodule with validated string wrapper types, infallible builder helpers, and compile-time name length assertions (ported from opensearch-operator)airflow_controller.rsreconcile function into a five-stage pipeline: dereference → validate → build → apply → update_statusCommits
attributed_string_typemacro,HasName/HasUid/NameIsValidLabelValuetraitsValidatedAirflowCluster,RoleGroupBuilder, unit tests; deletesairflow_controller.rsandoperations/43 files changed, +6369 -1740
Test plan
cargo clippy --all-targets— zero warningscargo test— all tests passcargo doc --document-private-items— zero doc warnings🤖 Generated with Claude Code