-
Notifications
You must be signed in to change notification settings - Fork 149
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 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com>
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 <kurodanaoki0711pana@gmail.com>
Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com>
@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 <kurodanaoki0711pana@gmail.com>
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 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com>
* add ephemeralStorage option to lambda config (#4680) * add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * Add v2 to versionWhitelist (#4682) Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com> * [ECS] Tag to the new taskset in rollback (fixes #4692) (#4695) * Tag to new taskset in rollback Signed-off-by: t-kikuc <tkikuchi07f@gmail.com> * Fix #4692 (ECS excess tasksets) Signed-off-by: t-kikuc <tkikuchi07f@gmail.com> --------- Signed-off-by: t-kikuc <tkikuchi07f@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com> Signed-off-by: t-kikuc <tkikuchi07f@gmail.com> Co-authored-by: naoki kuroda <68233204+nnnkkk7@users.noreply.github.com> Co-authored-by: Yoshiki Fujikane <40124947+ffjlabo@users.noreply.github.com> Co-authored-by: Tetsuya Kikuchi <97105818+t-kikuc@users.noreply.github.com>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: sZma5a <masaaki.haribote@gmail.com>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: sZma5a <masaaki.haribote@gmail.com>
* add ephemeralStorage option to lambda config Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add nil pointer check Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * add EphemeralStorage input to CreateFunctionFromSource Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> * fix condition Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> --------- Signed-off-by: nnnkkk7 <kurodanaoki0711pana@gmail.com> Signed-off-by: 鈴木 優耀 <suzuki_masaaki@cyberagent.co.jp>
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