Skip to content

Commit 7a0c0d5

Browse files
committed
fix: al2 uploads need to have function name in SHA
1 parent 82b1051 commit 7a0c0d5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed
9.03 MB
Binary file not shown.

go/porcelain/deploy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,7 @@ func createHeader(archive *zip.Writer, i os.FileInfo, runtime string) (io.Writer
979979
return archive.CreateHeader(&zip.FileHeader{
980980
CreatorVersion: 3 << 8, // indicates Unix
981981
ExternalAttrs: 0777 << 16, // -rwxrwxrwx file permissions
982+
Comment: i.Name(),
982983
Name: "bootstrap",
983984
Method: zip.Deflate,
984985
})

go/porcelain/deploy_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,19 +612,23 @@ func TestBundle(t *testing.T) {
612612
functions, schedules, functionsConfig, err := bundle(gocontext.Background(), "../internal/data", mockObserver{})
613613

614614
assert.Nil(t, err)
615-
assert.Equal(t, 4, len(functions.Files))
615+
assert.Equal(t, 5, len(functions.Files))
616616
assert.Empty(t, schedules)
617617
assert.Nil(t, functionsConfig)
618618

619619
jsFunction := functions.Files["hello-js-function-test"]
620620
pyFunction := functions.Files["hello-py-function-test"]
621621
rsFunction := functions.Files["hello-rs-function-test"]
622622
goFunction := functions.Files["hello-go-binary-function"]
623+
goBackgroundFunction := functions.Files["hello-go-binary-function-background"]
623624

624625
assert.Equal(t, "js", jsFunction.Runtime)
625626
assert.Equal(t, "py", pyFunction.Runtime)
626627
assert.Equal(t, "rs", rsFunction.Runtime)
627628
assert.Equal(t, "provided.al2", goFunction.Runtime)
629+
assert.Equal(t, "provided.al2", goBackgroundFunction.Runtime)
630+
631+
assert.NotEqual(t, goFunction.Sum, goBackgroundFunction.Sum)
628632
}
629633

630634
func TestBundleWithManifest(t *testing.T) {

0 commit comments

Comments
 (0)