reference-docs icon indicating copy to clipboard operation
reference-docs copied to clipboard

Add special case operation names

Open dshebib opened this issue 1 year ago • 6 comments

Adds a few more operations to the api documentation in the appropriate locations.

dshebib avatar Jun 05 '24 19:06 dshebib

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dshebib Once this PR has been reviewed and has the lgtm label, please assign feloy for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

k8s-ci-robot avatar Jun 05 '24 19:06 k8s-ci-robot

Should note that this PR will cause the generator to emit a few lines that are formatted as errors. @tengqm I am not familiar with the CI tools in this repo, should I reformat them as standard logs to avoid causing issues? The lines are the following:

[31mNo Definition found for getCodeVersion [/version/].[0m
[31mNo Definition found for getServiceAccountIssuerOpenIDKeyset [/openid/v1/jwks/].[0m
[31mNo Definition found for getServiceAccountIssuerOpenIDConfiguration [/.well-known/openid-configuration/].[0m
[31mNo Definition found for createCoreV1NamespacedPodBinding [/api/v1/namespaces/{namespace}/pods/{name}/binding].[0m

Emitted because though these operations have definitions, the generator does not associate them with a resource. The generated html after running the generator does not omit any pre-existing information and only moves information from the new Operations section to their respective sections (/pod/ etc.)

dshebib avatar Jul 30 '24 16:07 dshebib

@dshebib The operations appear in the log because we don't have special logics to handle them. In other words, our pattern matching logic cannot identify them as valid operations, and, that is the reason we temporarily excluded them from the reference docs generated.

For each operation from the swagger spec, we should either properly generate reference for that operator, or we should report it as an exception. We are not supposed to fail silently. This is the reason I asked you to double check this PR.

tengqm avatar Aug 01 '24 23:08 tengqm

Sorry, I should have clarified. The documentation gets correctly generated according to the definition for the operation itself in the swagger.json. The error is generated because there is no associated resource definition. Therefore, the final behaviour is that documentation is generated for the endpoint in a miscellaneous 'operations' section:

image image

dshebib avatar Aug 03 '24 00:08 dshebib

In checking this, I found that the logic from my previous PR does not respect and exclude the excluded operations in the config from the miscellaneous operations section. I will fix this this weekend.

dshebib avatar Aug 03 '24 00:08 dshebib

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR 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 Nov 01 '24 01:11 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR 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 Dec 01 '24 01:12 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs 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 PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Dec 31 '24 01:12 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs 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 PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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 Dec 31 '24 01:12 k8s-ci-robot