-
Notifications
You must be signed in to change notification settings - Fork 4k
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(stepfunctions-tasks): EMR createCluster command support OnDemandSpecification #27791
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.
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.
This PR adds the integ tests for On-Demand only. There is no integ test for Spot, but I added it in another PR. |
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.
Thanks!
The implementation looks correct.
Some adjustments are needed on the interface declaration in my opinion.
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancefleetconfig-ondemandprovisioningspecification.html | ||
* | ||
*/ | ||
export interface OnDemandProvisioningSpecificationProperty { |
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.
This interface declaration is missing the CapacityReservationOptions
attribute.
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 originally added it because it was in the API reference, but the CloudFormation document apparently does not support it, so I deleted it.
c0caee8#diff-f0a4ce25fba5b6013a9e99af978fe476abb485cdd149be1d30f20d7bd4f70591
Is this necessary?
In my opinion, it should follow CloudFormation, so I didn't think it was necessary to add it.
JSON
{
"AllocationStrategy" : String
}
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.
You're right, CFN is the right reference in this case.
Thanks for clarifying.
* Currently, the only option is lowest-price (the default), which launches the lowest price first. | ||
* | ||
* @default - lowest-price | ||
*/ | ||
readonly allocationStrategy?: OnDemandAllocationStrategy; |
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.
* Currently, the only option is lowest-price (the default), which launches the lowest price first. | |
* | |
* @default - lowest-price | |
*/ | |
readonly allocationStrategy?: OnDemandAllocationStrategy; | |
* Currently, the only option is lowest-price (the default), which launches the lowest price first. | |
*/ | |
readonly allocationStrategy: OnDemandAllocationStrategy; |
The property is required.
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.
Oh, I had been changed it to be possible for undefined because a default value is defined, but it is required according to CFn docs. So I will add!
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 added them.
/** | ||
* The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior. | ||
* | ||
* @default - no spotSpecification |
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.
* @default - no spotSpecification | |
* @default - no spot specification |
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.
* The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. | ||
* On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later. | ||
* | ||
* @default - no onDemandSpecification |
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.
* @default - no onDemandSpecification | |
* @default - no on-demand specification |
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.
...t/aws-stepfunctions-tasks/test/emr/integ.emr-create-cluster-with-on-demand-instance-fleet.ts
Show resolved
Hide resolved
Thanks again! Please review the following things and changed codes! |
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.
Thanks 👍
This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
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.
@go-to-k thanks for starting this! looks good, just a few minor stylistic comments!
* | ||
* @param property |
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.
* | |
* @param property |
* | ||
* @param property | ||
*/ | ||
function OnDemandProvisioningSpecificationPropertyToJson(property: EmrCreateCluster.OnDemandProvisioningSpecificationProperty | undefined) { |
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.
function OnDemandProvisioningSpecificationPropertyToJson(property: EmrCreateCluster.OnDemandProvisioningSpecificationProperty | undefined) { | |
function OnDemandProvisioningSpecificationPropertyToJson(property?: EmrCreateCluster.OnDemandProvisioningSpecificationProperty) { |
* | ||
* @param property |
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.
* | |
* @param property |
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 you want to leave an @param
docstring, you have to describe the property like
@param property the spot provisioning specification
(But we don't need to do that here, I dont think)
allocationStrategy: EmrCreateCluster.OnDemandAllocationStrategy.LOWEST_PRICE, | ||
}, | ||
}, | ||
name: 'Master', |
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.
name: 'Master', | |
name: 'Main', |
(we're avoiding the term master now)
Pull request has been modified.
Thanks for the review! I fixed, so could you please take a look at them? |
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.
Thanks for changing the other instances of master to main as well. Appreciate it!
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). |
This PR supports OnDemandSpecification in instance fleets for EMR createCluster.
Closes #27761.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license