-
Notifications
You must be signed in to change notification settings - Fork 40
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
Bridge does not support all valid Markdown list formats #1935
Comments
I seem to remember that picking up output types is currently a fallback behavior when docs cannot otherwise be found. We may want to revisit that design. As for the pagerduty issue, there's two things we should look into
|
Next data point: Unlike all other providers, this particular provider adds spurious indents to its Argument Reference From pagerduty.Service:
Compare to aws.AccountRegion:
We rely on indents to discover nested docs paths. Additionally the resource description cited in the original issue has...verbose titles for the nested blocks which we don't discover in the bridge. |
So, the real fix for this issue is to make the abovementioned list indent, which is legal in GitHub flavored Markdown, be correctly handled by docs parsing. Falling back on output descriptions is a current necessary reality in larger providers such as AWS, where Inputs/Outputs overlap quite frequently but often only one is documented, so that part works as expected - the bug is that the fallback condition should never have gotten triggered for Pagerduty. |
This pull request adds recursive parsing for nested lists in upstream docs of the format. ``` * `rules` - (Required) Collection of real time alert rules * `type` - (Required) Rule type. * `issue_detection_configuration` - (Optional) Configuration for an issue detection rule. * `rule_name` - (Required) Rule name. * `spec` - A spec for the issue detection configuration rule name. ``` Due to looking at the index of the bullet point list marker in each such line, this addresses the bug underlying #1935 where blank space in front of a top-level list item is permitted in Markdown, as in this example: ``` ## Argument Reference The following arguments are supported: * `name` - (Required) The name of the service. * `description` - (Optional) A human-friendly description of the service. ``` Please see the schema diff for docs descriptions for pulumi-pagerduty: https://github.com/pulumi/pulumi-pagerduty/compare/guin/sample-docsgen?expand=1 Fixes #1935. Partial fix for pulumi/pulumi-pagerduty#477.
What happened?
For pulumi/pulumi-pagerduty#477 we noticed that we were picking up the wrong input description for a page with multiple inputs called "type".
After #1882 all the input descriptions have the output "type" description instead.
We've also lost a bunch of valid descriptions: https://www.pulumi.com/registry/packages/pagerduty/api-docs/service/#inputs - this is mostly empty.
Example
Upgrade diff: https://github.com/pulumi/pulumi-pagerduty/pull/476/files#diff-802c5dcd29dd2017fa41e8ba4cf0ede0e40d0176433bb47721c7cd87d812f10b
Output of
pulumi about
.
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: