Closed sam0x17 closed 1 year ago
Generated CloudFormation templates deployed with at least one route:
$ ls /tmp/jets/demo/templates/
demo-dev-api-deployment.yml demo-dev-api-resources-1.yml demo-dev-app-jets-public_controller.yml demo-dev.yml
demo-dev-api-gateway.yml demo-dev-app-jets-preheat_job.yml demo-dev-app-posts_controller.yml
$ ls /tmp/jets/demo/templates/demo-dev-api-gateway.yml
/tmp/jets/demo/templates/demo-dev-api-gateway.yml
$
The key one is demo-dev-api-gateway.yml
When deployed with no routes. IE:
Jets.application.routes.draw do
end
The generated CloudFormation templates look like this:
$ ls /tmp/jets/demo/templates/
demo-dev-app-jets-preheat_job.yml demo-dev-app-posts_controller.yml demo-dev.yml
$
Notice how there's no demo-dev-api-gateway.yml
Also tried without a posts_controller.rb
Generated CloudFormation templates:
$ ls /tmp/jets/demo/templates/
demo-dev.yml
$
Unsure 🧐 Wondering if you can check out the /tmp/jets/APP/templates/
folder when you get a chance. Zip those files up.
Took another look at this. Couldn't reproduce. Guessing/hoping that somewhere between Jets 3.0.22 and 3.2.2, this was fixed. And we can deploy an API app without a public
folder. Closing out. Feel free to comment to help re-open if needed. Appreciate the detailed report. Thanks!
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
It should be possible to deploy a jets app without the catchall public logic at the end of routes file
Current Behavior
Deploying an API-only jets app without the
any "*catchall", to: "jets/public#show"
line at the end results in a deployment failure:Step-by-step reproduction instructions
any "*catchall", to: "jets/public#show"
fromroutes.rb
Code Sample
above
Solution Suggestion
My hunch is that if the
jets/public
controller isn't mentioned inroutes.rb
, the bucket that holds the gem layer gets misconfigured in some way