lifadev / archive_aws-lambda-go-shim

Author your AWS Lambda functions in Go, effectively.
https://github.com/eawsy/aws-lambda-go-shim
Apache License 2.0
789 stars 66 forks source link

Update Go to 1.9 #33

Closed cristim closed 7 years ago

cristim commented 7 years ago

It would be nice to update the shim to 1.9, hopefully it fixes some of the current limitations, such as the one about the number of exported symbols in the module, currently limited to 8.

harrisonhjones commented 7 years ago

Would there be any benefit to make this adjustable? Perhaps we could have a default (1.9?) which could be overridden with a command-line flag?

fsenart commented 7 years ago

@harrisonhjones you mean having a flag in the project's Makefile (not the Makefile.example) in order to build different version of the shim with different version of Go?

cristim commented 7 years ago

Another way may be to have multiple docker image tags, like build the current one with 1.8 and have a new one tagged with 1.9, then encourage people to run versioned Docker images instead of latest in their Makefiles.

fsenart commented 7 years ago

@cristim until Go 2.0, I think it is useless to tag the image with the Go version since with can rely on the Go 1 promise of compatibility. PS: In fact the final shim depends on Go version and also on the amazonlinux image version.

cristim commented 7 years ago

@fsenart As an Ops guy I wouldn't rely on the compatibility promise so blindly, in order to reduce surprises I prefer to use versioning and test things myself when updating to the latest version, but this is really your call.

fsenart commented 7 years ago

What do you think about something like al-2017.03.0.20170401_go-1.9? I can change the current Docker file so that it will take an exact version of the amazon linux image and then begin to tag images :latest and :al-version_go-version. But there is a problem here too, If amazon changes/updates the amazonlinux images then it can potentially change the libc version which will break all running lambdas with this shim. Then an end user has to have the latest version of the amazonlinux image to be lambda runtime compliant!

cristim commented 7 years ago

That version string looks good, but you're right, there's no easy way to avoid incompatibilities in this case since we don't control the Lambda runtime. In this case we may be better off by using latest after all.

The shim may need to be built nightly as well to keep up with the Amazon Linux updates.

fsenart commented 7 years ago

Perfect. I'll do the necessary asap for the nightly build part.