-
Notifications
You must be signed in to change notification settings - Fork 13
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
chore: Phoenix 1.7 #2143
chore: Phoenix 1.7 #2143
Conversation
6a4ca59
to
d871d49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good overall!
One bug I found: I noticed that one backend endpoint returns a 500 error (example url: https://dev-green.mbtace.com/schedules/line_api/realtime?id=749&direction_id=1) and predictions and vehicles aren't showing within the line diagram. Could one of the updated dependencies have altered how Phoenix handles serving JSON?
Log from Splunk:
dc79b8312c8b Request: GET /schedules/line_api/realtime?id=Orange&direction_id=1
dc79b8312c8b ** (exit) an exception was raised:
dc79b8312c8b ** (FunctionClauseError) no function clause matching in Jason.Encoder.Routes.Route."-inlined-encode/2-"/2
dc79b8312c8b (dotcom 0.0.1) Jason.Encoder.Routes.Route."-inlined-encode/2-"(%{id: "Orange", name: "Orange Line", type: 1, description: :rapid_transit, sort_order: 10020, __struct__: Routes.Route, color: "ED8B00", long_name: "Orange Line", direction_destinations: %{0 => "Forest Hills", 1 => "Oak Grove"}, direction_names: %{0 => "Southbound", 1 => "Northbound"}, fare_class: :rapid_transit_fare, line_id: "line-Orange", custom_route?: false}, {#Function<3.64988371/3 in Jason.Encode.escape_json>, #Function<1.64988371/3 in Jason.Encode.map_naive>})
dc79b8312c8b (dotcom 0.0.1) lib/schedules/schedule.ex:8: Jason.Encoder.Schedules.Schedule.encode/2
dc79b8312c8b (dotcom 0.0.1) lib/predicted_schedule.ex:14: Jason.Encoder.PredictedSchedule.encode/2
dc79b8312c8b (jason 1.4.4) lib/encode.ex:198: Jason.Encode.map_naive_loop/3
dc79b8312c8b (jason 1.4.4) lib/encode.ex:189: Jason.Encode.map_naive/3
dc79b8312c8b (jason 1.4.4) lib/encode.ex:159: Jason.Encode.list/3
dc79b8312c8b (jason 1.4.4) lib/encode.ex:198: Jason.Encode.map_naive_loop/3
dc79b8312c8b (jason 1.4.4) lib/encode.ex:199: Jason.Encode.map_naive_loop/3
Thanks for the heads up, I'll look into this. |
Also removes the `not-found` class from the `body` tag because it's not used anywhere.
1093b0d
to
70ab1fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it out on dev!
Summary of changes
Asana Ticket: [monthly] Upgrade Erlang, Elixir & dependencies
Upgrades to Phoenix 1.7 per the upgrade guide. This includes removing functionality to add a
not-found
class to the body tag on 404 pages (because a) it's broken by this upgrade, b) it relies on Phoenix internals, c) it appears to be unused), migrating deprecated usage ofPhoenix.Controller.get_flash/2
toPhoenix.Flash.get/2
, and updating.formatter.exs
to include HEEx files and the newPhoenix.LiveView.HTMLFormatter
plugin.General checks