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

Add support for Create/Update previews. #1355

Merged
merged 3 commits into from
Oct 15, 2020
Merged

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Oct 13, 2020

Implement support for the recently-added "provider preview" feature of
the Pulumi plugin interface that allows a resource provider to return
known values from a call to Create or Update during a preview. This
feature improves the usability of previews by allowing more values to be
treated as known.

When previewing a Create or Update operation, the Kuberentes provider
will either return the result of a dry-run performed by the API server
or will return the inputs as-is. The dry-run is preferred, but is only
possible when all of the inputs to the resource are known, the API
server supports dry-running the resource in question, and the user has
explicitly enabled the feature using the enableDryRun configuration
property. Returning the inputs as-is matches the behavior previously
implemented by the Pulumi engine.

Proposed changes

Related issues (optional)

Implement support for the recently-added "provider preview" feature of
the Pulumi plugin interface that allows a resource provider to return
known values from a call to Create or Update during a preview. This
feature improves the usability of previews by allowing more values to be
treated as known.

When previewing a Create or Update operation, the Kuberentes provider
will either return the result of a dry-run performed by the API server
or will return the inputs as-is. The dry-run is preferred, but is only
possible when all of the inputs to the resource are known, the API
server supports dry-running the resource in question, and the user has
explicitly enabled the feature using the `enableDryRun` configuration
property. Returning the inputs as-is matches the behavior previously
implemented by the Pulumi engine.
@pgavlin pgavlin requested a review from lblackstone October 13, 2020 14:59
@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@lblackstone
Copy link
Member

/run-acceptance-tests

@github-actions
Copy link

@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@pgavlin
Copy link
Member Author

pgavlin commented Oct 13, 2020

/run-acceptance-tests

@github-actions
Copy link

# Conflicts:
#	provider/go.mod
#	provider/go.sum
@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@lblackstone
Copy link
Member

/run-acceptance-tests

@github-actions
Copy link

@pgavlin pgavlin merged commit bab791c into master Oct 15, 2020
@pulumi-bot pulumi-bot deleted the pgavlin/providerPreview branch October 15, 2020 04:36
lblackstone added a commit that referenced this pull request Nov 9, 2020
This change fixes a panic introduced in #1355. The panic
occurred in cases where the provider attempted to set the
last applied config annotation with computed values.
lblackstone added a commit that referenced this pull request Nov 10, 2020
This change fixes a panic introduced in #1355. The panic
occurred in cases where the provider attempted to set the
last applied config annotation with computed values.
lblackstone added a commit that referenced this pull request Nov 10, 2020
This change fixes a panic introduced in #1355. The panic
occurred in cases where the provider attempted to set the
last applied config annotation with computed values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants