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

Emit upstream Installation instructions #2068

Merged
merged 12 commits into from
Jun 14, 2024

Conversation

guineveresaenger
Copy link
Contributor

@guineveresaenger guineveresaenger commented Jun 6, 2024

This pull request is the scaffold implementation of generating installation docs for bridged providers from upstream source.

In this change, a new "language" called registry-docs is added to the bridge. (Note that "language" in this case is a bit of a misnomer - it is the tfgen CLI's input for determining which generating tactic to use - this is why schema is a language as well).

This change reads the upstream index.md file and emits it as a Pulumi package installation instruction file to a top-level folder called docs/ (the current registry standard). We also emit a minimal _index.md file. When these files exist in a provider, the registry will use those instead of the hard coded files existing in the registry currently.

This pull request includes a fair bit of TODOs in the docs parser - currently only the Hugo front matter is implemented, to show the scaffold. Transformations for this document to be Pulumi-friendly will follow in a separate PR.

This change does not affect any current use of the bridge - to flip it on, we'd add another Make target to a provider's Makefile, e.g. ./bin/pulumi-tfgen-openstack registry-docs --out docs/. I'd like us to consider adding this change despite the TODOs, so we can keep the changes somewhat atomic and reduce merge conflicts.

Closes #2082.

@guineveresaenger guineveresaenger requested review from a team, VenelinMartinov and iwahbe June 6, 2024 16:24
pkg/tfgen/docs.go Outdated Show resolved Hide resolved
pkg/tfgen/docs.go Outdated Show resolved Hide resolved
pkg/tfgen/docs.go Outdated Show resolved Hide resolved
pkg/tfgen/generate.go Show resolved Hide resolved
pkg/tfgen/source.go Show resolved Hide resolved
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 19.23077% with 42 lines in your changes missing coverage. Please review.

Project coverage is 61.19%. Comparing base (ba48631) to head (0e694b9).
Report is 8 commits behind head on master.

Files Patch % Lines
pkg/tfgen/generate.go 17.85% 22 Missing and 1 partial ⚠️
pkg/tfgen/source.go 17.39% 17 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    pulumi/pulumi#2068      +/-   ##
==========================================
- Coverage   61.57%   61.19%   -0.39%     
==========================================
  Files         334      340       +6     
  Lines       44955    45215     +260     
==========================================
- Hits        27681    27668      -13     
- Misses      15750    16026     +276     
+ Partials     1524     1521       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guineveresaenger guineveresaenger merged commit 5cd5311 into master Jun 14, 2024
11 checks passed
@guineveresaenger guineveresaenger deleted the guin/emit-installation-instructions branch June 14, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emit upstream provider overview to $provider/docs folder
2 participants