Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@glennr
Copy link
Contributor

@glennr glennr commented Feb 28, 2023

fixes #191

Change description

Bumps plug_cowboy to support Phoenix 1.7

What problem does this solve?

Issue number: #191

Example usage

Additional details and screenshots

Checklist

  • I have added unit tests to cover my changes. N/A
  • I have added documentation to cover my changes.
  • My changes have passed unit tests and have been tested E2E in an example project.

Cant verify as some unit tests also busted on master too:

  1) test download/2 should be able to download all of the listed versions (PromEx.GrafanaAgent.DownloaderTest)
     test/prom_ex/grafana_agent/downloader_test.exs:9
     ** (ExUnit.TimeoutError) test timed out after 60000ms. You can change the timeout:
     
       1. per test by setting "@tag timeout: x" (accepts :infinity)
       2. per test module by setting "@moduletag timeout: x" (accepts :infinity)
       3. globally via "ExUnit.start(timeout: x)" configuration
       4. by running "mix test --timeout x" which sets timeout
       5. or by running "mix test --trace" which sets timeout to infinity
          (useful when using IEx.pry/0)
     
     where "x" is the timeout given as integer in milliseconds (defaults to 60_000).
     
     code: OctoFetch.Test.test_all_supported_downloads(Downloader)
     stacktrace:
       (inets 8.1) httpc.erl:640: :httpc.handle_answer/3
       (inets 8.1) httpc.erl:584: :httpc.handle_request/9
       (octo_fetch 0.2.0) lib/octo_fetch.ex:255: OctoFetch.download_artifact/2
       (octo_fetch 0.2.0) lib/octo_fetch.ex:157: OctoFetch.download/3
       (octo_fetch 0.2.0) lib/octo_fetch/test.ex:30: anonymous fn/4 in OctoFetch.Test.test_all_supported_downloads/1
       (elixir 1.14.2) lib/enum.ex:975: Enum."-each/2-lists^foreach/1-0-"/2
       (elixir 1.14.2) lib/enum.ex:980: anonymous fn/3 in Enum.each/2
       (stdlib 4.1.1) maps.erl:411: :maps.fold_1/3
       (elixir 1.14.2) lib/enum.ex:2480: Enum.each/2
       (octo_fetch 0.2.0) lib/octo_fetch/test.ex:23: OctoFetch.Test.test_all_supported_downloads/1
       test/prom_ex/grafana_agent/downloader_test.exs:10: (test)
       (ex_unit 1.14.2) lib/ex_unit/runner.ex:512: ExUnit.Runner.exec_test/1
       (stdlib 4.1.1) timer.erl:235: :timer.tc/1
       (ex_unit 1.14.2) lib/ex_unit/runner.ex:463: anonymous fn/4 in ExUnit.Runner.spawn_test_monitor/4

  2) test download/2 should download multiple agents in parallel (PromEx.GrafanaAgent.DownloaderTest)
     test/prom_ex/grafana_agent/downloader_test.exs:43
     ** (exit) exited in: Task.await(%Task{mfa: {:erlang, :apply, 2}, owner: #PID<0.2494.0>, pid: #PID<0.2495.0>, ref: #Reference<0.1925651244.3772841989.150300>}, 5000)
         ** (EXIT) time out
     code: assert Task.await(downloader_a) =~
     stacktrace:
       (elixir 1.14.2) lib/task.ex:830: Task.await/2
       test/prom_ex/grafana_agent/downloader_test.exs:65: (test)

@rands0n
Copy link

rands0n commented Mar 3, 2023

This is absolutely necessary for those who want to upgrade their installation to phoenix 1.7.

@dviramontes
Copy link

bump

@Ninigi
Copy link
Contributor

Ninigi commented Mar 30, 2023

bump from me too - what's the hold-up?

Copy link
Collaborator

@tmartin8080 tmartin8080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bumping this:

  • plug_cowboy 2.6 adds support for websockets
  • tested the upgrades in a Phoenix 1.6 setup and didn't find any issues

{:telemetry_metrics, "~> 0.6"},
{:telemetry_metrics_prometheus_core, "~> 1.0"},
{:plug_cowboy, "~> 2.5.1"},
{:plug_cowboy, "~> 2.6"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that we could use or to be safe:

{:plug_cowboy, "~> 2.5.1 or ~> 2.6"},

@akoutmos akoutmos merged commit ca3c618 into akoutmos:master Mar 31, 2023
@akoutmos
Copy link
Owner

bump from me too - what's the hold-up?

Sorry for the delay. Been dealing with some health emergencies lately. Will try and merge #184 in this weekend and will cut a release.

@glennr glennr deleted the gr/bump-plug-2.6 branch April 4, 2023 23:34
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.

[FEATURE] support phoenix 1.7.0

6 participants