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

MediaConvert validation regression on __stringPatternS3 #1887

Closed
0xpablo opened this issue Oct 16, 2022 · 3 comments
Closed

MediaConvert validation regression on __stringPatternS3 #1887

0xpablo opened this issue Oct 16, 2022 · 3 comments
Labels
guidance Question that needs advice or information.

Comments

@0xpablo
Copy link

0xpablo commented Oct 16, 2022

Describe the bug

MediaConvert_Shapes has introduced a regression when validating S3 destinations.
The __stringPatternS3 validation pattern looks like this: ^s3:\/\/$ when it would previously look like this: ^s3:\/\/.

This means that only destinations that match "s3://" work, which is unexpected as destinations like this one "s3://bucket/folder/file" should be allowed.

Here's the line with the __stringPatternS3 pattern:
https://vscode.dev/github.com/aws/aws-sdk-go-v2/blob/3e94e4194d12a3ecd967552f9824ad4b0c462488/codegen/sdk-codegen/aws-models/mediaconvert.json#L24622

Expected Behavior

The __stringPatternS3 should be ^s3:\\/\\/ instead of ^s3:\\/\\/$ to allow destinations like "s3://bucket/folder/file".

Current Behavior

The validation does not allow any other destination than s3:// which is unexpected.

Reproduction Steps

N/A

Possible Solution

No response

Additional Information/Context

The official JS SDK seems to have the right pattern: https://github.com/aws/aws-sdk-js/blob/bfb3aaf792c8e50962004a72f090f4fb067d2c27/apis/mediaconvert-2017-08-29.normal.json#L13314

This is affecting Swift's Soto SDK. I opened the original issue here: soto-project/soto#624

AWS Go SDK V2 Module Versions Used

N/A

Compiler and Version used

v1.44.116

Operating System and version

N/A

@0xpablo 0xpablo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 16, 2022
@skmcgrail
Copy link
Member

The Go SDK does not have client side validation of input values using regular expressions from the model. If you have encountered a specific SDK that is performing such validation please open a ticket with that respective repository.

@skmcgrail skmcgrail removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 18, 2022
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@skmcgrail skmcgrail added the guidance Question that needs advice or information. label Oct 18, 2022
@adam-fowler
Copy link

@skmcgrail I guess the issue here isn't the SDKs though. The problem is with the Smithy AST model which includes the wrong validation pattern. Understandably there is no way to pass these issues on to the service teams, outside of AWS, so the only way to do it is via one of the open source SDKs.

Out of interest do any of the official SDKs do client side validation? I found issue #1 on the aws-sdk-go repo is add client side validation 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants