refactor: extract dereference/validate pipeline from reconcile_hbase#757
Open
adwk67 wants to merge 5 commits into
Open
refactor: extract dereference/validate pipeline from reconcile_hbase#757adwk67 wants to merge 5 commits into
adwk67 wants to merge 5 commits into
Conversation
Move external-reference resolution (product image, ZooKeeper, OPA) into controller/dereference.rs and product-config validation with config merging into controller/validate.rs. The reconciler now calls dereference → validate as an explicit pipeline, matching the pattern established in the airflow and hive operators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ct config validation The label-safe composite version string (e.g. "2.6.4-stackable24.7.0") is not suitable for semver matching against fromVersion/asOfVersion constraints in properties.yaml. Use the raw product_version consistently with all other operators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Jenkins: 🟢 (one failure on NS teardown) https://testing.stackable.tech/view/02%20Operator%20Tests%20(custom)/job/hbase-operator-it-custom/85/ |
Image resolution is a pure computation, not an I/O dereference, so it belongs in validate_cluster alongside the other config validation. This aligns with the pattern used by the trino and airflow operators. 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.
Summary
Ord/PartialOrdonHbaseRoleso it can be used as aBTreeMapkeyClone/DebugonAnyServiceConfigso it can be stored in validated structscontroller::dereferencemodule with its own Snafu error enumvalidate_cluster(), producing aValidatedHbaseClusterstruct that proves all validation succeeded before any Kubernetes resources are createdValidatedHbaseClusterowns the resolved product image and per-role/per-rolegroup merged configs; existing build functions are unchanged and receive parameters from the validated structsReviewer notes
dereference()andvalidate_cluster()contain no new logic — they are pure extractions of code that was previously inline inreconcile_hbase()ValidatedHbaseClusterstruct intentionally has fewer fields than a full ownership model would (noname/namespace/uid/metadatavalidated types). This is a "construct but decompose" fail-fast gate: built early in reconcile to prove validation passes, then its fields feed the existing unchanged build functionscontroller/directory is introduced as a home for pipeline stages — currentlydereferenceandvalidate, with further stages to follow in later PRsDereferenceandValidatewrapper variants in the controller'sErrorenum replace 8 individual error variants that moved into the new modules' own error enums (3 to dereference:ResolveProductImage,RetrieveZookeeperConnectionInformation,InvalidOpaConfig; 5 to validate:RoleProperties,GenerateProductConfig,InvalidProductConfig,UnidentifiedHbaseRole,FailedToResolveConfig)Test plan
cargo clippy --all-targets)🤖 Generated with Claude Code