-
Notifications
You must be signed in to change notification settings - Fork 94
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
all: Add automatic deferred action support for unknown provider configuration #1002
Merged
Merged
Changes from 45 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
df3f0cf
Implement manual deferred action support for `resource.importResource…
SBGoods 0a27076
Implement manual deferred action support for `resource.readResource`
SBGoods bbf6c8d
Implement manual deferred action support for `resource.modifyPlan`
SBGoods 29cfc74
Rename `DeferralReason` and `DeferralResponse` to `DeferredReason` an…
SBGoods 67ff590
Update `terraform-plugin-go` dependency to `v0.23.0`
SBGoods 4a11408
Rename `deferral.go` to `deferred.go`
SBGoods ce1d14b
Implement manual deferred action support for data sources
SBGoods 39c4bb5
Update documentation and diagnostic messages
SBGoods e6a3700
Merge branch 'main' into SBGoods/deferred-action-support
SBGoods 3a5a8c3
Add copyright headers
SBGoods 04042c2
Add changelog entries
SBGoods ea64005
Apply suggestions from code review
SBGoods ac952fc
Add comment and changelog notes to indicate experimental nature of de…
SBGoods bcadaee
Rename constant to be specific to data sources
SBGoods 3777d5d
Remove TODO comment
SBGoods 0c48915
Remove unnecessary nil check
SBGoods 95ef72e
Add default values for `ClientCapabilities` request fields
SBGoods c5156c5
Rename `DeferredResponse` to `Deferred`
SBGoods 96166fb
Remove error handling for deferral response without deferral capability
SBGoods 0a6b8a5
Remove variable indirection in tests
SBGoods f1112d5
Add copyright headers
SBGoods 2433dca
Apply suggestions from code review
SBGoods 50aaca9
Add unit tests for client capabilities
SBGoods f5d659d
Merge branch 'main' into SBGoods/deferred-action-support
SBGoods a705a12
Implement deferred action support for `provider.configureProvider`
SBGoods 5ab0c24
Move client capabilities defaulting behavior to `fromproto5/6` package
SBGoods 038d486
Move `toproto5/6` `Deferred` conversion handling to its own files
SBGoods 8f0b6aa
Use `ResourceDeferred()` and `DataSourceDeferred()` functions in `top…
SBGoods 720016f
Merge branch 'refs/heads/SBGoods/deferred-action-support' into SBGood…
SBGoods b92fc38
move configure provider client capabilities unset test to `fromproto5/6`
SBGoods c89dcdc
Add throw an error diagnostic in server_configureprovider.go if a def…
SBGoods 188522e
Add `ResourceBehavior` field to `MetadataResponse`
SBGoods 693e708
Initial implementation of automatic deferrals for resource/datasource…
SBGoods b29ca83
Merge branch 'refs/heads/main' into SBGoods/automatic-deferred-action…
SBGoods a5089d6
Implement provider automatic deferral for `PlanResourceChange` RPC
SBGoods 9fd5971
Add default values for automatic deferrals
SBGoods a1e8983
Update resource/metadata.go
SBGoods 299ac68
Add experimental note
SBGoods bc60806
Merge remote-tracking branch 'origin/SBGoods/automatic-deferred-actio…
SBGoods 4669aaa
Implement resource behavior in `proto6server`
SBGoods fe78dbb
Add changelog entries
SBGoods 1cb1aa4
Merge branch 'main' into SBGoods/automatic-deferred-action-support
SBGoods 277ce82
Apply suggestions from code review
SBGoods 8593412
Log deferred reason in debug logging
SBGoods 904a87f
Add error diagnostics to automatic deferral tests
SBGoods 31f33f8
Refactor `PlanResourceChange` automatic deferred action implementatio…
SBGoods a05621a
Add a comment calling out intentional design of replacing configured …
SBGoods a3dbd79
Return early in `PlanResourceChange` if `ProviderDeferredBehavior.Ena…
SBGoods b3f4d24
Update internal/fwserver/server_configureprovider.go
SBGoods a7d7292
Add separate unit test for overriding provider deferred reason with r…
SBGoods 7a578b1
Merge branch 'main' into SBGoods/automatic-deferred-action-support
SBGoods File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: FEATURES | ||
body: 'provider: Add `Deferred` field to `ConfigureResponse` | ||
which indicates a provider deferred action to the Terraform client' | ||
time: 2024-05-20T18:04:58.852448-04:00 | ||
custom: | ||
Issue: "1002" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: FEATURES | ||
body: 'provider: Add `ClientCapabilities` field to `ConfigureRequest` which specifies | ||
optionally supported protocol features for the Terraform client' | ||
time: 2024-05-20T18:07:35.862641-04:00 | ||
custom: | ||
Issue: "1002" |
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 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 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 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 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 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 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 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 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 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
Oops, something went wrong.
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.
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.
Similar to terraform-plugin-sdk, we should include a changelog note talking about deferral being experimental 👍
https://github.com/hashicorp/terraform-plugin-sdk/releases/tag/v2.34.0 for inspiration
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.
Since we are planning on releasing this with the manual deferred action work, this should be covered by: https://github.com/hashicorp/terraform-plugin-framework/blob/main/.changes/unreleased/NOTES-20240510-143136.yaml