-
-
Notifications
You must be signed in to change notification settings - Fork 4
refactor: extract dereference/validate pipeline from reconcile #687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
312224b
refactor(app): scaffold dereference and validate submodules
maltesander c2cbddc
refactor(app): add dereference module with template/S3/logdir fetch
maltesander a7ae799
refactor(app): add validate module with image + product-config valida…
maltesander 8b60c77
refactor(app): wire reconcile through dereference + validate
maltesander 746a3ca
chore(history): rename history_controller.rs to controller.rs
maltesander aba4a07
refactor(history): scaffold dereference and validate submodules
maltesander f343b86
refactor(history): add dereference module with log directory fetch
maltesander 730c61c
refactor(history): add validate module with image + product-config va…
maltesander 8210bb1
refactor(history): wire reconcile through dereference + validate
maltesander 5baf8ff
refactor(connect): scaffold dereference and validate submodules
maltesander 82d495c
refactor(connect): add dereference module with S3 connection fetch
maltesander f8f8a67
refactor(connect): add validate module with image + role config resol…
maltesander 99b4a64
refactor(connect): wire reconcile through dereference + validate
maltesander 8bfce40
style: apply cargo fmt to wired controllers
maltesander 32ed5f0
fix: correct error message
maltesander d731d13
fix: remove obsolete errors
maltesander 7cc6cd2
fix: regenerate crate hashes
maltesander 56c0802
test(spark-connect): trim 10-assert to bare CR Available wait
maltesander 4d78418
test(smoke): add SparkHistoryServer resource snapshot assert
maltesander fa03bde
test(smoke): add SparkHistoryServer ConfigMap data snapshot
maltesander d884f61
test(smoke): add SparkApplication resource snapshot assert
maltesander c1af068
test(smoke): add SparkApplication ConfigMap data snapshot
maltesander ecae1c4
test(spark-connect): add SparkConnectServer resource snapshot assert
maltesander f335abb
test(spark-connect): add SparkConnectServer ConfigMap data snapshot
maltesander 3b68fae
docs: adapt changelog
maltesander e173fac
fix(smoke): improve diff output
maltesander 5f708ba
fix(tests): fix test asserts for vector aggregator
maltesander 47ec257
fix(connect): add vector aggregator fixes
maltesander 91bb6d5
move TLS check into the validate step
adwk67 1f5b3a7
fix merge conflict
adwk67 043c0a0
thread dereferenced fields through the validated structs
adwk67 9aa8a81
fix: correct error handling for no-tls s3 bucket
maltesander f6444b7
fix: remove obsolete tls validation check
maltesander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
33 changes: 33 additions & 0 deletions
33
rust/operator-binary/src/connect/controller/dereference.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| //! The dereference step in the SparkConnectServer controller. | ||
| //! | ||
| //! Fetches the resolved S3 configuration referenced by the SparkConnectServer spec. | ||
|
|
||
| use snafu::{ResultExt, Snafu}; | ||
| use stackable_operator::{client::Client, kube::ResourceExt}; | ||
|
|
||
| use crate::connect::{crd::v1alpha1, s3}; | ||
|
|
||
| #[derive(Snafu, Debug)] | ||
| pub enum Error { | ||
| #[snafu(display("failed to resolve S3 connection for {name}"))] | ||
| ResolveS3Connections { source: s3::Error, name: String }, | ||
| } | ||
|
|
||
| type Result<T, E = Error> = std::result::Result<T, E>; | ||
|
|
||
| pub struct DereferencedSparkConnectServer { | ||
| pub resolved_s3: s3::ResolvedS3, | ||
| } | ||
|
|
||
| pub async fn dereference( | ||
| client: &Client, | ||
| scs: &v1alpha1::SparkConnectServer, | ||
| ) -> Result<DereferencedSparkConnectServer> { | ||
| let resolved_s3 = s3::ResolvedS3::resolve(client, scs) | ||
| .await | ||
| .with_context(|_| ResolveS3ConnectionsSnafu { | ||
| name: scs.name_unchecked(), | ||
| })?; | ||
|
|
||
| Ok(DereferencedSparkConnectServer { resolved_s3 }) | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.