-
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(ec2): Implement UserData methods in MultipartUserData #14347
feat(ec2): Implement UserData methods in MultipartUserData #14347
Conversation
* as a shell script. The UserData added by this method will also be the target | ||
* of calls to the `add*Command` methods on this MultipartUserData object. | ||
*/ | ||
public addUserDataPartForCommands(userData: UserData) { |
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 I would prefer the first invocation of adduserDataPart()
to trigger this behavior, optionally gated by a makeDefault?: boolean
parameter (which defaults to true
if no default has been set yet and defaults to false
if a default has already been set).
This additional method also feels awkward.
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 like it. I'll get a rev up with the change.
@@ -436,13 +436,15 @@ export interface MultipartUserDataOptions { | |||
* | |||
*/ | |||
export class MultipartUserData extends UserData { | |||
private static readonly USE_PART_ERROR = 'MultipartUserData does not support this operation. Please add part using addPart.'; | |||
private static readonly USE_PART_ERROR = 'MultipartUserData does not support this operation. Please use addUserDataPartForCommands().'; |
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 error message could be more helpful about the behavior. How about:
MultipartUserData only supports this operation if it has a default UserData. Call addUserDataPart with makeDefault=true
a59bce7
to
1f153ec
Compare
Just fyi, @rix0rrr , the changes have been made & this is ready for you to take another pass at it. |
@rix0rrr Just a reminder poke that this is waiting on you. |
Thank you for contributing! Your pull request will be updated from master 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 master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Implements: aws#14346 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Implements: #14346
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license