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

Update to phoenix_live_dashboard 0.8 #73

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

moxley
Copy link

@moxley moxley commented Jun 27, 2023

After updating from phoenix 1.7.3 to 1.7.6, we started seeing warnings appear in the output of our tests:

warning: Passing "connect_info" directly to connect/3 is deprecated, please pass "connect_info: ..." as an option instead
  (phoenix 1.7.6) lib/phoenix/test/channel_test.ex:329: Phoenix.ChannelTest.__connect__/4
  (phoenix_live_view 0.18.18) lib/phoenix_live_view/test/live_view_test.ex:1140: Phoenix.LiveViewTest.start_upload_client/6

Here's our relevant dependencies:

  • phoenix 1.7.6
  • phoenix_live_dashboard 0.7.2
  • phoenix_live_view 0.18.18
  • phoenix_profiler 0.2.1

Since phoenix_live_view 0.18.18 was apparently the culprit, I tried updating it to the latest version, 0.19.3. Then phoenix_live_dashboard 0.7.2 wouldn't work with 0.19.x, so I tried upgrading it to the latest, version 0.8.0. Then, phoenix_profiler wouldn't work with that, because it only supports up to 0.7.x. It uses a now-removed API within phoenix_live_dashboard.

Incidentally, broadway_dashboard has the same phoenix_live_dashboard API issue, and I opened a PR for that as well.

This PR updates phoenix_profiler to use the new phoenix_live_dashboard API, but it breaks your existing versioning requirements. Is it okay to make this a breaking change to older versions of the dependencies, and of Elixir?

TODO

This PR has an unresolved TODO item that I'm happy to resolve, but I want to get guidance from you first on whether this PR is the right approach.

@moxley moxley marked this pull request as ready for review June 27, 2023 20:54
@moxley moxley changed the title Update to latest phoenix_live_dashboard, and others Update to phoenix_live_dashboard 0.8 Jun 27, 2023
@mcrumm
Copy link
Owner

mcrumm commented Jun 29, 2023

Woah @moxley thanks for the contribution, this is awesome!

Using the latest version of the dashboard is fine 👍🏻

I ran into some issues running profiler dev script though, can you try it out?

First thing, add Phoenix.View to the dev environment in Mix deps() so the script works without changes :)

{:phoenix_view, "~> 2.0", only: [:dev, :test], optional: true},

Then, use the dev alias to start:

mix dev

...and visit http://localhost:4000/dashboard/_profiler

@moxley
Copy link
Author

moxley commented Jun 30, 2023

Thanks @mcrumm! I will check out that reproduction path and create a solution for the issue.

@moxley
Copy link
Author

moxley commented Jul 13, 2023

@mcrumm: I got the UI rendering correctly. However, I cannot figure out how to get the UI to respond when the user clicks on any of the navigation tabs, such as "Query Params", "Body Params", etc. I spent several hours troubleshooting.

Meanwhile, management has asked me to remove PhoenixProfiler from our application. I no longer have enough incentive to continue working on this PR. I was going to try to get everything working anyway, but it was taking more time than I can budget for.

So, I will leave this PR open for you to use however you'd like.

Thank you.

@mcrumm
Copy link
Owner

mcrumm commented Jul 13, 2023

@moxley thanks for all the work you've done so far! I will take it from here :)

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.

None yet

2 participants