-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(gamelift): support Build serverSdkVersion, updated OperatingSystem values #27857
Conversation
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.
Looks great! A minor nit on the error message, and then it should be good to go. Edited the error message.
One concern. Should serverSdkVersion
be a public attribute on the Build
and Import
classes? It looks like the rest of the parameters are.
Pull request has been modified.
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.
Looks good to me. I had to comment on a couple of points.
@@ -276,4 +313,13 @@ export class Build extends BuildBase { | |||
}); | |||
} | |||
|
|||
private validateServerSdkVersion(serverSdkVersion?: string) { | |||
if (!serverSdkVersion) return; |
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.
It will be passed if a string is empty, so I would prefer an undefined check. And I think it should take the case that the param is Token by CfnParameter, etc., what do you think?
if (!serverSdkVersion) return; | |
if (serverSdkVersion === undefined || Token.isUnresolved(serverSdkVersion)) return; |
throw new Error(`serverSdkVersion must be in the 0.0.0 format, got ${serverSdkVersion}.`); | ||
} | ||
if (serverSdkVersion.length > 128) { | ||
throw new Error(`serverSdkVersion length must be smaller than or equal to 128, got ${serverSdkVersion}.`); |
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.
I think it would be better to output the length of a character in the error message. I have seen other cases like this.
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts#L341
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-events-targets/lib/batch.ts#L118
https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-glue-alpha/lib/database.ts#L136
throw new Error(`serverSdkVersion length must be smaller than or equal to 128, got ${serverSdkVersion}.`); | |
throw new Error(`serverSdkVersion length must be smaller than or equal to 128, got ${serverSdkVersion.length}.`); |
Oh, sorry, @scanlonp already reviewed. |
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.
@lpizzinidev Thanks! I approved.
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). |
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). |
…em values (#27857) Some adjustments to `Build` properties: * Adds support for [`serverSdkVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-serversdkversion) attribute * Updates list of available [`operatingSystem`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-operatingsystem) and deprecates Windows Server 2012 Closes #27655. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Some adjustments to
Build
properties:serverSdkVersion
attributeoperatingSystem
and deprecates Windows Server 2012Closes #27655.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license