-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: Version CRD #597
base: main
Are you sure you want to change the base?
chore: Version CRD #597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some changes around the imports are required.
/// A Superset cluster stacklet. This resource is managed by the Stackable operator for Apache Superset. | ||
/// Find more information on how to use it and the resources that the operator generates in the | ||
/// [operator documentation](DOCS_BASE_URL_PLACEHOLDER/superset/). | ||
#[derive(Clone, CustomResource, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Does this work (are the derives forwarded to the generated code)? Because we had trouble in the past, when these attributes appeared before the #[versioned]
macro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran cargo expand crd
for both versions (setting the macro at the beginning and after another macro) and compared the whole code block between the SupersetClusterSpec
docs and SupersetClusterConfig
which should include everything generated for it I hope. And they are the same.
Or do you have an example where I would encounter those problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do you have an example where I would encounter those problems?
We encountered this issue once during development of the macro. That's why we advise to put the macro before any other (derive) macros. It is nice that it also seems to work the way you have done it.
Feel free to leave it as is or move it (which would also bring it in line with other PRs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just left a question about some un-versioned types.
authentication::{ | ||
FlaskRolesSyncMoment, SupersetAuthenticationClassResolved, | ||
SupersetClientAuthenticationDetailsResolved, DEFAULT_OIDC_PROVIDER, | ||
self, SupersetAuthenticationClassResolved, SupersetClientAuthenticationDetailsResolved, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting that these have not been versioned. Is that on purpose?
SupersetAuthenticationClassResolved
SupersetClientAuthenticationDetailsResolved
plural = "druidconnections", | ||
status = "DruidConnectionStatus", | ||
namespaced, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: This works, but if we already version the status, we should explicitly use a version here.
plural = "druidconnections", | |
status = "DruidConnectionStatus", | |
namespaced, | |
plural = "druidconnections", | |
status = "v1alpha1::DruidConnectionStatus", | |
namespaced, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for this upstream change kube-rs/kube#1704 to update that.
@@ -1,6 +1,7 @@ | |||
use std::sync::Arc; | |||
|
|||
use clap::{crate_description, crate_version, Parser}; | |||
use crd::druidconnection::DruidConnection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: This should instead be moved into the crate::
imports below.
Currently waiting for kube-rs/kube#1704 |
Description
Part of stackabletech/issues#642
Definition of Done Checklist
Author
Reviewer
Acceptance