[x] Upgrade Jets: Are you using the latest version of Jets? This allows Jets to fix issues fast. There's a jets upgrade command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/
[x] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.rubyonjets.com
[x] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software
Version
Operating System
macOS 10.15.7
Jets
2.3.18
Ruby
2.5.5
Expected Behaviour
When deploying a Ruby method/class whose name would violate AWS Lambda naming conventions, the failure message is somewhat esoteric and requires tracking down an error message in CloudFormation. The expectation was to see some sort of error/exception/validation from Jets when trying to deploy.
Current Behavior
Jets deploy fails and have to look in CloudFormation event logs to see what happened.
Step-by-step reproduction instructions
Create a simple controller
Create a method in that controller with a ! character in its name, such as authenticate_request!
Try to run jets deploy
Notice it fails part of the way through and says to check CloudFormation for details
Code Sample
Fails:
class ApiController < ApplicationController
def authenticate_request!
end
end
Works:
class ApiController < ApplicationController
def authenticate_request # no "!" in method name
end
end
Solution Suggestion
Since Jets is already traversing the class/method hierarchy in order to derive names for Lambda functions, it would be cool if it provided a quick validation that the method names only contain allowed characters.
Or even cooler if it automatically turned things like ! into Bang or something valid so that people can follow Ruby naming conventions while their generated Lambda functions follow AWS requirements. :)
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
When deploying a Ruby method/class whose name would violate AWS Lambda naming conventions, the failure message is somewhat esoteric and requires tracking down an error message in CloudFormation. The expectation was to see some sort of error/exception/validation from Jets when trying to deploy.
Current Behavior
Jets deploy fails and have to look in CloudFormation event logs to see what happened.
Step-by-step reproduction instructions
!
character in its name, such asauthenticate_request!
jets deploy
Code Sample
Fails:
Works:
Solution Suggestion
Since Jets is already traversing the class/method hierarchy in order to derive names for Lambda functions, it would be cool if it provided a quick validation that the method names only contain allowed characters.
Or even cooler if it automatically turned things like
!
intoBang
or something valid so that people can follow Ruby naming conventions while their generated Lambda functions follow AWS requirements. :)