Skip to content
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

prepare for supporting Ruby 3.2 runtime coming end of Q2 2023 #12004

Merged
merged 1 commit into from Jun 5, 2023
Merged

prepare for supporting Ruby 3.2 runtime coming end of Q2 2023 #12004

merged 1 commit into from Jun 5, 2023

Conversation

theRocket
Copy link
Contributor

@theRocket theRocket commented Jun 2, 2023

Ruby 2.7 went EOL in the ruby community on March 30, 2023. AWS has already announced deprecation for Ruby 2.7 on November 15, 2023.

According to this comment from March 28th, 2023 on the AWS Lambda Base Images repo, Ruby 3.2 support is coming the end of this month:

Update: We have today released a container base image for Ruby 3.2 support in Lambda. This container image is fully supported and suitable for production applications. We will release the corresponding managed runtime within 90 days.

We will update the aws_lambda_ric gem either with or very shortly after the managed runtime release. Until then, we recommend using the newly published container image to build Ruby 3.2 functions for Lambda.

I have been deploying an image-based solution to test my lambdas. As soon at this runtime is supported, the Serverless framework will throw a warning if I try to deploy this runtime.

Can we prep this MR to be ready for that day?

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @theRocket 👍

@medikoo medikoo merged commit 0a0a4fc into serverless:main Jun 5, 2023
5 checks passed
@GrahamCampbell
Copy link
Contributor

Support for Ruby 3.2 was added to the AWS Lambda SDKs in the last few hours aws/aws-sdk-php@499e7d4#diff-fdc52ad29302e54a531771d88ac2c6c4b9f505cfc3d9b581ed9107032e8fc8c1. I assume CloudFormation is to come next, then they will push out a blog post.

@theRocket
Copy link
Contributor Author

@jschulenklopper
Copy link

Ah, now I see that issue #12025 is already addressed in this PR. (It apparently didn't show up when I searched for the issue.) Close that dupe issue just now. Thanks for including this.

@belucid
Copy link

belucid commented Jun 27, 2023

I'm a bit confused. I'm running version 3.33.0 which includes this, but there's no change. I still get warned about unsupported runtime of ruby3.2.

 npm -g list
/Users/sean/.nvm/versions/node/v18.16.0/lib
├── @aws-amplify/cli@11.1.1
├── corepack@0.17.0
├── electron-builder@23.6.0
├── node-abi@3.40.0
├── npm@9.5.1
└── serverless@3.33.0
 which sls
/Users/sean/.nvm/versions/node/v18.16.0/bin/sls
sls -v
Running "serverless" from node_modules
Framework Core: 2.25.2
Plugin: 4.4.3
SDK: 2.3.2
Components: 3.7.0
sls
Running "serverless" from node_modules
Serverless: Configuration warning at 'provider.runtime': should be equal to one of the allowed values [dotnetcore2.1, dotnetcore3.1, go1.x, java11, java8, java8.al2, nodejs10.x, nodejs12.x, nodejs14.x, provided, provided.al2, python2.7, python3.6, python3.7, python3.8, ruby2.5, ruby2.7]
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:

Shouldn't ruby3.2 be in the allowed values list now and this warning be gone?

@medikoo
Copy link
Contributor

medikoo commented Jun 27, 2023

@belucid see:

Running "serverless" from node_modules

It means that global installation of the Framework falls back into one locally installed in folder in which you run command.

And you can see that over there it's quite outdated version installed (v2.25.2)

@belucid
Copy link

belucid commented Jun 27, 2023

Yep @medikoo I had this hanging around in my ENV: export NODE_PATH=/usr/local/lib/node:/usr/local/lib/node_modules

@theRocket
Copy link
Contributor Author

I tested deploying with this version today, before and after updating serverless to latest, and the warning went away.

@belucid
Copy link

belucid commented Jun 28, 2023

I also had a positive test after fixing my upgrade. All seems well with this patch.

khacminh pushed a commit to khacminh/serverless that referenced this pull request Nov 29, 2023
@namdv-1375
Copy link

@medikoo Can I ask, I have a serverless version installed like this:

Running "serverless" from node_modules
Framework Core: 3.38.0 (local) 3.38.0 (global)
Plugin: 7.2.0
SDK: 4.5.1

However, when running it still shows this error

Warning: Warning: found unsupported runtime 'ruby3.2' for function
× Unsupported runtime
× Error: Unsupported runtime

I don't understand why, please help me :(

@medikoo
Copy link
Contributor

medikoo commented Dec 5, 2023

@namdv-1375 It's also not clear for me why you get this error. Please report a bug providing full information as requested in issue template. (still note I'm not longer at Serverless Inc, and I don't have any possibilities to accept new fixes for the framework, but hopefully current maintainers will resolve it for you shortly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants