Skip to content

chore: Version CRD and AirflowClusterConfig #581

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 9 commits into from
Feb 6, 2025
Merged

Conversation

Techassi
Copy link
Member

@Techassi Techassi commented Jan 30, 2025

Part of stackabletech/issues#642

This PR adds versioning to the Airflow CRD and cluster config. It doesn't introduce any new version or updates the CRD in any way. It currently emits the same crd.yaml which is the correct expected behaviour.

Tip

It is recommended to look at this PR on a commit-by-commit basis to better understand the individual steps taken.

@Techassi Techassi self-assigned this Jan 30, 2025
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 left a couple of comments.

Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>
@NickLarsenNZ NickLarsenNZ self-requested a review February 5, 2025 13:58
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

@adwk67 adwk67 self-requested a review February 5, 2025 14:57
Copy link
Member

@adwk67 adwk67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - ran a few tests and verified the CRD has not changed at all. As a general comment (i.e. not blocking this PR), I would like to have an explanation somewhere (probably here) that illustrates what the code will look like when we have multiple versions (see for instance the places I've highlighted with "see general review comment"). Will that just be a matter of extending the annotation? Will the operator code get more "cluttered"?

Plus: thanks for the clean up! (renaming constants, sorting/grouping imports etc.) 👍

@Techassi
Copy link
Member Author

Techassi commented Feb 6, 2025

I would like to have an explanation somewhere (probably here) that illustrates what the code will look like when we have multiple versions (see for instance the places I've highlighted with "see general review comment").

What the macro expands to is explained in great detail in the doc comments. I however noticed, that the docs don't mention an example with two or more versions. I will add that.

Will that just be a matter of extending the annotation?

Yes, new versions can simply be introduced by adding it to the the list of versions in the attribute macro. Eg:

#[versioned(
    version(name = "v1alpha1"),
    version(name = "v1beta1")
)]
pub mod versioned {}

Will the operator code get more "cluttered"?

Hopefully not. The current plan is to only use the latest version in code, eg: If we would to update the CRD from v1alpha1 to v1beta1, the code will use v1beta1 (where currently v1alpha1 is used) and will additionally provide a conversion from v1alpha1 to v1beta1 (ideally also the other way around, but different discussion).

Plus: thanks for the clean up! (renaming constants, sorting/grouping imports etc.) 👍

Sure thing :)

@Techassi Techassi added this pull request to the merge queue Feb 6, 2025
Merged via the queue into main with commit 02b9f97 Feb 6, 2025
17 checks passed
@Techassi Techassi deleted the chore/add-crd-versioning branch February 6, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants