Skip to content
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

Merged
merged 3 commits into from
Aug 16, 2024
Merged

chore: Phoenix 1.7 #2143

merged 3 commits into from
Aug 16, 2024

Conversation

bklebe
Copy link
Contributor

@bklebe bklebe commented Aug 8, 2024

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 of Phoenix.Controller.get_flash/2 to Phoenix.Flash.get/2, and updating .formatter.exs to include HEEx files and the new Phoenix.LiveView.HTMLFormatter plugin.


General checks

  • Are the changes organized into self-contained commits with descriptive and well-formatted commit messages? This is a good practice that can facilitate easier reviews.
  • Testing. Do the changes include relevant passing updates to tests? This includes updating screenshots. Preferably tests are run locally to verify that there are no test failures created by these changes, before opening a PR.
  • Tech debt. Have you checked for tech debt you can address in the area you're working in? This can be a good time to address small issues, or create Asana tickets for larger issues.

@bklebe bklebe force-pushed the beatrix/push/ttnwmxwzzlnr branch 7 times, most recently from 6a4ca59 to d871d49 Compare August 9, 2024 16:35
@bklebe bklebe marked this pull request as ready for review August 9, 2024 16:51
@bklebe bklebe requested a review from a team as a code owner August 9, 2024 16:51
@thecristen thecristen added the dev-blue Deploy to dev-blue label Aug 9, 2024
@thecristen thecristen added dev-green Deploy to dev-green and removed dev-blue Deploy to dev-blue labels Aug 12, 2024
Copy link
Collaborator

@thecristen thecristen left a 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

@anthonyshull anthonyshull removed the dev-green Deploy to dev-green label Aug 12, 2024
@bklebe
Copy link
Contributor Author

bklebe commented Aug 13, 2024

Thanks for the heads up, I'll look into this.

bklebe and others added 3 commits August 13, 2024 10:08
Also removes the `not-found` class from the `body` tag because it's not used anywhere.
@bklebe bklebe force-pushed the beatrix/push/ttnwmxwzzlnr branch from 1093b0d to 70ab1fb Compare August 13, 2024 14:08
@thecristen thecristen self-requested a review August 16, 2024 14:42
Copy link
Collaborator

@thecristen thecristen left a 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!

@bklebe bklebe merged commit 79ca80f into main Aug 16, 2024
23 checks passed
@bklebe bklebe deleted the beatrix/push/ttnwmxwzzlnr branch August 16, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants