-
Notifications
You must be signed in to change notification settings - Fork 17
Add list handler schema metadata from CFN #2670
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
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2670 +/- ##
==========================================
+ Coverage 52.10% 52.21% +0.11%
==========================================
Files 49 49
Lines 5940 6019 +79
==========================================
+ Hits 3095 3143 +48
- Misses 2590 2612 +22
- Partials 255 264 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR adds support for emitting CloudFormation list handler schemas into resource metadata for downstream consumption by projects like pulumi-tool-cdk-importer. The implementation captures minimal schema information (properties with description/type, and required fields) and intelligently resolves $ref entries to backfill missing data from the base resource schema.
Key Changes:
- Extended
CloudAPIResourcemetadata withListHandlerSchemafield containing properties and required fields for list handlers - Implemented
gatherListHandlerSchema()to extract list handler schemas from CloudFormation extras, with $ref resolution fallback - Added comprehensive unit tests covering direct extraction, $ref fallback, and missing schema scenarios
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| provider/pkg/metadata/metadata.go | Added ListHandlerSchema and ListHandlerProperty structs to capture list handler metadata |
| provider/pkg/schema/gen.go | Implemented list handler schema gathering with $ref resolution and helper functions for parsing |
| provider/pkg/schema/gen_list_handler_schema_test.go | Added unit tests for schema extraction, $ref fallback, and edge cases |
| provider/cmd/pulumi-resource-aws-native/metadata.json | Generated metadata with list handler schemas for numerous AWS resources |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e64d3dc to
65e31ab
Compare
them.
Implementation details