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

[schema] Add IsOverlay option to disable codegen for particular types #8338

Merged
merged 3 commits into from Nov 12, 2021

Conversation

lblackstone
Copy link
Member

@lblackstone lblackstone commented Nov 2, 2021

Description

Related to pulumi/docs#6740

Add a new IsOverlay option to schema types and functions that allows providers to document overlays in the schema. This makes it easier to generate API docs consistently, even for code that is generated outside of the typical codegen process.

Fixes # (issue)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azuread with merge commit 618d323

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-random with merge commit 618d323

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-kubernetes with merge commit 618d323

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-gcp with merge commit 618d323

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azure with merge commit 618d323

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-aws with merge commit 618d323

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azure-native with merge commit 618d323

@pgavlin
Copy link
Member

pgavlin commented Nov 2, 2021

This seems pretty reasonable to me. Feels like we might want this on all schema members (i.e. types and functions in addition to resources).

@lblackstone
Copy link
Member Author

This seems pretty reasonable to me. Feels like we might want this on all schema members (i.e. types and functions in addition to resources).

Ha, just pushed an update that expands it to types. Let me check if that also supports functions.

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-random with merge commit cbb951e

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azuread with merge commit cbb951e

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-kubernetes with merge commit cbb951e

@lblackstone lblackstone changed the title [schema] Add IsOverlay option to disable codegen for particular resou… [schema] Add IsOverlay option to disable codegen for particular types Nov 2, 2021
@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-gcp with merge commit cbb951e

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azuread with merge commit 7cde596

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-random with merge commit 7cde596

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-kubernetes with merge commit 7cde596

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-gcp with merge commit 7cde596

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-aws with merge commit cbb951e

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azure with merge commit cbb951e

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-aws with merge commit 7cde596

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azure with merge commit 7cde596

@lblackstone lblackstone added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Nov 2, 2021
@lblackstone lblackstone marked this pull request as ready for review November 2, 2021 23:40
@github-actions
Copy link

Diff for pulumi-random with merge commit 26945dd

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 26945dd

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 26945dd

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 26945dd

@github-actions
Copy link

Diff for pulumi-azure with merge commit 26945dd

@github-actions
Copy link

Diff for pulumi-aws with merge commit 26945dd

@github-actions
Copy link

Diff for pulumi-azure-native with merge commit 26945dd

@lblackstone
Copy link
Member Author

@viveklak @justinvp This is RFR now.

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-random with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-azure with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-aws with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-azure-native with merge commit 767c0f9

@github-actions
Copy link

Diff for pulumi-azuread with merge commit fbceb96

@github-actions
Copy link

Diff for pulumi-random with merge commit fbceb96

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit fbceb96

@github-actions
Copy link

Diff for pulumi-gcp with merge commit fbceb96

@github-actions
Copy link

Diff for pulumi-azure with merge commit fbceb96

@github-actions
Copy link

Diff for pulumi-aws with merge commit fbceb96

@@ -3248,7 +3290,7 @@ func GeneratePackage(tool string, pkg *schema.Package) (map[string][]byte, error
}

// If there are resources in this module, register the module with the runtime.
if len(pkg.resources) != 0 {
if len(pkg.resources) != 0 && !allResourcesAreOverlays(pkg.resources) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@lblackstone lblackstone merged commit 0d4fb3e into master Nov 12, 2021
@pulumi-bot pulumi-bot deleted the lblackstone/overlay-schema branch November 12, 2021 00:00
@github-actions
Copy link

Diff for pulumi-azure-native with merge commit fbceb96

pgavlin added a commit that referenced this pull request Nov 16, 2021
And update the metaschema to accommodate the `isOverlay` properties
added in #8338. Overlay enums, like other overlay members, are
implemented out-of-band by the declaring package. Code generators should
not generate declarations for overlay enums.
pgavlin added a commit that referenced this pull request Nov 16, 2021
And update the metaschema to accommodate the `isOverlay` properties
added in #8338. Overlay enums, like other overlay members, are
implemented out-of-band by the declaring package. Code generators should
not generate declarations for overlay enums.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants