AWS recently added support for Ruby 3.3. In testing this plugin, I discovered that it did not support Ruby 3.3, but only because there was a switch statement that limits the ruby version to either 3.2 or 2.7 (we are not using Docker for compiling native extensions).
Adding support for ruby 3.3 required the following changes:
Replaced the ruby version switch statement with regex matching, defaulting to 3.3 if somehow not specified
This will give us better odds of supporting future ruby versions without changes to the gem.
I also removed extensionApiVersion() as it hasn't been needed since ruby 2.5, which we no longer support.
Modified the build-gems.sh script to adjust the package manager depending on the base operating system
The new lambda/ruby:3.3 Docker image from Amazon is built on Amazon Linux 2023 instead of Amazon Linux 2 and does not have a yum binary.
Removed old ruby 2.5 tests and added ruby 3.3 tests
Bumped the integration tests' stringio gem version to fix compilation when using ruby 3.3
Local test results:
yarn run v1.22.4
$ jest
PASS __tests__/index.test.js
✓ captures the serverless configuration (1ms)
✓ captures the options
✓ hooks in before packaging deployment artifacts
✓ hooks in before packaging an individual function (1ms)
✓ disables 'Excluding development dependencies', which only applies to node projects (432ms)
✓ forces whitelisting files to package by excluding all files by default (365ms)
✓ include the bundler standalone files (392ms)
✓ preserve the includes specified in serverless configuration (368ms)
✓ include files for each gem needed by default bundler group - excluding .git/test files (368ms)
Test Suites: 1 passed, 1 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 2.438s, estimated 3s
Ran all test suites.
✨ Done in 3.62s.
Since the integration tests produce a lot of output, I've included those results as a text file attachment: ruby_3.3_integration_test_output.txt.
AWS recently added support for Ruby 3.3. In testing this plugin, I discovered that it did not support Ruby 3.3, but only because there was a switch statement that limits the ruby version to either 3.2 or 2.7 (we are not using Docker for compiling native extensions).
Adding support for ruby 3.3 required the following changes:
build-gems.sh
script to adjust the package manager depending on the base operating systemlambda/ruby:3.3
Docker image from Amazon is built on Amazon Linux 2023 instead of Amazon Linux 2 and does not have a yum binary.Local test results:
Since the integration tests produce a lot of output, I've included those results as a text file attachment: ruby_3.3_integration_test_output.txt.