Skip to content

feat: add experimental annotation #2853

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

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Jul 9, 2025

Annotation would serve to mark experimental features.

Annotation would serve to mark experimental features.

Signed-off-by: Attila Mészáros <[email protected]>
@openshift-ci openshift-ci bot requested review from metacosm and xstefank July 9, 2025 10:15
Signed-off-by: Attila Mészáros <[email protected]>
Copy link
Collaborator

@xstefank xstefank left a comment

Choose a reason for hiding this comment

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

We have similar in SmallRye project - https://github.com/xstefank/smallrye-common/blob/main/annotation/src/main/java/io/smallrye/common/annotation/Experimental.java and I would suggest also giving this one a String argument that says why/what experimental feature this is.

@csviri
Copy link
Collaborator Author

csviri commented Jul 9, 2025

We have similar in SmallRye project - https://github.com/xstefank/smallrye-common/blob/main/annotation/src/main/java/io/smallrye/common/annotation/Experimental.java and I would suggest also giving this one a String argument that says why/what experimental feature this is.

Makes sense, will add, thank you!

@csviri
Copy link
Collaborator Author

csviri commented Jul 9, 2025

@xstefank Why is there runtime retention?

Signed-off-by: Attila Mészáros <[email protected]>
@xstefank
Copy link
Collaborator

xstefank commented Jul 9, 2025

@csviri we might pull this in logs or similar based on config.

@csviri csviri requested a review from xstefank July 9, 2025 13:06
/**
* Marks experimental features.
*
* <p>Experimental features are not yet stable and may change in future releases. Usually based on
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we could also say that we keep changes to minor or even micro releases. But that's optional.

Copy link
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

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

Do we intend to do anything specific with this annotation? i.e. automated warning when using experimental features, or such? If not, why not use just documentation for that purpose?
To be clear, not saying we shouldn't add such an annotation, just wondering what we will use it for.

@csviri
Copy link
Collaborator Author

csviri commented Jul 10, 2025

Do we intend to do anything specific with this annotation? i.e. automated warning when using experimental features, or such? If not, why not use just documentation for that purpose? To be clear, not saying we shouldn't add such an annotation, just wondering what we will use it for.

That is fair, we should define/agree on how we are going to use it. My intention is just to mark features which are either not well understood / discovered / standard feature of operator framewors as experimental, until we standardize them or possibly iterate on them a few cycles. IMHO, annotation is not just a little more visible than simple Javadoc, but helps us and the users easily search for the experimental features, and yes also possibly build some additional logic on top of it in case.

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

Successfully merging this pull request may close these issues.

3 participants