[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
Amazon Linux
Jets
1.5.3
Ruby
2.5.3
Expected Behaviour
Should be able to change config/routes.rb from:
get "posts/:id", to: "posts#show"
to
get "posts/:post_id", to: "posts#show"
And deploy successfully.
Current Behavior
When we deploy the CloudFormation stack rolls back because API Gateway fails to create the new route.
Step-by-step reproduction instructions
git clone https://github.com/tongueroo/jets-issue-path-variables demo
cd demo
# comment out the multiple route so we can get a full succcessful deploy first
# https://github.com/tongueroo/jets-issue-path-variables/blob/b7be42eb0ad2bd933461f48ab328330dd4674c9e/config/routes.rb#L5
jets deploy
# change the route to get "posts/:post_id", to: "posts#show"
jets deploy
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
Should be able to change
config/routes.rb
from:to
And deploy successfully.
Current Behavior
When we deploy the CloudFormation stack rolls back because API Gateway fails to create the new route.
Step-by-step reproduction instructions
Here's a manual reproduction also:
Code Sample
https://github.com/tongueroo/jets-issue-path-variables
Solution Suggestion
The route change detection code should account for this case. Relevant code area: https://github.com/tongueroo/jets/blob/master/lib/jets/resource/api_gateway/rest_api/routes.rb#L10
References
Original discussion: https://community.rubyonjets.com/t/jets-deploy-create-failed-aws-stack-apigateway-embedded/52