kube-openapi icon indicating copy to clipboard operation
kube-openapi copied to clipboard

Add warning mechanism for unrecognized tags

Open tenzen-y opened this issue 1 year ago • 4 comments

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

tenzen-y avatar Mar 13 '25 20:03 tenzen-y

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.

soltysh avatar Mar 14 '25 10:03 soltysh

/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

Jefftree avatar Mar 18 '25 14:03 Jefftree

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. 😅

yongruilin avatar Mar 18 '25 18:03 yongruilin

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.

thockin avatar Mar 21 '25 23:03 thockin

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Jun 24 '25 20:06 k8s-triage-robot

/remove-lifecycle stale

tenzen-y avatar Jun 25 '25 05:06 tenzen-y

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Sep 23 '25 06:09 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Oct 23 '25 07:10 k8s-triage-robot

/remove lifecycle rotten

yongruilin avatar Oct 23 '25 16:10 yongruilin

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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 avatar Nov 22 '25 17:11 k8s-triage-robot

@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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

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.

k8s-ci-robot avatar Nov 22 '25 17:11 k8s-ci-robot

/reopen

tenzen-y avatar Nov 24 '25 04:11 tenzen-y

@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.

k8s-ci-robot avatar Nov 24 '25 04:11 k8s-ci-robot