Add warning mechanism for unrecognized tags
As we can find in https://github.com/kubernetes/kubernetes/pull/130662, we had unrecognized tags (might still have more missconfigured tags in k/k API).
So, it would be great to implement warning mechanisms if APIs have unrecognized unqualified or kube (k8s:...) tags are used.
cc: @liggitt @soltysh
To add a bit more color, we currently recognize the following tags (using grep -rE "//.*\+\w+" --include=*.go staging/src/k8s.io/api/ | cut -d ":" -f 2 | awk '{$1=$1};1'|sort|uniq):
- unqualified tags (
+default,+deprecated,+enum,+listMapKey=...,+listType=...,+mapType=...,+oneOf=...+optional,+patchMergeKey=...,+patchStrategy=...,+protobuf...,+required,+structType=...,+union,+unionDiscriminator) - k8s tags (
+featureGate=...,+genclient:...,+groupName=,+k8s:...) - other tags (
+kubebuilder:...)
To prevent problems described in the linked pull request where instead of +unionDiscriminator we've had unionDescriminator notice the e instead of i.
/cc @jpbetz @thockin @aaron-prindle @yongruilin
Is this something that's already in the works for declarative validation? I noticed we had this PR https://github.com/kubernetes/kube-openapi/pull/519
Is this something that's already in the works for declarative validation? I noticed we had this PR https://github.com/kubernetes/kube-openapi/pull/519
Declarative Validation doesn't use this when parsing comment tags anymore. 😅
I am unsure about this. It assumes that one tool knows ALL the tags, which is (for the moment) dubious. golangci-lint doesn't use this syntax, but nothing says it CAN'T.
As we trend closer and closert to an IDL it might be viable.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/reopen
@tenzen-y: Reopened this issue.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.