-
Notifications
You must be signed in to change notification settings - Fork 120
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
Migrate to full use of tools/resourcedocsgen #4663
Conversation
Your site preview for commit f33fde0 is ready! 🎉 http://registry--origin-pr-4663-f33fde09.s3-website.us-west-2.amazonaws.com/registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this!
cfe7143
to
64068d9
Compare
Your site preview for commit 64068d9 is ready! 🎉 http://registry--origin-pr-4663-64068d91.s3-website.us-west-2.amazonaws.com/registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great @guineveresaenger ! Thanks so much for doing this!! I tested out these commands locally and outputs match what registrygen was doing before, so looks like the migration is working as expected! Just one thing to address.
Also thank you for this:
This commit sends an error for 3rd party providers if the required docs files cannot be found.
cd tools/resourcedocsgen && go run github.com/pulumi/registry/tools/resourcedocsgen \ | ||
resourcedocsgen metadata --providerName=${{ env.PROVIDER_SHORT_NAME }} --repoSlug pulumi/pulumi-${{ env.PROVIDER_SHORT_NAME }} --schemaFile="${{ env.PROVIDER_SCHEMA_PATH }}" --version="${{ env.PROVIDER_VERSION }}" --publisher Pulumi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd tools/resourcedocsgen && go run github.com/pulumi/registry/tools/resourcedocsgen \ | |
resourcedocsgen metadata --providerName=${{ env.PROVIDER_SHORT_NAME }} --repoSlug pulumi/pulumi-${{ env.PROVIDER_SHORT_NAME }} --schemaFile="${{ env.PROVIDER_SCHEMA_PATH }}" --version="${{ env.PROVIDER_VERSION }}" --publisher Pulumi | |
cd tools/resourcedocsgen && go run github.com/pulumi/registry/tools/resourcedocsgen \ | |
metadata --providerName=${{ env.PROVIDER_SHORT_NAME }} --repoSlug pulumi/pulumi-${{ env.PROVIDER_SHORT_NAME }} --schemaFile="${{ env.PROVIDER_SCHEMA_PATH }}" --version="${{ env.PROVIDER_VERSION }}" --publisher Pulumi |
I don't think calling resourcedocsgen
here will work since you are doing a go run in the line above. So probably just need to pass it the subcommands and args like you are doing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh! thank you for this catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from Sean's comment, this all looks great to me. Thanks so much @guineveresaenger! I've been confused by the existence of both of these also.
Update README reference
Co-authored-by: Ian Wahbe <[email protected]>
f88548a
to
e8bfa18
Compare
Your site preview for commit e8bfa18 is ready! 🎉 http://registry--origin-pr-4663-e8bfa186.s3-website.us-west-2.amazonaws.com/registry. |
Your site preview for commit 4ba53ce is ready! 🎉 http://registry--origin-pr-4663-4ba53ceb.s3-website.us-west-2.amazonaws.com/registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Site previews for this pull request have been removed. ✨ |
Description
This pull request migrates functionality from https://github.com/pulumi/registrygen to
tools/resourcedocsgen
which is more actively maintained, in the aim of retiringregistrygen
.Before this change
(to the best of my knowledge)
registrygen metadata
to generate metadata files, these arePulumi.yaml in the
themes/default/datafolder and
_index.mdand
configuration-installation.mdin the
themes/default/content` folder.resourcedocsgen
to build API docs. This pull request does not change that.After this change
resourcedocsgen metadata
resourcedocsgen pkgversion
It has been a constant source of confusion to maintainers on which tool to use when, as they're very similar and both come with unused code that looks like it's the real thing (but we use the other tool for that). I have personally wasted entirely too much time on this discrepancy.
After this pull request merges, we should be able to retire pulumi/registrygen.
I recommend reviewing these commits one by one:
Moves the current, stable functionality we've been using to
resourcedocsgen
. There are functionality and use updates.nil
for Pulumi providers, so that we continue to use the hard coded config docs files in the registry until we've implemented Generate documentation for provider configuration #4749 (work underway).Follows Go module naming protocol. This is a cleanup from the migration from pulumi/docs.