generated from pulumi/pulumi-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Begin Gradual port to go-provider-sdk #258
Open
iwahbe
wants to merge
9
commits into
main
Choose a base branch
from
iwahbe/port-one-resource-to-infer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit uses the infer package to generate the schema. The hand-written schema has moved to `legacy-schema.json`. `legacy-schem.json` is still embedded in the binary, since the wrapped RPC provider still needs to be able to produce a schema. As resources are moved over the raw RPC provider to infer, they can be removed from the legacy schema. While it looks like the new `schema.json` file checked in with this commit is extremely different, there are no semantic changes. The only changes are introducing the module format key, re-ordering `"required"` and `"requiredInputs"` and adding the `"type": "object",` indicator on objects (the default). For completeness, I have included the entire diff: ``` $ json-diff original-schema.json schema.json { + meta: { + moduleFormat: "(.*)" + } types: { pulumiservice:index:DeploymentSettingsGitAuthBasicAuth: { required: [ + "password" ... - "password" ] } pulumiservice:index:GCPOIDCConfiguration: { required: [ ... - "workloadPoolId" ... ... + "workloadPoolId" ] } pulumiservice:index:AzureOIDCConfiguration: { required: [ ... + "subscriptionId" ... - "subscriptionId" ] } } resources: { pulumiservice:index:AgentPool: { + type: "object" } pulumiservice:index:AccessToken: { + type: "object" required: [ + "description" ... - "description" ... ] } pulumiservice:index:Team: { + type: "object" required: [ + "members" ... ... - "members" ] } pulumiservice:index:TeamAccessToken: { + type: "object" required: [ ... + "organizationName" ... - "organizationName" ... ] requiredInputs: [ ... + "organizationName" ... - "organizationName" ] } pulumiservice:index:OrgAccessToken: { + type: "object" } pulumiservice:index:Webhook: { + type: "object" required: [ ... ... + "format" + "name" ... ... - "name" - "format" ] } pulumiservice:index:DeploymentSettings: { + type: "object" requiredInputs: [ ... ... + "sourceContext" ... - "sourceContext" ] } pulumiservice:index:StackTag: { + type: "object" required: [ + "name" ... ... ... - "name" ... ] requiredInputs: [ + "name" ... ... ... - "name" ... ] } pulumiservice:index:TeamStackPermission: { + type: "object" requiredInputs: [ - "team" ... + "permission" ... ... - "permission" + "team" ] } } } ```
iwahbe
force-pushed
the
iwahbe/port-one-resource-to-infer
branch
from
April 24, 2024 22:35
863b06b
to
ea207a6
Compare
iwahbe
added
the
impact/no-changelog-required
This issue doesn't require a CHANGELOG update
label
Apr 24, 2024
iwahbe
changed the title
Gradual port to go-provider-sdk
Begin Gradual port to go-provider-sdk
Apr 24, 2024
iwahbe
force-pushed
the
iwahbe/port-one-resource-to-infer
branch
from
April 25, 2024 17:07
712be1d
to
0b9e63c
Compare
This is a pretty big change, so feel free to open up a sync conversation if you have questions / concerns about merging. I can decompose into smaller PRs if necessary. |
iwahbe
added a commit
to pulumi/pulumi-go-provider
that referenced
this pull request
Apr 26, 2024
While working on pulumi/pulumi-pulumiservice#258, I noticed that native providers receive unknown values over the wire regardless of configure options. This reflects that in the `rpc` middleware.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is designed to enable a gradual transition onto the go provider sdk, starting from core parts of the provider and moving gradually (in future PRs) to leaf parts of the provider.
This PR converts the Provider/Configure resource args to the pulumi-go-provider. It converts all resources to use the new client injection mechanism, but does not change the resource implementation itself. Tests have been updated to reflect the new client injection mechanism.
024d0d5:
This commit uses the infer package to generate the schema. The hand-written schema has
moved to
legacy-schema.json
.legacy-schem.json
is still embedded in the binary, sincethe wrapped RPC provider still needs to be able to produce a schema. As resources are
moved over the raw RPC provider to infer, they can be removed from the legacy
schema. While it looks like the new
schema.json
file checked in with this commit isextremely different, there are no semantic changes. The only changes are introducing the
module format key, re-ordering
"required"
and"requiredInputs"
and adding the"type": "object",
indicator on objects (the default). For completeness, I have included theentire diff:
6b5850f: Change client injection mechanism to use
context.Context
.