-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Refactor version.ValidateEnabledAPIFields to config pkg #7206
Conversation
2151cd8
to
0b061b3
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
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.
Can I please request renaming this to featureflags_validation.go
instead of version_validation.go
. I see this as more of validating configuration specified in config-feature-flags.yaml
. Thoughts?
0b061b3
to
35d7c16
Compare
Thanks Priti! |
35d7c16
to
1ac61e9
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
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.
So, we don't really have this in our "guidelines", but this will break "go code" consumer, as the package is removed. We could keep the old package, alias the function and mark them as deprecated to be removed in a later release, but that's probably fine.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pritidesai, vdemeester 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 |
This commit refactors the ValidateEnabledAPIFields function to the config package. The validation previously lived in v1beta1 and it was moved to the version pkg which functions as API version conversion utils rather than for feature versions. This commit moves it to the config pkg since it is actually more tied with config validation of the feature flag. version.ValidateEnabledAPIFields has been deprecated and aliased to keep backwards compatibility. /kind misc
1ac61e9
to
d921388
Compare
Thanks @vdemeester Meanwhile I'm double-checking if https://github.com/tektoncd/pipeline/blob/main/docs/developers/api-changes.md is the right place for such guideline updates? I'm happy to add such refactor case if that sounds good. |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Probably but maybe we should have one document for Go 🙃 |
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
Changes
This commit refactors the ValidateEnabledAPIFields function to the config package. The validation previously lived in v1beta1 and it was moved to the version pkg which functions as API version conversion utils rather than for feature versions. This commit moves it to the config pkg since it is actually more tied with featureflags config validation of the
enabled-api-fields
feature flag.A future work for this might be renaming the filename to stability-level after the implementations of TEP0138 where glossaries have been planned to be updated for the API compatibility policy./kind misc
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes