You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/
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
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
Deploying Jets application with routes that have different path variables under the same parent route should work.
A sibling ({post_id}) of this resource already has a variable path part -- only one is allowed
CloudFormation error screenshot:
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
# add back in the route that cause the issue
jets deploy
Note it is helpful to comment out route that causes the issue and deploy successfully first and then deploy again.
Here's also manual reproduction using the API Gateway Console:
Add docs noting this API Gateway constraint and how to currently avoid it. That's a big win and will help save folks time right now.
Upon route building, check for “multiple variable part path definitions” that collide and error with an informative message to the user. So the user finds out about this early as we can help with the process, locally. Even before they try to deploy. When they deploy check the same logic and also provide same information message in case they deploy without checking locally. Something like
API Gateway only allows one unique variable path. [screenshot link]. You must use the same variable name within the same parent route path. Example: /posts/:id and /posts/:post_id/reveal should both be /posts/:id and /posts/:id/reveal.
Something like that, the message can be improved and can tell the users how to fix it.
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
Deploying Jets application with routes that have different path variables under the same parent route should work.
Current Behavior
Deploying with a
config/routes.rb
that has:Produces this error:
CloudFormation error screenshot:
Step-by-step reproduction instructions
Note it is helpful to comment out route that causes the issue and deploy successfully first and then deploy again.
Here's also manual reproduction using the API Gateway Console:
Code Sample
https://github.com/tongueroo/jets-issue-path-variables
Solution Suggestion
Something like that, the message can be improved and can tell the users how to fix it.
References
Original discussion: https://community.rubyonjets.com/t/jets-deploy-create-failed-aws-stack-apigateway-embedded/52
The text was updated successfully, but these errors were encountered: