-
Notifications
You must be signed in to change notification settings - Fork 653
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
Missing resource type schema definitions when using NewListTypesPaginator
and DescribeType
#2913
Comments
Hi @sk593 , Thanks for reaching out. I think your reproduction example is a bit broad. If I understand the issue correctly, when running a "$ref": "#/definitions/VisualInteractionOptions" However, the schema actually never defines this, only references it. My experience with CFN is limited, but if my understanding of the problem is accurate, then the issue is with the CFN API itself, and not related to the SDK. I have created an internal ticket with the API team (ticket ID All the best, |
Yes, your understanding of the problem is correct. Thanks for submitting the internal ticket. There are additional resources that have this issue too so I'm assuming I'll need to submit support ticket for those resources too. If I don't have access to AWS support, what's the best way to get in touch with the API teams to update the schema? |
@RanVaknin - do you think https://github.com/aws-cloudformation/cloudformation-coverage-roadmap would be a better place for us to report this? |
Hi @sk593, Without AWS support you won't be able to interface with the service team unless they have some open source presence. I'm not familiar with the repo you linked, but it seems like its owned by the CFN team, so it might be a step in the right direction to raise visibility to this issue. Thanks, |
Hi @RanVaknin, I'll go ahead and open an issue on the CFN repo linked. If you'd be able to submit internal tickets for the following resources, that would be amazing!
|
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
I have code that uses the AWS SDK to download AWS resource type schemas into a JSON format. Specifically, these APIs are used:
aws-sdk-go-v2/service/cloudformation/api_op_ListTypes.go
Line 246 in 8939ed0
aws-sdk-go-v2/service/cloudformation/api_op_DescribeType.go
Line 20 in 8939ed0
The JSON format is described using a
TypeRecord
where the AWS resource type schema is added as theschema
field of theTypeRecord
.TypeRecord
definition: https://github.com/sk593/bicep-types-aws/blob/9e2142a12a3baec67a666099cc5021f2ee9c9449/src/aws-type-downloader/main.go#L170Relevant code: https://github.com/sk593/bicep-types-aws/blob/9e2142a12a3baec67a666099cc5021f2ee9c9449/src/aws-type-downloader/main.go#L132
When the AWS resource type schema gets parsed into JSON format using these APIs, there are some definitions that are missing. For example with AWS Quicksight Analysis, I would expect there to be a definition for
VisualInteractionOptions
but that field is missing in the definitions: https://github.com/sk593/bicep-types-aws/blob/update-aws-types/artifacts/types/AWS%3A%3AQuickSight%3A%3AAnalysis.jsonThere are a few more resource types where this is the case but I'll reference Quicksight Analysis for this issue
Regression Issue
Expected Behavior
I would expect all definitions to be present in the schema coming from
DescribeType
.Current Behavior
Please see this file for an example of the missing definitions: https://github.com/sk593/bicep-types-aws/blob/update-aws-types/artifacts/types/AWS%3A%3AQuickSight%3A%3AAnalysis.json
VisualInteractionOptions
should have a definition but that seems to be missing. There should be a 1 to 1 mapping between theSchema
field returned byDescribeType
and theschema
field ofTypeRecord
. It seems like the definitions are missing in the returnedSchema
field ofDescribeType
and therefore also missing from theschema
field ofTypeRecord
Reproduction Steps
This a repro of the repository that I'm working with: https://github.com/sk593/bicep-types-aws/tree/update-aws-types
Instructions for running this code can be found here (step 3 specifically): https://github.com/sk593/bicep-types-aws/tree/update-aws-types/docs/contributing/contributing-code/contributing-code-building
This does take a while to run so you can also look at Quicksight::Analysis as an isolated case by updating the for loop on line 88 of
src/aws-type-downloader/main.go
to the following code. This will download the AWS::Quicksight::Analysis resource type in the expected JSON format and also print the Schema response from DescribeType into a separate file (both will have the missing fields). Rungo run main.go --output ../../artifacts/types
in thesrc/aws-type-downloader
folder.Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
require (
github.com/aws/aws-sdk-go-v2 v1.32.5
github.com/aws/aws-sdk-go-v2/config v1.28.5
github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.23.1
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.56.0
github.com/spf13/cobra v1.8.1
)
require (
github.com/aws/aws-sdk-go-v2/credentials v1.17.46 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
Compiler and Version used
go version go1.23.3 darwin/arm64
Operating System and version
macOS/darwin
The text was updated successfully, but these errors were encountered: