-
Notifications
You must be signed in to change notification settings - Fork 23
fix: Update support for Layers
#136
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
if resp.Code != nil { | ||
// We need to keep the desired .Code s3Bucket s3Key and s3ObjectVersion | ||
// part of the function's spec. So instead of setting Spec.Code to nil | ||
// we only set ImageURI | ||
// | ||
// When adopting a Function resource, Spec.Code field should be manually | ||
// initialised before injecting ImageURI. | ||
if ko.Spec.Code == nil { | ||
ko.Spec.Code = &svcapitypes.FunctionCode{} | ||
} | ||
|
@@ -13,7 +7,8 @@ | |
} | ||
} | ||
if resp.Configuration.Layers != nil { | ||
f16 := []*svcapitypes.Layer{} | ||
f17 := []*svcapitypes.Layer{} | ||
layer := []*string{} | ||
for _, f16iter := range resp.Configuration.Layers { | ||
f16elem := &svcapitypes.Layer{} | ||
if f16iter.Arn != nil { | ||
|
@@ -29,7 +24,9 @@ | |
f16elem.SigningProfileVersionARN = f16iter.SigningProfileVersionArn | ||
} | ||
f16 = append(f16, f16elem) | ||
layer = append(layer, f16iter.Arn) | ||
} | ||
ko.Spec.Layers = layer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have some smoke tests around layers updates? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
ko.Status.LayerStatuses = f16 | ||
} else { | ||
ko.Status.LayerStatuses = 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.
Thanks @Vandita2020 ! How are environement/ephemeralStorage/FileSystemConfigs/Timeouts affecting to layers?
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.
Hey, I have just rearranged them according to the order in the API. Please ignore them, no changes for them.