Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Modernize serverless-sharp #121

Closed
bs-thomas opened this issue Jun 29, 2022 · 2 comments
Closed

Modernize serverless-sharp #121

bs-thomas opened this issue Jun 29, 2022 · 2 comments

Comments

@bs-thomas
Copy link
Contributor

I have pulled your latest "modernize" branch, which you're trying to upgrade to the latest serverless-sharp, and a number of other tweaks.

I tried deploying, but stuck with some error messages in serverless.yml.
May I ask if this is still a WIP branch?

There are also a number of things I noticed:

  1. serverless deprecates the usage of settings.yml, and promotes usage of env files. Would you considering going for the latter option? I can assist maybe if you're ok?

  2. I see there is some Makefile and stuff. But the sharp layer for Lambda doesn't really require any building I think.
    All I did on my end is:

  • Add a package.json in the directory "\lambdaLayers\SharpLayer\nodejs" with dependency "sharp": "^0.30.6"
  • Go to the directory, and type in the command npm install --platform=linux --arch=x64 sharp
  • Then, all the linux x64 binaries will be there, and you just deploy over and it works for me.

Or did I miss anything here?

  1. Switched over to use TS. Actually I have no experience on this part. Is it really better?

  2. TLSv1 <-- still uses this protocol. AWS seems to already recommend 'TLSv1.2_2021'

=====

Btw, @Mosnar any communication tools you use? I think we can exchange contacts, it can make our communication easier, and also to make a new overseas friend ;-) If you're interested of course.

@Mosnar
Copy link
Collaborator

Mosnar commented Jun 29, 2022

This branch is definitely still in development, sorry for the confusion. I do appreciate the feedback though! I've added notes with your feedback to the to-do list in the PR. Feel free to reach out on Discord - I'd love to collaborate. Ransom#8483

@Mosnar
Copy link
Collaborator

Mosnar commented Jun 29, 2022

serverless deprecates the usage of settings.yml, and promotes usage of env files. Would you considering going for the latter option? I can assist maybe if you're ok?

I couldn't find any documentation about this - are you able to share a link? I think given the complexity of the configuration, I'd almost rather it be a JSON file or something.

I see there is some Makefile and stuff. But the sharp layer for Lambda doesn't really require any building I think.
All I did on my end is:

Add a package.json in the directory "\lambdaLayers\SharpLayer\nodejs" with dependency "sharp": "^0.30.6"
Go to the directory, and type in the command npm install --platform=linux --arch=x64 sharp
Then, all the linux x64 binaries will be there, and you just deploy over and it works for me.
Or did I miss anything here?

The goal here is to make the build process more repeatable - the Makefile runs the build in a Docker container configured in a way that we know will work, ensuring we have all of the correct dependencies, node versions, etc. Most people are probably running a newer version of Node on their machine for local tasks, so this prevents forcing people to install another Node and potentially messing up their other development environments just to update Sharp. The Makefile also gives us the opportunity to configure additional parameters for building Sharp from scratch down the road.

Switched over to use TS. Actually I have no experience on this part. Is it really better?

It's a million times better - especially in a project like this where there's so much data flow. Trust me. I found 5 or 6 bugs in the old code just from the type-checking.

TLSv1 <-- still uses this protocol. AWS seems to already recommend 'TLSv1.2_2021'

Good catch - we should fix that.

@venveo venveo locked and limited conversation to collaborators Jun 29, 2022
@Mosnar Mosnar converted this issue into discussion #122 Jun 29, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants