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

Errouneous link for [object] type in V1RollingUpdateDeployment and V1HTTPGetAction pages #2199

Open
FabienZouaoui opened this issue Feb 23, 2024 · 10 comments
Assignees
Labels
kind/documentation Categorizes issue or PR as related to documentation.

Comments

@FabienZouaoui
Copy link

Link to the issue (please include a link to the specific documentation or example):
https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1RollingUpdateDeployment.md
https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1HTTPGetAction.md

Description of the issue (please include outputs or screenshots if possible):
Object type link point to https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/.md which returns a 404

@FabienZouaoui FabienZouaoui added the kind/documentation Categorizes issue or PR as related to documentation. label Feb 23, 2024
@roycaihw
Copy link
Member

The documentation is generated from upstream k/k openapi spec. This needs to be fixed in the upstream

@sharsha315
Copy link

Hi, is this issue still open. Can I have the opportunity to work on this issue.

@roycaihw
Copy link
Member

roycaihw commented Apr 1, 2024

Hi, is this issue still open. Can I have the opportunity to work on this issue.

Yes please feel free to assign this issue to yourself.
/assign @sharsha315

@sharsha315
Copy link

Hi @roycaihw , does this issue appear to stem from the swagger.json file? Additionally, I've noticed similar problems in several other files beyond those mentioned earlier. Could you please provide clarification on how to resolve this issue and offer guidance for handling similar occurrences in the future? Thank you for your support!

@roycaihw
Copy link
Member

Yes this documentation is generated based on the upstream openapi spec: https://github.com/kubernetes/kubernetes/tree/master/api/openapi-spec. Could you verify if the upstream has the proper type defined for the fields (not an object)?

@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 21, 2024
@sharsha315
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 22, 2024
@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 20, 2024
@sharsha315
Copy link

Hi @roycaihw,
Apologies for the delay. I lost track but am ready to work on it now and see it through.
Thanks for your patience!

The documentation link issue appears to be caused by incorrect type translation in the OpenAPI generator.

Specific findings:

  1. In swagger.json, properties like maxSurge and maxUnavailable are properly defined with:
    "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"

  2. However, in the generated Python code (V1RollingUpdateDeployment), these are translated to generic 'object' types:

    openapi_types = {
        'max_surge': 'object',
        'max_unavailable': 'object'
    }

link: https://github.com/kubernetes-client/python/blob/aab72fdeb4122337e0e3e27ad4b489dcdb7bd00d/kubernetes/client/models/v1_rolling_update_deployment.py

  1. This type mismatch leads to broken documentation links ending in .md

Suggested fix: The OpenAPI generator should maintain the specific type reference (IntOrString) instead of converting it to a generic 'object' type. This would allow proper documentation linking and type information in the generated Python client.

Can you please provide feedback and help me to proceed with this issue. My sincere apologies once again for the late repsonse.

Thank you

@sharsha315
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

No branches or pull requests

5 participants