-
Notifications
You must be signed in to change notification settings - Fork 110
Optimize query timing for the table aws_ecr_image_scan_finding #2492
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
base: main
Are you sure you want to change the base?
Optimize query timing for the table aws_ecr_image_scan_finding #2492
Conversation
Table docs need to be updated based on feedback. |
Closing this PR since the complex query sill failes with |
…timize-query-timing-for-ecr-image-scanning-finding
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 optimizes query timing for the aws_ecr_image_scan_finding table by updating how qualifiers are handled and removing the dependency on the parent hydrate function.
- Changed key column qualifiers from plugin.Optional to plugin.AnyOf for image_tag and image_digest.
- Removed the RepositoryImage parent hydrate function and corresponding type.
- Updated listAwsEcrImageScanFindings to extract repository details directly from query qualifiers.
imageInfo := &types.ImageIdentifier{ | ||
ImageTag: repositoryTag.ImageTag, | ||
ImageTag: aws.String(imageTag.GetStringValue()), |
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.
If only 'image_digest' is provided and 'image_tag' is nil, calling GetStringValue() on a nil imageTag will cause a runtime panic. Consider adding a nil check or using the 'image_digest' value as a fallback.
Copilot uses AI. Check for mistakes.
Integration test logs
Logs
Example query results
Results