feat(ivs-alpha): support advanced channel type#30086
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
nmussy
left a comment
There was a problem hiding this comment.
Mostly documentation nits, LGTM otherwise 👍
| @@ -69,6 +70,42 @@ export enum ChannelType { | |||
| * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html | |||
There was a problem hiding this comment.
These @see tags should be moved to the enum TSDoc, no need to repeat them if they're pointing to the same link
There was a problem hiding this comment.
@nmussy
Thank you for your review!
I moved @see to the enum TSDoc.
| export enum Preset { | ||
| /** | ||
| * Use a lower bitrate than STANDARD for each quality level. Use it if you have low download bandwidth and/or simple video content (e.g., talking heads). | ||
| * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html |
There was a problem hiding this comment.
Again, @see should be moved to the Preset TSDoc
There was a problem hiding this comment.
Likewise, I moved to the enum docs.
| new IntegTest(app, 'ivs-test', { | ||
| testCases: [stack], | ||
| }); |
There was a problem hiding this comment.
You can run some assertions to make sure that the configurations are created properly, see integ-tests. Let me know if you need help setting them up
There was a problem hiding this comment.
@nmussy
I added assertions to the integ tests.
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
| latencyMode: props.latencyMode, | ||
| name: this.physicalName, | ||
| type: props.type, | ||
| preset: props.preset, |
There was a problem hiding this comment.
Taking into account the revisions after the review, I changed it to set props.preset directly.
This is because if ChannelType is ADVANCED_SD or ADVANCED_HD, even if preset becomes undefined, Cfn will set the default value.
There was a problem hiding this comment.
Once again, you can use the shorthand:
| preset: props.preset, | |
| preset, |
There was a problem hiding this comment.
Thank you.
I had a misunderstanding about the shorthand.
There was a problem hiding this comment.
Uh no, I'm the one who made the mistake here, it doesn't work sorry 😅
nmussy
left a comment
There was a problem hiding this comment.
Just a few more nits, looks good otherwise 👍
| latencyMode: props.latencyMode, | ||
| name: this.physicalName, | ||
| type: props.type, | ||
| preset: props.preset, |
There was a problem hiding this comment.
Once again, you can use the shorthand:
| preset: props.preset, | |
| preset, |
| }) | ||
| .expect(integ.ExpectedResult.objectLike({ | ||
| channel: { | ||
| preset: 'HIGHER_BANDWIDTH_DELIVERY', |
There was a problem hiding this comment.
This is great, we're testing the Cfn default value here 👍
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
60e2606 to
275b495
Compare
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
### Issue # (if applicable) Closes aws#30075 ### Reason for this change As described in the issue. ### Description of changes * Add `ADVANCED_HD` and `ADVANCED_SD` to the `ivs.ChannelType`. * Add `preset` property to the Channel Construct. Additionally, validation has been implemented to allow setting the preset property only when using the Advanced channel type ### Description of how you validated changes Add both unit tests and integ 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*
|
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. |
Issue # (if applicable)
Closes #30075
Reason for this change
As described in the issue.
Description of changes
ADVANCED_HDandADVANCED_SDto theivs.ChannelType.presetproperty to the Channel Construct. Additionally, validation has been implemented to allow setting the preset property only when using the Advanced channel typeDescription of how you validated changes
Add both unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license