You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not render empty code choosers on generated index page (#2822)
This pull request does the following:
1. Prevents the generation of code choosers with empty content
1. Writes a YAML config file with no code choosers if the example is
config-only
1. Checks the `pclExample` object for empty pulumi YAML or PCL
explicitly and before attempting to convert, removing the empty string
check from the converter functions
1. Adds tests to illustrate all four situations:
- valid provider config + example
- invalid code
- valid provider config but no example
- valid example but no provider config
1. Adds `exampleUnavailable` placeholder constant for use when
conversion fails on an individual language
1. Adds a `successfulConversion` flag that flips to True as soon as any
one language registers as having content other than the
`exampleUnavailable` message. The idea is that if even only one pulumi
language converted, we want to display the code chooser.
Fixes#2819
0 commit comments