-
Notifications
You must be signed in to change notification settings - Fork 42
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(deadline): create Deadline Groups and Pools on deploy for ConfigureSpotEventPlugin #470
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.
Overall nice work! Just added some suggestions to reorganize the code a bit.
packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/handler.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
c5825c2
to
ca583b1
Compare
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
ca583b1
to
5e0274d
Compare
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
a2a92f7
to
9983426
Compare
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.
Just a couple of tiny nitpicks, otherwise looks good
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
9983426
to
e83b1ca
Compare
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.
Great work. I think it might help to make the new SpotEventPluginClient
APIs a little more intuitive.
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/handler.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/types.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/types.ts
Outdated
Show resolved
Hide resolved
...ages/aws-rfdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/spot-event-plugin-client.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Show resolved
Hide resolved
e83b1ca
to
96bdd39
Compare
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 API looks much better now. The only thing missing is more test coverage to ensure the new APIs behave as expected.
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
96bdd39
to
d3911dd
Compare
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/handler.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
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.
Functionally and code quality-wise this looks ready to me. I just remembered that we will need to update some related places in our documentation:
aws-rfdk/packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
Lines 320 to 321 in 11e30f6
* - Create the Deadline Group associated with the Spot Fleet Request Configuration. See [Deadline Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/pools-and-groups.html). * - Create the Deadline Pools to which the fleet Workers are added. See [Deadline Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/pools-and-groups.html). - https://github.com/aws/aws-rfdk/blob/mainline/packages/aws-rfdk/lib/deadline/README.md#configure-spot-event-plugin
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.
Found a few more places that mention creating the groups/pools manually:
* Note that you will have to create the groups manually using Deadline before submitting jobs. * See https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/pools-and-groups.html aws-rfdk/packages/aws-rfdk/lib/deadline/lib/spot-event-plugin-fleet.ts
Lines 104 to 105 in 11e30f6
* Note that you will have to create the pools manually using Deadline before submitting jobs. * See https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/pools-and-groups.html
4015976
to
c8225b5
Compare
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 the great feature enhancement, @kozlove-aws. This looks ready to me!
...fdk/lib/lambdas/nodejs/lib/configure-spot-event-plugin/test/spot-event-plugin-client.test.ts
Outdated
Show resolved
Hide resolved
c8225b5
to
bd4d31e
Compare
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, thanks!
Problem
After creating and configuring a spot fleet via RFDK constructs
SpotEventPluginFleet
&ConfigureSpotEventPlugin
, there is a requirement for manually creating deadline groups and pools before the spot fleet request can be created.Solution
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license