feat(aws): Use PreResourceResolver to resolve list/describe resources#2461
Conversation
878494e to
ade8001
Compare
|
@disq Looks like docs need to be regenerated here (the AWS workflow failed) |
ade8001 to
49a3ecd
Compare
49a3ecd to
a649bb6
Compare
| SubService: "plans", | ||
| Struct: &backup.GetBackupPlanOutput{}, | ||
| SkipFields: []string{"BackupPlanArn"}, | ||
| PreResourceResolver: "getPlan", |
There was a problem hiding this comment.
Shouldn't the PreResourceResolver be a plural, because it is getting a list of items?
There was a problem hiding this comment.
Pre is actually not a good name, because it's the last call before we "realize" a resource with its fields, after the actual resolver is called (to potentially get the list of items). The "singularization" of the list of items is done by the SDK, and we get a single handle from the SDK, look it up in the PreResourceResolver handler and do a resource.Item assignment (or resource.SetItem(), which is never used for some reason)
So it's actually a "ResourceAssignHook". We get the previously assigned data from resource.Item, do a bunch of things with it and look up the real/detailed data and set it to the same member.
🤖 I have created a release *beep* *boop* --- ## [2.1.0](plugins-source-aws-v2.0.1...plugins-source-aws-v2.1.0) (2022-10-09) ### Features * **aws:** Use PreResourceResolver to resolve list/describe resources ([#2461](#2461)) ([f31ece8](f31ece8)) ### Bug Fixes * **deps:** Update plugin-sdk for aws to v0.12.10 ([#2544](#2544)) ([4e4fdb6](4e4fdb6)) * **deps:** Update plugin-sdk for aws to v0.12.8 ([#2495](#2495)) ([ddb163e](ddb163e)) * **deps:** Update plugin-sdk for aws to v0.12.9 ([#2509](#2509)) ([cda0307](cda0307)) * Update endpoints ([#2490](#2490)) ([624e7a8](624e7a8)) * Update endpoints ([#2529](#2529)) ([f170e50](f170e50)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Shouldn't change performance as we don't have the proposed "PreResourceResolver parallelism" in the plugin-sdk yet.