-
Notifications
You must be signed in to change notification settings - Fork 156
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
add ephemeralStorage option to lambda config #4680
add ephemeralStorage option to lambda config #4680
Conversation
Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]>
1784872
to
38791cf
Compare
@@ -278,6 +281,9 @@ func (c *client) updateFunctionConfiguration(ctx context.Context, fm FunctionMan | |||
if fm.Spec.Handler != "" { | |||
configInput.Handler = aws.String(fm.Spec.Handler) | |||
} | |||
if fm.Spec.EphemeralStorage.Size != 0 { |
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 fm.Spec.EphemeralStorage.Size != 0 { | |
if fm.Spec.EphemeralStorage != nil && fm.Spec.EphemeralStorage.Size != 0 { |
avoid nil pointer error due to the omitempty json tag
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.
Thank you! I added it.
add nil pointer check
@nnnkkk7 Thanks for the contribution. For this configuration, should we also add this to |
Signed-off-by: nnnkkk7 <[email protected]>
Signed-off-by: nnnkkk7 <[email protected]>
@khanhtc1202 |
@@ -100,6 +103,11 @@ func (fmp FunctionManifestSpec) validate() error { | |||
return fmt.Errorf("architecture is invalid: %w", err) | |||
} | |||
} | |||
if fmp.EphemeralStorage != nil && fmp.EphemeralStorage.Size != 0 { |
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 condition is wrong 🤔 If the size value is set to 0
the validate function will be bypass.
if fmp.EphemeralStorage != nil && fmp.EphemeralStorage.Size != 0 { | |
if fmp.EphemeralStorage != nil { |
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.
Thank you!
I fixed these conditions! fix condition
Signed-off-by: nnnkkk7 <[email protected]>
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.
LGTM, thank you 🎸
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4680 +/- ##
==========================================
+ Coverage 30.82% 30.84% +0.01%
==========================================
Files 221 221
Lines 25935 25952 +17
==========================================
+ Hits 7995 8004 +9
- Misses 17289 17298 +9
+ Partials 651 650 -1 ☔ View full report in Codecov by Sentry. |
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]>
* add ephemeralStorage option to lambda config (#4680) * add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]> * Add v2 to versionWhitelist (#4682) Signed-off-by: Yoshiki Fujikane <[email protected]> * [ECS] Tag to the new taskset in rollback (fixes #4692) (#4695) * Tag to new taskset in rollback Signed-off-by: t-kikuc <[email protected]> * Fix #4692 (ECS excess tasksets) Signed-off-by: t-kikuc <[email protected]> --------- Signed-off-by: t-kikuc <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: Yoshiki Fujikane <[email protected]> Signed-off-by: t-kikuc <[email protected]> Co-authored-by: naoki kuroda <[email protected]> Co-authored-by: Yoshiki Fujikane <[email protected]> Co-authored-by: Tetsuya Kikuchi <[email protected]>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: sZma5a <[email protected]>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: sZma5a <[email protected]>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: nnnkkk7 <[email protected]> * add nil pointer check Signed-off-by: nnnkkk7 <[email protected]> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <[email protected]> * fix condition Signed-off-by: nnnkkk7 <[email protected]> --------- Signed-off-by: nnnkkk7 <[email protected]> Signed-off-by: 鈴木 優耀 <[email protected]>
What this PR does / why we need it:
I added an ephemeralStorage optional value to the lambda configuration.
Which issue(s) this PR fixes:
Fixes #4679
Does this PR introduce a user-facing change?:
No