Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

chore: Version CRD #597

wants to merge 7 commits into from

Conversation

xeniape
Copy link
Member

@xeniape xeniape commented Feb 12, 2025

Description

Part of stackabletech/issues#642

--- PASS: kuttl (750.67s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/resources_superset-latest-4.1.1_openshift-false (103.78s)
        --- PASS: kuttl/harness/cluster-operation_superset-latest-4.1.1_openshift-false (117.03s)
        --- PASS: kuttl/harness/logging_superset-4.0.2_openshift-false (185.71s)
        --- PASS: kuttl/harness/ldap_superset-4.1.1_ldap-authentication-server-verification-tls_openshift-false (137.80s)
        --- PASS: kuttl/harness/ldap_superset-4.1.1_ldap-authentication-no-tls_openshift-false (124.60s)
        --- PASS: kuttl/harness/ldap_superset-4.1.1_ldap-authentication-insecure-tls_openshift-false (100.91s)
        --- PASS: kuttl/harness/ldap_superset-4.0.2_ldap-authentication-server-verification-tls_openshift-false (103.86s)
        --- PASS: kuttl/harness/ldap_superset-4.0.2_ldap-authentication-no-tls_openshift-false (104.41s)
        --- PASS: kuttl/harness/ldap_superset-4.0.2_ldap-authentication-insecure-tls_openshift-false (101.61s)
        --- PASS: kuttl/harness/smoke_superset-4.1.1_openshift-false (96.96s)
        --- PASS: kuttl/harness/logging_superset-4.1.1_openshift-false (115.13s)
        --- PASS: kuttl/harness/oidc_superset-4.1.1_openshift-false (137.10s)
        --- PASS: kuttl/harness/oidc_superset-4.0.2_openshift-false (123.61s)
        --- PASS: kuttl/harness/smoke_superset-4.0.2_openshift-false (98.51s)
        --- PASS: kuttl/harness/druid-connection_superset-4.1.1_openshift-false (192.16s)
        --- PASS: kuttl/harness/druid-connection_superset-4.0.2_openshift-false (184.04s)
PASS

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

@xeniape xeniape self-assigned this Feb 12, 2025
@xeniape xeniape marked this pull request as ready for review February 12, 2025 09:01
@NickLarsenNZ NickLarsenNZ self-requested a review February 12, 2025 14:12
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a 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.

@xeniape xeniape requested a review from NickLarsenNZ February 17, 2025 12:44
/// 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)]
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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).

@xeniape xeniape requested a review from Techassi February 24, 2025 12:10
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a 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,
Copy link
Member

@NickLarsenNZ NickLarsenNZ Feb 25, 2025

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

Comment on lines +25 to +27
plural = "druidconnections",
status = "DruidConnectionStatus",
namespaced,
Copy link
Member

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.

Suggested change
plural = "druidconnections",
status = "DruidConnectionStatus",
namespaced,
plural = "druidconnections",
status = "v1alpha1::DruidConnectionStatus",
namespaced,

Copy link
Member Author

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;
Copy link
Member

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.

@sbernauer
Copy link
Member

Currently waiting for kube-rs/kube#1704

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development: Track
Development

Successfully merging this pull request may close these issues.

4 participants