refactor: extract dereference/validate pipeline from reconcile#687
Open
maltesander wants to merge 31 commits into
Open
refactor: extract dereference/validate pipeline from reconcile#687maltesander wants to merge 31 commits into
maltesander wants to merge 31 commits into
Conversation
Empty modules with snafu Error stubs. Wires up `mod` declarations so later commits can fill them in without further plumbing changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Defines DereferencedSparkApplication and an async dereference() function that consolidates template merging, S3 connection resolution, the early S3 TLS sanity check, and log directory resolution. Not yet wired into reconcile(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tion Defines ValidatedSparkApplication and a sync validate() function that resolves the product image (moved from reconcile()) and runs validated_role_config. Not yet wired into reconcile(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
reconcile() now delegates template merging, S3 resolution, TLS sanity checking, log directory resolution, image resolution, and product-config validation to the new submodules. The function body shrinks by ~70 lines and the controller's Error enum loses six variants now living in the submodules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Aligns history with connect (which already uses controller.rs) ahead of splitting it into a controller/ submodule folder. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lidation Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ution Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drift-detect the 3 ConfigMaps, ServiceAccount, and RoleBinding that persist after SparkApplication/spark-pi-s3-1 reaches phase: Succeeded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Snapshot the full `.data` of spark-connect-server and spark-connect-executor ConfigMaps. Uses `.yaml.j2` because spark-defaults.conf and template.yaml differ between s3-use-tls dimensions (https vs http, extraJavaOptions, initContainers, minio-tls-ca volume). The spark.kubernetes.namespace line is substituted at runtime via sed/__NAMESPACE__ to survive randomised kuttl namespaces. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adwk67
reviewed
Jun 1, 2026
| type Result<T, E = Error> = std::result::Result<T, E>; | ||
|
|
||
| pub struct ValidatedSparkConnectServer { | ||
| pub dereferenced: DereferencedSparkConnectServer, |
Member
There was a problem hiding this comment.
This departs from what we have done elsewhere (where the individual fields are included in the validated struct): also applies to the other two validate.rs files.
| client: &Client, | ||
| scs: &v1alpha1::SparkConnectServer, | ||
| ) -> Result<DereferencedSparkConnectServer> { | ||
| let resolved_s3 = s3::ResolvedS3::resolve(client, scs) |
Member
There was a problem hiding this comment.
This looks like fetching + validation in one step. But looking at the code it does not seem trivial to split this up.
Member
There was a problem hiding this comment.
The TLS check has been moved ito the validate step in 91bb6d5. Otherwise we can leave this as it is (until e.g. after product config has been removed) as "resolve" in this context is actually a fetch that happens to also flatten a simple enum.
Member
|
Smoke tests: |
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.
Description
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker