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

feat: features metadata #3287

Merged
merged 7 commits into from
Sep 3, 2024
Merged

Conversation

mlavacca
Copy link
Member

@mlavacca mlavacca commented Aug 21, 2024

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Does this PR introduce a user-facing change?:

Features have been re-arranged to a struct containing metadata and feature Name. The API Channel has been set as a field for such a struct.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 21, 2024
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 21, 2024
@candita
Copy link
Contributor

candita commented Aug 22, 2024

@mlavacca would you mind adding a docs update to the description on conformance testing so users know what they are getting themselves into with this change? Looks like every time you add a new conformance test there are quite a few places to change.

Since there's no GEP - why did you decide to make changes for all features and not just for experimental features?
For reference on my query - I solved a similar problem just by adding a new set to pkg/features/features.go, called ExperimentalPolicyFeatures, in #3212.

And my complaint - every time we make sweeping changes to conformance testing, we lose the skills and attention of people with experience using the previous implementation, thence potentially losing that team/skillset.

pkg/features/tlsroute.go Outdated Show resolved Hide resolved
@mlavacca
Copy link
Member Author

@mlavacca would you mind adding a docs update to the description on conformance testing so users know what they are getting themselves into with this change? Looks like every time you add a new conformance test there are quite a few places to change.

Not really. This PR adds some metadata to the features but does not introduce any change in how conformance tests are written. In order to create a new conformance test, we just need to set the feature name as part of the test. We need to perform a new step when defining new features (instead of just defining the feature name, we need to create a new feature struct as well). I'll ensure docs mention this aspect 👍 This is the first time we are trying to introduce a lifecycle concept on the features.

Since there's no GEP - why did you decide to make changes for all features and not just for experimental features? For reference on my query - I solved a similar problem just by adding a new set to pkg/features/features.go, called ExperimentalPolicyFeatures, in #3212.

It's not possible to make this change only for a subset of features. We are defining metadata on features, and I really think we need to do so for all our features, instead of having different mechanisms based on the feature maturity.

And my complaint - every time we make sweeping changes to conformance testing, we lose the skills and attention of people with experience using the previous implementation, thence potentially losing that team/skillset.

This is very related to the first point. If one wants to add a new conformance test to an already defined feature, nothing changes. In case a new feature has to be defined, the feature definition implies the creation of a struct instead of just the creation of a string. It does not seems that we are adding implementors-facing complexity to me.

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @mlavacca!

conformance/utils/suite/conformance.go Outdated Show resolved Hide resolved

// TODO: comment
const (
FeatureStatusTrial = "TRIAL"
Copy link
Member

Choose a reason for hiding this comment

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

The more I think about this, the more I think that we actually need two separate levels here:

  1. The stability of the feature (the max release channel this has made it to)
  2. The stability of the test (tests that are brand new should default to a lower level of stability than tests that have been around for a release cycle or two with multiple passing implementations)

I think it's useful to solve both of these, and this PR seems to be on a path to solve the first one. With that said, if we're agreeing that this PR is primarily targeting the first item, then I'd use the existing "Experimental" and "Standard" terminology for each feature.

Solving 2 may actually be easier. I think it just becomes a marker on tests, and implementations have the option to skip these tests when generating a report without any kind of penalty in their conformance report (or something along those lines).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, I agree with the distinction and the fact that this PR is suitable to address the first point. As you pointed out, the 2nd point is easier, as it can be done via a specific field on the test struct.

I'll change the feature status names accordingly.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've done the change and marked the PR as ready for review, PTAL :)

@mlavacca mlavacca force-pushed the issue-3009 branch 2 times, most recently from 71ecef0 to 552e3dd Compare August 27, 2024 14:51
@mlavacca mlavacca marked this pull request as ready for review August 27, 2024 14:51
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 27, 2024
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 27, 2024
pkg/features/features.go Outdated Show resolved Hide resolved
@robscott
Copy link
Member

Thanks @mlavacca!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2024
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 31, 2024
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mlavacca, shaneutt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@robscott
Copy link
Member

robscott commented Sep 3, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit 3a7488c into kubernetes-sigs:main Sep 3, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants