-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add a config section check for bridged providers #862
Conversation
run: | | ||
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt | ||
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) |
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.
/dev/urandom ?
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 copied it from
ci-mgmt/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerequisites.splice
Line 39 in 43d79c1
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) |
Looks like GH uses the sequence as an EOF marker and it's random so it doesn't match anything in the actual string.
I'm not a great fan of bash-in-yaml for something like this but it works for the moment. |
My jq syntax in #862 was off yielding 0s and 1s for some providers: pulumi/pulumi-azure#1917 (review) The issue was that their schema had a defaults section in the config block. This PR fixes the jq syntax to correctly ignore that bit.
Flag the check added in #862 to only run for providers which have enabled it. We should fix the warnings for a provider and then enable the check to guard against regressions.
fixes pulumi/pulumi-terraform-bridge#1585
This PR adds a check in bridged provider CI for configuration options in README.md.
CI will now comment on PRs if any configuration options are missing in the README.md
Tested in pulumi/pulumi-github#615 and pulumi/pulumi-xyz#31