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

Instructions to generate API docs have a few hiccups #11259

Open
thoward opened this issue Apr 15, 2024 · 0 comments
Open

Instructions to generate API docs have a few hiccups #11259

thoward opened this issue Apr 15, 2024 · 0 comments
Assignees
Labels
kind/engineering Work that is not visible to an external user kind/enhancement Improvements or new features

Comments

@thoward
Copy link
Contributor

thoward commented Apr 15, 2024

Problem description

Following the instructions in README.md to generate API docs, I ran into a couple small issues.

First, Typedoc needs to be installed, and while it's mentioned that it is used in the dependencies section, it doesn't state that it needs to be installed. That's a minor nit.

Later, the ./scripts/run_typedoc.sh seems to require sudo while generating cloud API docs.

Example: Error output

$ ./scripts/run_typedoc.sh
[..snip..]
yarn run tsc
yarn run v1.22.22
$ /Users/thoward/workspace/github/pulumi/pulumi-cloud/api/node_modules/.bin/tsc
✨  Done in 1.04s.
sed -e "s/\${VERSION}/v0.40.2/g" < package.json > bin/package.json
cp ../README.md ../LICENSE bin/
INSTALL:
mkdir: /opt/pulumi: Permission denied
make: *** [install] Error 1

but running via sudo gets past that issue.

But then while generating docs for the terraform repo we run into the need for pulumictl, in the which is also not mentioned in the requirements section. It's unclear if this missing dependency is a breaking issue or not because despite the errors it exits successfully. Will have to look at the output to see if the generate docs are correct or not when pulumictl is not present. I installed it anyway and was able to get a non-error run but haven't compared the output between the two.

Example: pulumictl requirement error

terraform
Generating pulumi.com API docs
~/workspace/github/pulumi/pulumi-terraform ~/workspace/github/pulumi/docs
make: pulumictl: Command not found
make: pulumictl: Command not found
make: pulumictl: Command not found
make: pulumictl: Command not found
make: *** No rule to make target `ensure'.  Stop.
[info] Loaded plugin typedoc-plugin-script-inject
[warning] PostgresRemoteStateReferenceArgs, defined in ./state/pgBackendConfig.ts, is referenced by state.RemoteStateReferenceArgs but not included in the documentation.
[info] Documentation generated at /Users/thoward/workspace/github/pulumi/docs/static-prebuilt/docs/reference/pkg/nodejs/pulumi/terraform
~/workspace/github/pulumi/docs

installing the pulumictl tool gives this output:

terraform
Generating pulumi.com API docs
~/workspace/github/pulumi/pulumi-terraform ~/workspace/github/pulumi/docs
make: *** No rule to make target `ensure'.  Stop.
[info] Loaded plugin typedoc-plugin-script-inject
[warning] PostgresRemoteStateReferenceArgs, defined in ./state/pgBackendConfig.ts, is referenced by state.RemoteStateReferenceArgs but not included in the documentation.
[info] Documentation generated at /Users/thoward/workspace/github/pulumi/docs/static-prebuilt/docs/reference/pkg/nodejs/pulumi/terraform
~/workspace/github/pulumi/docs

Done

Suggestions for a fix

Update the documentation to mention the additional requirements.

@thoward thoward added the needs-triage Needs attention from the triage team label Apr 15, 2024
@github-project-automation github-project-automation bot moved this to 🤔 Triage in Docs 📚 Apr 15, 2024
@sean1588 sean1588 removed the needs-triage Needs attention from the triage team label Apr 22, 2024
@sean1588 sean1588 self-assigned this Apr 22, 2024
@sean1588 sean1588 moved this from 🤔 Triage to 🎬 Ready in Docs 📚 Apr 22, 2024
@sean1588 sean1588 moved this from 🎬 Ready to 🧳 Backlog in Docs 📚 Apr 22, 2024
@interurban interurban added kind/enhancement Improvements or new features kind/engineering Work that is not visible to an external user labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/engineering Work that is not visible to an external user kind/enhancement Improvements or new features
Projects
Status: 🧳 Backlog
Development

No branches or pull requests

3 participants