Skip to content

Conversation

@Rados13
Copy link
Contributor

@Rados13 Rados13 commented Oct 11, 2023

No description provided.

@Rados13 Rados13 self-assigned this Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #104 (6165296) into main (aa75980) will increase coverage by 0.42%.
The diff coverage is 91.37%.

@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
+ Coverage   85.30%   85.73%   +0.42%     
==========================================
  Files          44       46       +2     
  Lines         796      834      +38     
==========================================
+ Hits          679      715      +36     
- Misses        117      119       +2     
Files Coverage Δ
lib/jellyfish/application.ex 47.82% <ø> (ø)
lib/jellyfish/event.ex 85.71% <100.00%> (+2.38%) ⬆️
lib/jellyfish/metrics_scraper.ex 61.29% <100.00%> (ø)
lib/jellyfish_web/api_spec/room.ex 100.00% <ø> (ø)
lib/jellyfish_web/controllers/room_controller.ex 100.00% <100.00%> (ø)
lib/jellyfish_web/peer_socket.ex 88.09% <100.00%> (-0.55%) ⬇️
test/support/webhook_plug.ex 100.00% <100.00%> (ø)
test/support/ws.ex 93.33% <100.00%> (+1.02%) ⬆️
lib/jellyfish/room_service.ex 86.41% <92.85%> (+1.08%) ⬆️
lib/jellyfish/room.ex 84.55% <60.00%> (+0.11%) ⬆️
... and 1 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa75980...6165296. Read the comment docs.

@Rados13 Rados13 marked this pull request as ready for review October 12, 2023 07:46
Copy link
Contributor

@mickel8 mickel8 left a comment

Choose a reason for hiding this comment

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

Nicely done! 🔥 I've just added a couple of comments mostly related to the code consistency

Comment on lines 385 to 386
def registry_id(room_id),
do: {:via, Registry, {Jellyfish.RoomRegistry, room_id}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason why we moved this code here? In general I would recommend introducing as few changes as possible so if there is no reason for changing a place for this function I would keep the previous version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

During testing another approach with storing webhook_url in Registry, I found out that we create registry_id from hand in RoomService, which is error-prone because if we change how registry_id is made in Room we could forget to change it in RoomService

Copy link
Contributor

@mickel8 mickel8 Oct 17, 2023

Choose a reason for hiding this comment

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

Ah, now I see. Let's move this then to the top, before start function

@Rados13 Rados13 requested a review from mickel8 October 17, 2023 10:22
alias Phoenix.PubSub

@port 5907
@webhook_port 2137
Copy link
Member

Choose a reason for hiding this comment

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

😍

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah yeah, I know this meme but maybe we should not mixin political memes in the code? I am not sure 🤔 Maybe use panuozzo pollo e pancetta price x2 e.g. 2929

end

@impl true
def terminate(_reason, state) do
Copy link
Contributor

Choose a reason for hiding this comment

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

I would get rid of this function at all as it won't be called in every case so sometimes we get this log and soimetimes not

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is required by behavior Phoenix.Socket.Transport, but if you want I can remove this log from it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, let's do this

def find_room(room_id) do
case Registry.lookup(Jellyfish.RoomRegistry, room_id) do
[{room_pid, nil}] ->
[{room_pid, _webhook_url}] ->
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change the _webhook_url to a different name as we never assign webhook to registry id.

@Rados13 Rados13 requested a review from mickel8 October 18, 2023 10:43
@Rados13 Rados13 merged commit fd6e68d into main Oct 19, 2023
@Rados13 Rados13 deleted the RTC-386 branch October 19, 2023 10:18
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.

5 participants