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

Add workaround for inconsistent resource type schema #96

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

sk593
Copy link
Contributor

@sk593 sk593 commented Dec 2, 2024

This adds a workaround to address issues in #93. There are discrepancies between the references to definitions and the actual definitions provided by the AWS resource type schema. This PR skips any files with discrepancies and uses a stable version of the schema.

An issue has been opened with the AWS SDK to investigate the discrepancy: aws/aws-sdk-go-v2#2913

@@ -17,6 +17,13 @@ import (
"github.com/spf13/cobra"
)

var skippedResources = map[string]struct{}{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We skip these files that have inconsistencies in their schema and will use older versions until we have a better fix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible for us to dynamically detect these cases? or is that not reasonable? I'm just thinking about how we move forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be complicated but possible. Errors are only detected in the generator code with the setup we have now so we'd have to add additional processing in the downloader or generator. I'm not sure how helpful that would be since the resource schemas should ideally be returned will valid references.

The plan is to revert these changes once we get a response from the SDK team as to why the resource schemas are being returned with missing data. We should have better insight on what to do moving forward then

willdavsmith
willdavsmith previously approved these changes Dec 5, 2024
@@ -17,6 +17,13 @@ import (
"github.com/spf13/cobra"
)

var skippedResources = map[string]struct{}{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we link the issue that caused us to disable these?

Signed-off-by: sk593 <[email protected]>
@sk593 sk593 merged commit 1881d6f into main Dec 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants