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

API docs issues #373

Closed
lukehoban opened this issue Jan 24, 2019 · 4 comments
Closed

API docs issues #373

lukehoban opened this issue Jan 24, 2019 · 4 comments
Assignees
Labels
area/sdk Related to the Kubernetes SDKs (nodejs, Python, etc.) kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer
Milestone

Comments

@lukehoban
Copy link
Member

There is no helm module at https://pulumi.io/reference/pkg/nodejs/@pulumi/kubernetes/index.html, seems we show v2 there (which should be a submodule of helm)?

There are no/few docs on https://pulumi.io/reference/pkg/nodejs/@pulumi/kubernetes/v2/, apparently because we use // comments instead of /** **/ JS doc comments.

@lukehoban lukehoban added this to the 0.21 milestone Jan 24, 2019
@hausdorff hausdorff added kind/bug Some behavior is incorrect or out of spec area/sdk Related to the Kubernetes SDKs (nodejs, Python, etc.) labels Jan 30, 2019
@lblackstone
Copy link
Member

@lukehoban I'm not sure how the API docs are generated, but point 2 seems to be due to a lack of doc comments on a very large generated list:

/**
* getResource returns a resource defined by a built-in Kubernetes group/version/kind and name.
*
* For example:
* getResource("apps/v1/Deployment", "nginx")
*/
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1alpha1/InitializerConfiguration", name: string): pulumi.Output<admissionregistration.v1alpha1.InitializerConfiguration>;
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1alpha1/InitializerConfiguration", namespace: string, name: string): pulumi.Output<admissionregistration.v1alpha1.InitializerConfiguration>;
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1alpha1/InitializerConfigurationList", name: string): pulumi.Output<admissionregistration.v1alpha1.InitializerConfigurationList>;

I'm not sure if it would make sense to generate a huge number of nearly identical comments, or if there is some way to suppress most of them and only document the high-level usage.

I'm still looking into the other issues.

@lukehoban
Copy link
Member Author

I think the problem is actually all the uses of //. Those docs aren’t picket up by the doc generator.

Re: the overloads - I’m not sure whether that prevents generating useful IDE and/ doc content - but if it does I’d argue we should generate as many comments as needed.

@lblackstone
Copy link
Member

Helm is showing up as v2 in the API docs because the resources live in the v2 namespace, which is then imported under the helm namespace in the kubernetes-provider:

import * as helm from "./helm";
export { helm };

I think the preferred solution would be to move Helm resources to a separate package (#175), but we could possibly also update tsdocgen to handle this special case.

@lblackstone
Copy link
Member

I've poked at this for a bit, and decided I need to work on some basic cleanup before I can address the doc issues. The root cause of the k8s API doc problems seem to be related to the tsdocgen tool, and the fact that the k8s provider is laid out very differently than the terraform-generated providers.

I'm going to tackle #479 as a starting point, and try to make the layout match what tsdocgen is expecting.

Given the extra scope of the work, this won't make it in for M21, but should land early in M22.

@lblackstone lblackstone modified the milestones: 0.21, 0.22 Mar 8, 2019
@infin8x infin8x added the p1 A bug severe enough to be the next item assigned to an engineer label Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdk Related to the Kubernetes SDKs (nodejs, Python, etc.) kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer
Projects
None yet
Development

No branches or pull requests

4 participants