softprops / serverless-rust

⚡ 🦀 a serverless framework plugin for rustlang applications
https://www.npmjs.com/package/serverless-rust
MIT License
548 stars 82 forks source link

fix: use `tags` instead of a custom invalid `runtime` option #117

Open fdaciuk opened 2 years ago

fdaciuk commented 2 years ago

What did you implement:

Serverless 3 will throw an error if we use a provider.runtime option different from the allowed values:

Error:
Configuration error at 'provider.runtime': must be equal to one of the allowed values [dotnet6, dotnetcore3.1, go1.x, java11, java8, java8.al2, nodejs12.x, nodejs14.x, nodejs16.x, provided, provided.al2, python3.6, python3.7, python3.8, python3.9, ruby2.7]

Learn more about configuration validation here: http://slss.io/configuration-validation

This PR removes the need to use the new runtime option (rust) and uses tags.rust: true inside the function configuration.

Closes: #107

How did you verify your change:

Just put a tag.rust: true in your function configuration and run npx serverless package:

functions:
  rust:
    handler: your_rust_project_name
    runtime: provided.al2
    tags:
      rust: true

What (if anything) would need to be called out in the CHANGELOG for the next release:

You can use the title of this PR.

@softprops =)