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 ci workflow #36

Merged
merged 2 commits into from
Apr 22, 2023
Merged

update ci workflow #36

merged 2 commits into from
Apr 22, 2023

Conversation

mlineen
Copy link
Contributor

@mlineen mlineen commented Apr 21, 2023

There are several updates in this PR to the github actions workflow; I'm hoping this unblocks dependabot upgrades

ubuntu-latest is now ubuntu-22.04 which only supports OTP 24, 25
see https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp

elixir 1.12 only supports OTP 24
https://hexdocs.pm/elixir/1.12.3/compatibility-and-deprecations.html

use redis service
https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers#running-jobs-in-containers

upgrade to actions/checkout@v3

fix deprecation with use Mix.Config vs import Config

Copy link
Owner

@akash-akya akash-akya left a comment

Choose a reason for hiding this comment

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

Hi @mlineen, thanks for spending time to clean up the CI workflow.
LGTM, just a minor nit

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

mlineen commented Apr 21, 2023

I am seeing some instability in the test suite:

% mix test
..........
Finished in 1.8 seconds (0.00s async, 1.8s sync)
10 tests, 0 failures

Randomized with seed 481880
% mix test
..

  1) test if producer claim pending messages after restart (OffBroadwayRedisStream.ProducerTest)
     test/producer_test.exs:128
     ** (exit) exited in: GenServer.stop(#PID<0.285.0>, :kill, 10)
         ** (EXIT) time out
     code: Supervisor.stop(pid, :kill, 10)
     stacktrace:
       (elixir 1.14.3) lib/gen_server.ex:995: GenServer.stop/3
       test/producer_test.exs:141: (test)

     The following output was logged:

     14:20:57.680 [error] GenServer :Broadway3 terminating
     ** (stop) :kill
     Last message: []
     State: %{name: :Broadway3, supervisor_pid: #PID<0.286.0>, terminator: :"Broadway3.Broadway.Terminator"}

.......
Finished in 1.7 seconds (0.00s async, 1.7s sync)
10 tests, 1 failure
% mix test
.....

  1) test when a retry_after timestamp is in the message metadata, skips until time has passed (OffBroadwayRedisStream.ProducerTest)
     test/producer_test.exs:278
     Assertion failed, no matching message after 100ms
     Showing 10 of 344 messages in the mailbox
     code: assert_receive {:message_handled, %{data: ["1-0", _]}}
     mailbox:
       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}

       pattern: {:message_handled, %{data: ["1-0", _]}}
       value:   {:messages_fetched, []}
     stacktrace:
       test/producer_test.exs:300: (test)

     The following output was logged:

     14:24:21.008 [error] ** (RuntimeError) error
         test/producer_test.exs:19: OffBroadwayRedisStream.ProducerTest.Forwarder.handle_message/3
         (broadway 1.0.3) lib/broadway/topology/processor_stage.ex:156: anonymous fn/6 in Broadway.Topology.ProcessorStage.handle_messages/4
         (telemetry 1.0.0) /Users/mlineen/readystate/_os/off_broadway_redis_stream/deps/telemetry/src/telemetry.erl:293: :telemetry.span/3
         (broadway 1.0.3) lib/broadway/topology/processor_stage.ex:143: Broadway.Topology.ProcessorStage.handle_messages/4
         (broadway 1.0.3) lib/broadway/topology/processor_stage.ex:63: anonymous fn/2 in Broadway.Topology.ProcessorStage.handle_events/3
         (telemetry 1.0.0) /Users/mlineen/readystate/_os/off_broadway_redis_stream/deps/telemetry/src/telemetry.erl:293: :telemetry.span/3
         (gen_stage 1.1.2) lib/gen_stage.ex:2471: GenStage.consumer_dispatch/6
         (stdlib 4.3) gen_server.erl:1123: :gen_server.try_dispatch/4
         (stdlib 4.3) gen_server.erl:1200: :gen_server.handle_msg/6
         (stdlib 4.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3


     14:24:21.521 [error] ** (RuntimeError) error
         test/producer_test.exs:19: OffBroadwayRedisStream.ProducerTest.Forwarder.handle_message/3
         (broadway 1.0.3) lib/broadway/topology/processor_stage.ex:156: anonymous fn/6 in Broadway.Topology.ProcessorStage.handle_messages/4
         (telemetry 1.0.0) /Users/mlineen/readystate/_os/off_broadway_redis_stream/deps/telemetry/src/telemetry.erl:293: :telemetry.span/3
         (broadway 1.0.3) lib/broadway/topology/processor_stage.ex:143: Broadway.Topology.ProcessorStage.handle_messages/4
         (broadway 1.0.3) lib/broadway/topology/processor_stage.ex:63: anonymous fn/2 in Broadway.Topology.ProcessorStage.handle_events/3
         (telemetry 1.0.0) /Users/mlineen/readystate/_os/off_broadway_redis_stream/deps/telemetry/src/telemetry.erl:293: :telemetry.span/3
         (gen_stage 1.1.2) lib/gen_stage.ex:2471: GenStage.consumer_dispatch/6
         (stdlib 4.3) gen_server.erl:1123: :gen_server.try_dispatch/4
         (stdlib 4.3) gen_server.erl:1200: :gen_server.handle_msg/6
         (stdlib 4.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3


....
Finished in 1.7 seconds (0.00s async, 1.7s sync)
10 tests, 1 failure

Randomized with seed 872650

@akash-akya
Copy link
Owner

Yes, flakiness is likely due to race conditions. I'll fix them tomorrow.

@akash-akya akash-akya merged commit d008a6e into akash-akya:master Apr 22, 2023
@akash-akya
Copy link
Owner

@mlineen released v0.5.0 version with latest dependencies.

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.

2 participants