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

all: Add automatic deferred action support for unknown provider configuration #1002

Merged
merged 51 commits into from
May 30, 2024
Merged
Changes from 1 commit
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 May 1, 2024
0a27076
Implement manual deferred action support for `resource.readResource`
SBGoods May 3, 2024
bbf6c8d
Implement manual deferred action support for `resource.modifyPlan`
SBGoods May 7, 2024
29cfc74
Rename `DeferralReason` and `DeferralResponse` to `DeferredReason` an…
SBGoods May 7, 2024
67ff590
Update `terraform-plugin-go` dependency to `v0.23.0`
SBGoods May 7, 2024
4a11408
Rename `deferral.go` to `deferred.go`
SBGoods May 7, 2024
ce1d14b
Implement manual deferred action support for data sources
SBGoods May 7, 2024
39c4bb5
Update documentation and diagnostic messages
SBGoods May 7, 2024
e6a3700
Merge branch 'main' into SBGoods/deferred-action-support
SBGoods May 7, 2024
3a5a8c3
Add copyright headers
SBGoods May 7, 2024
04042c2
Add changelog entries
SBGoods May 8, 2024
ea64005
Apply suggestions from code review
SBGoods May 10, 2024
ac952fc
Add comment and changelog notes to indicate experimental nature of de…
SBGoods May 10, 2024
bcadaee
Rename constant to be specific to data sources
SBGoods May 13, 2024
3777d5d
Remove TODO comment
SBGoods May 13, 2024
0c48915
Remove unnecessary nil check
SBGoods May 13, 2024
95ef72e
Add default values for `ClientCapabilities` request fields
SBGoods May 13, 2024
c5156c5
Rename `DeferredResponse` to `Deferred`
SBGoods May 13, 2024
96166fb
Remove error handling for deferral response without deferral capability
SBGoods May 13, 2024
0a6b8a5
Remove variable indirection in tests
SBGoods May 13, 2024
f1112d5
Add copyright headers
SBGoods May 13, 2024
2433dca
Apply suggestions from code review
SBGoods May 14, 2024
50aaca9
Add unit tests for client capabilities
SBGoods May 14, 2024
f5d659d
Merge branch 'main' into SBGoods/deferred-action-support
SBGoods May 14, 2024
a705a12
Implement deferred action support for `provider.configureProvider`
SBGoods May 14, 2024
5ab0c24
Move client capabilities defaulting behavior to `fromproto5/6` package
SBGoods May 14, 2024
038d486
Move `toproto5/6` `Deferred` conversion handling to its own files
SBGoods May 14, 2024
8f0b6aa
Use `ResourceDeferred()` and `DataSourceDeferred()` functions in `top…
SBGoods May 15, 2024
720016f
Merge branch 'refs/heads/SBGoods/deferred-action-support' into SBGood…
SBGoods May 15, 2024
b92fc38
move configure provider client capabilities unset test to `fromproto5/6`
SBGoods May 15, 2024
c89dcdc
Add throw an error diagnostic in server_configureprovider.go if a def…
SBGoods May 15, 2024
188522e
Add `ResourceBehavior` field to `MetadataResponse`
SBGoods May 16, 2024
693e708
Initial implementation of automatic deferrals for resource/datasource…
SBGoods May 16, 2024
b29ca83
Merge branch 'refs/heads/main' into SBGoods/automatic-deferred-action…
SBGoods May 16, 2024
a5089d6
Implement provider automatic deferral for `PlanResourceChange` RPC
SBGoods May 17, 2024
9fd5971
Add default values for automatic deferrals
SBGoods May 20, 2024
a1e8983
Update resource/metadata.go
SBGoods May 20, 2024
299ac68
Add experimental note
SBGoods May 20, 2024
bc60806
Merge remote-tracking branch 'origin/SBGoods/automatic-deferred-actio…
SBGoods May 20, 2024
4669aaa
Implement resource behavior in `proto6server`
SBGoods May 20, 2024
fe78dbb
Add changelog entries
SBGoods May 20, 2024
1cb1aa4
Merge branch 'main' into SBGoods/automatic-deferred-action-support
SBGoods May 20, 2024
277ce82
Apply suggestions from code review
SBGoods May 21, 2024
8593412
Log deferred reason in debug logging
SBGoods May 21, 2024
904a87f
Add error diagnostics to automatic deferral tests
SBGoods May 21, 2024
31f33f8
Refactor `PlanResourceChange` automatic deferred action implementatio…
SBGoods May 23, 2024
a05621a
Add a comment calling out intentional design of replacing configured …
SBGoods May 23, 2024
a3dbd79
Return early in `PlanResourceChange` if `ProviderDeferredBehavior.Ena…
SBGoods May 29, 2024
b3f4d24
Update internal/fwserver/server_configureprovider.go
SBGoods May 30, 2024
a7d7292
Add separate unit test for overriding provider deferred reason with r…
SBGoods May 30, 2024
7a578b1
Merge branch 'main' into SBGoods/automatic-deferred-action-support
SBGoods May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename constant to be specific to data sources
  • Loading branch information
SBGoods committed May 13, 2024
commit bcadaeeb9f5da5062116ebcb1ad44682830b7e0a
6 changes: 3 additions & 3 deletions datasource/deferred.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const (
// Provider developers should not use it.
DeferredReasonUnknown DeferredReason = 0

// DeferredReasonResourceConfigUnknown is used to indicate that the resource configuration
// DeferredReasonDataSourceConfigUnknown is used to indicate that the resource configuration
// is partially unknown and the real values need to be known before the change can be planned.
DeferredReasonResourceConfigUnknown DeferredReason = 1
DeferredReasonDataSourceConfigUnknown DeferredReason = 1

// DeferredReasonProviderConfigUnknown is used to indicate that the provider configuration
// is partially unknown and the real values need to be known before the change can be planned.
Expand Down Expand Up @@ -40,7 +40,7 @@ func (d DeferredReason) String() string {
case 0:
return "Unknown"
case 1:
return "Resource Config Unknown"
return "Data Source Config Unknown"
case 2:
return "Provider Config Unknown"
case 3:
Expand Down