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

341 support otp23 #342

Merged
merged 9 commits into from
Dec 2, 2020
Merged

341 support otp23 #342

merged 9 commits into from
Dec 2, 2020

Conversation

kevinbader
Copy link
Contributor

Description

Updated dependencies to support OTP 23. I've also replaced the versions file with .tool-versions, which makes it easier for those using the asdf package manager - just run asdf install to obtain the correct versions of Erlang and Elixir.

Closes #341

What to look out for

Dear reviewer, I want you to

  • check that the code works on your machine.

Process

The goal is to improve not only the code in this PR but also our skills! The "rules":

  • The review is considered "done" as soon as all reviewers have added their review, and all their comments have been addressed.
  • For knowledge-sharing reviews, each reviewer should "approve" the PR after studying its content.
  • After the approval, the merge is concluded by the developer.

Have fun!

@kevinbader kevinbader added this to the 3.0.0 milestone Nov 14, 2020
Copy link
Collaborator

@mmacai mmacai left a comment

Choose a reason for hiding this comment

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

See bunch of warning logs during compilation, can you check them?

warning: redefining @doc attribute previously set at line 19.

Please remove the duplicate docs. If instead you want to override a previously defined @doc, attach the @doc attribute to a function head:

    @doc """
    new docs
    """
    def parse(...)

  lib/rig_cloud_events/cloud_event.ex:41: RigCloudEvents.CloudEvent.parse/1

Also some fishy logs in mix test (even though no failed test):

20:27:56.185 [error] Ranch protocol #PID<0.2243.0> of listener RigInboundGatewayWeb.Endpoint.HTTP (connection #PID<0.2148.0>, stream id 5) terminated
an exception was raised:
    ** (UndefinedFunctionError) function :stop.upgrade/4 is undefined (module :stop is not available)
        :stop.upgrade(%{bindings: %{}, body_length: 0, cert: :undefined, has_body: false, has_sent_resp: true, headers: %{"accept" => "text/event-stream", "host" => "localhost:4000", "user-agent" => "hackney/1.16.0"}, host: "localhost", host_info: :undefined, method: "GET", path: "/_rig/v1/connection/sse", path_info: :undefined, peer: {{127, 0, 0, 1}, 65049}, pid: #PID<0.2148.0>, port: 4000, qs: "subscriptions=%5B%7B%22eventType%22%3A%22greeting1%22%7D%5D", ref: RigInboundGatewayWeb.Endpoint.HTTP, scheme: "http", sock: {{127, 0, 0, 1}, 4000}, streamid: 5, version: :"HTTP/1.1"}, %{dispatch: [{:_, [], [{["_rig", "v1", "connection", "sse"], [], RigInboundGatewayWeb.V1.SSE, :ok}, {["_rig", "v1", "connection", "ws"], [], RigInboundGatewayWeb.V1.Websocket, :ok}, {:_, [], Plug.Cowboy.Handler, {RigInboundGatewayWeb.Endpoint, []}}]}], handler: RigInboundGatewayWeb.V1.SSE, handler_opts: :ok}, RigInboundGatewayWeb.V1.SSE, :no_state)
        (cowboy 2.8.0) /Users/mario.macai/elixir/rig/reactive-interaction-gateway/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
        (cowboy 2.8.0) /Users/mario.macai/elixir/rig/reactive-interaction-gateway/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3
        (stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

config/config.exs Outdated Show resolved Hide resolved
@kevinbader
Copy link
Contributor Author

warning: redefining @doc attribute previously set at line 19.

I didn't want to remove those lines so I turned them from docstrings into comments.

Also some fishy logs in mix test (even though no failed test):

It seems like a Cowboy issue... but I'm not sure. Do you have an idea?

@mmacai
Copy link
Collaborator

mmacai commented Nov 24, 2020

See there also bunch of other warnings when running mix test:

warning: incompatible types:

    :bug__query_params_unfetched !~ :ok

in expression:

    # lib/rig/authorization_check/request.ex:35
    :ok = :bug__query_params_unfetched

Conflict found at
  lib/rig/authorization_check/request.ex:35: RIG.AuthorizationCheck.Request.from_plug_conn/1

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/rig/application.ex:29: Rig.Application.start/2

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/rig/event_stream/nats_to_filter.ex:63: Rig.EventStream.NatsToFilter.supervise_nats_connection/0

warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/rig/event_stream/nats_to_filter.ex:64: Rig.EventStream.NatsToFilter.supervise_nats_connection/0

Generated rig app
Excluding tags: [smoke: true, kafka: true, kinesis: true, avro: true, skip: true]

.....................................warning: variable "other_sse" is unused (if the variable is not meant to be used, prefix it with an underscore)
  test/blacklist_test.exs:64: BlacklistTest."test After blacklisting a session, active connections related to that session are terminated."/1

warning: variable "sse" is unused (if the variable is not meant to be used, prefix it with an underscore)
  test/blacklist_test.exs:59: BlacklistTest."test After blacklisting a session, active connections related to that session are terminated."/1

warning: variable "ws" is unused (if the variable is not meant to be used, prefix it with an underscore)
  test/blacklist_test.exs:61: BlacklistTest."test After blacklisting a session, active connections related to that session are terminated."/1

......warning: variable "ref" is unused (if the variable is not meant to be used, prefix it with an underscore)
  test/event_subscription_test.exs:386: RigInboundGateway.EventSubscriptionTest."test Receiving events: Adding and removing subscriptions is in effect immediately."/1

..........warning: variable "proxy" is unused (if the variable is not meant to be used, prefix it with an underscore)
  test/rig_inbound_gateway/rig/proxy_test.exs:39: RigInboundGateway.ProxyTest.test_proxy_exit/2

@mmacai
Copy link
Collaborator

mmacai commented Nov 24, 2020

warning: redefining @doc attribute previously set at line 19.

I didn't want to remove those lines so I turned them from docstrings into comments.

Also some fishy logs in mix test (even though no failed test):

It seems like a Cowboy issue... but I'm not sure. Do you have an idea?

It's caused by this lib/rig_inbound_gateway_web/v1/sse.ex:87, when changed to {:ok, req, :no_state} error is gone, but probably not a solution.

@mmacai
Copy link
Collaborator

mmacai commented Nov 24, 2020

Please also update changelog.

@mmacai mmacai merged commit 6543746 into master Dec 2, 2020
@mmacai mmacai deleted the 341-support-otp23 branch December 2, 2020 18:40
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.

Support Elixir 1.11 and OTP 23
2 participants