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

sqs: queue initialization with props validation does not display all validation issues #33098

Closed
1 task
iankhou opened this issue Jan 23, 2025 · 1 comment · Fixed by #33070
Closed
1 task
Assignees
Labels
@aws-cdk/aws-sqs Related to Amazon Simple Queue Service bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@iankhou
Copy link
Contributor

iankhou commented Jan 23, 2025

Describe the bug

Validation currently fails fast on Queue initialization, as the first invalid rule throws an error. Users attempting to initialize Queues may need to rerun more than once to detect and fix all validation errors.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

All validation errors should be displayed to the user on Queue initialization.

Current Behavior

Validation currently fails fast on Queue initialization, as the first invalid rule throws an error.

Reproduction Steps

Initialize a Queue with multiple

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.175.1 (build afe6e87)

Framework Version

No response

Node.js Version

v18.20.4

OS

15.2 (24C101)

Language

TypeScript

Language Version

No response

Other information

No response

@iankhou iankhou added bug This issue is a bug. p2 labels Jan 23, 2025
@iankhou iankhou self-assigned this Jan 23, 2025
@khushail khushail added @aws-cdk/aws-sqs Related to Amazon Simple Queue Service effort/small Small work item – less than a day of effort labels Jan 23, 2025
@mergify mergify bot closed this as completed in #33070 Jan 23, 2025
mergify bot pushed a commit that referenced this issue Jan 23, 2025
### Issue #33098

Closes #33098.

### Reason for this change

When initializing a new SQS Queue, props validation throws an error at the first validation issue encountered. If there are multiple validation issues, the user is only informed of the first one.

### Description of changes
Using `validateAllProps` presents all validation errors to the user at once. If `redriveAllowPolicy` is enabled, the policy will also be evaluated in the same way.

### Describe any new or updated permissions being added

No permissions changes.

### Description of how you validated changes

Adjusted and added unit tests. Ran integration tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-sqs Related to Amazon Simple Queue Service bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants