-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate request paths routing when submitting a new job #72
Comments
Routes are defined in Ruby source so people are prone to include lots of ‘necessary’ code to do all sorts of perverted things with routes. Loading a lean process that recognizes routes is almost impossible. The least amount of work is to run code using echo "JSON.dump(Rails.application.routes.recognize_path('/sessions/new'))" | rails runner - Another solution could be to write a little Rack server that accepts a POST with a route and returns the matched route, we can keep that running on the master branch. This is also useful for querying other details about the target application. |
Doesn't rails runner take a fairly long time to run on the target app? Are you imagining this happening in the request cycle? Would it be possible to run something in a job every 15 min and cache a full json dump of available routes? I like this kind of UI assistance/guidance, but wondering if we should "aim low" on this feature, given there's risk that
Perhaps we can just provide confirmation against a master cache/process (✅ route recognized from recent master) that a route is accepted but if it's not confirmed, still allow the job to proceed but display a warning (❔ route not recognized on recent master) That would mean the feature would be useful 90% of the time without interrupting the 10% where it's a newer / recent / feature branch route. |
Yes, that's probably better than blocking the job entirely. |
It only has to load the bundle and boot the app when you're running this in development mode. So it would take anywhere between a few seconds to a minute. It's probably best to create a little service for this. |
Show validation error for the request path that doesn't route.
The text was updated successfully, but these errors were encountered: