Skip to content

Commit 6d943ce

Browse files
Remove info.SkipExamples (#3153)
This pull request removes the experimental feature of info.SkipExamples. It was intended as a more granular example-skipping feature for use on individual resources in providers. Only two providers are using this currently, and using the feature results in loss of documentation. For more context, see pulumi/pulumi-aws#5691. Blocked by pulumi/pulumi-aws#5691, pulumi/pulumi-alicloud#1044. Fixes #3152.
1 parent 442060a commit 6d943ce

File tree

3 files changed

+0
-32
lines changed

3 files changed

+0
-32
lines changed

pkg/tfbridge/info.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,6 @@ func ConfigBoolValue(vars resource.PropertyMap, prop resource.PropertyKey, envs
394394
return false
395395
}
396396

397-
// EXPERIMENTAL: the signature may change in minor releases.
398-
type SkipExamplesArgs = info.SkipExamplesArgs
399-
400397
// If specified, the hook will run just prior to executing Terraform state upgrades to transform the resource state as
401398
// stored in Pulumi. It can be used to perform idempotent corrections on corrupt state and to compensate for
402399
// Terraform-level state upgrade not working as expected. Returns the corrected resource state and version. To be used

pkg/tfbridge/info/info.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,6 @@ type Provider struct {
134134
// This list may change over time.
135135
UpstreamRepoPath string
136136

137-
// EXPERIMENTAL: the signature may change in minor releases.
138-
//
139-
// If set, allows selecting individual examples to skip generating into the PackageSchema (and eventually API
140-
// docs). The primary use case for this hook is to ignore problematic or flaky examples temporarily until the
141-
// underlying issues are resolved and the examples can be rendered correctly.
142-
SkipExamples func(SkipExamplesArgs) bool
143-
144137
// EXPERIMENTAL: the signature may change in minor releases.
145138
//
146139
// Optional function to post-process the generated schema spec after
@@ -1375,19 +1368,6 @@ type PreStateUpgradeHookArgs struct {
13751368
ResourceSchemaVersion int64
13761369
}
13771370

1378-
// EXPERIMENTAL: the signature may change in minor releases.
1379-
type SkipExamplesArgs struct {
1380-
// token will be a resource, function, or type token from Pulumi Package Schema. For instance,
1381-
// "aws:acm/certificate:Certificate" would indicate the example pertains to the Certificate resource in the AWS
1382-
// provider.
1383-
Token string
1384-
1385-
// examplePath will provide even more information on where the example is found. For instance,
1386-
// "#/resources/aws:acm/certificate:Certificate/arn" would encode that the example pertains to the arn property
1387-
// of the Certificate resource in the AWS provider.
1388-
ExamplePath string
1389-
}
1390-
13911371
var rawStateDeltaEnabledEnvVarValue = os.Getenv("PULUMI_RAW_STATE_DELTA_ENABLED")
13921372

13931373
func (info *Provider) RawStateDeltaEnabled() bool {

pkg/tfgen/docs.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,15 +1474,6 @@ func (g *Generator) convertExamples(docs string, path examplePath) string {
14741474
return ""
14751475
}
14761476

1477-
if g.info.SkipExamples != nil {
1478-
if g.info.SkipExamples(tfbridge.SkipExamplesArgs{
1479-
Token: path.Token(),
1480-
ExamplePath: path.String(),
1481-
}) {
1482-
return ""
1483-
}
1484-
}
1485-
14861477
if strings.Contains(docs, "{{% examples %}}") {
14871478
// The provider author has explicitly written an entire markdown document including examples.
14881479
// We'll just return it as is.

0 commit comments

Comments
 (0)