Skip to content

feat: rewrite controller as validated pipeline stages#790

Draft
adwk67 wants to merge 6 commits into
mainfrom
feature/validated-config-types
Draft

feat: rewrite controller as validated pipeline stages#790
adwk67 wants to merge 6 commits into
mainfrom
feature/validated-config-types

Conversation

@adwk67
Copy link
Copy Markdown
Member

@adwk67 adwk67 commented May 11, 2026

Note

These PRs are primarily for validating the refactoring process and can be ignored, merged, closed etc. as we see fit.

Summary

  • Adds a framework module with validated string wrapper types, infallible builder helpers, and compile-time name length assertions (ported from opensearch-operator)
  • Rewrites the monolithic airflow_controller.rs reconcile function into a five-stage pipeline: dereference → validate → build → apply → update_status
  • The build stage is infallible — all config parsing, merging, and external lookups happen in validate/dereference

Commits

  1. framework macros and types — validated string wrappers, attributed_string_type macro, HasName/HasUid/NameIsValidLabelValue traits
  2. framework builders and utilities — infallible wrappers for labels, PDB, owner references, pod/container construction, product logging, resource names
  3. controller pipeline rewrite — the five pipeline stages, ValidatedAirflowCluster, RoleGroupBuilder, unit tests; deletes airflow_controller.rs and operations/

43 files changed, +6369 -1740

Test plan

  • cargo clippy --all-targets — zero warnings
  • cargo test — all tests pass
  • cargo doc --document-private-items — zero doc warnings

🤖 Generated with Claude Code

adwk67 and others added 6 commits May 8, 2026 18:49
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>
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.

1 participant