Skip to content

Return peer_websocket_url in PeerDetailsResponse#181

Merged
Rados13 merged 4 commits intomainfrom
add_websocket_url
Apr 17, 2024
Merged

Return peer_websocket_url in PeerDetailsResponse#181
Rados13 merged 4 commits intomainfrom
add_websocket_url

Conversation

@Rados13
Copy link
Copy Markdown
Contributor

@Rados13 Rados13 commented Apr 16, 2024

This PR introduces two changes:

  • Add peer websocket URL in PeerDetailsResponse
  • ResourceManager adds raw_recordings directory if it doesn't exist.

Acknowledging the stipulations set forth:

  • I hereby confirm that a Pull Request involving updates to the Software Development Kit (SDK) has been smoothly merged, currently awaits processing, or is otherwise deemed unnecessary in this context.
  • I also affirm that another Pull Request, specifically addressing updates to the documentation body (commonly referred to as 'docs'), has either been successfully incorporated, is in the process of review, or is considered superfluous under the prevailing circumstances.

Docs PR
Elixir SDK PR
Python SDK PR

@Rados13 Rados13 self-assigned this Apr 16, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2024

Codecov Report

Merging #181 (e9b39a5) into main (9cfc3e0) will increase coverage by 0.01%.
The diff coverage is 91.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   86.84%   86.85%   +0.01%     
==========================================
  Files          74       74              
  Lines        1482     1491       +9     
==========================================
+ Hits         1287     1295       +8     
- Misses        195      196       +1     
Files Coverage Δ
lib/jellyfish.ex 100.00% <100.00%> (ø)
lib/jellyfish/room_service.ex 87.01% <100.00%> (ø)
lib/jellyfish_web/api_spec/peer.ex 100.00% <100.00%> (ø)
lib/jellyfish_web/api_spec/responses.ex 100.00% <ø> (ø)
lib/jellyfish_web/controllers/peer_controller.ex 100.00% <100.00%> (ø)
lib/jellyfish_web/controllers/peer_json.ex 90.00% <100.00%> (ø)
lib/jellyfish/resource_manager.ex 97.14% <80.00%> (-2.86%) ⬇️

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 9cfc3e0...e9b39a5. Read the comment docs.

@Rados13 Rados13 marked this pull request as ready for review April 16, 2024 12:35
@Rados13 Rados13 changed the title Return peer_websocket_url in peer creation Return peer_websocket_url in PeerDetailsResponse Apr 16, 2024
@Rados13 Rados13 requested review from roznawsk and sgfn April 16, 2024 12:40
Copy link
Copy Markdown
Member

@roznawsk roznawsk left a comment

Choose a reason for hiding this comment

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

LGTM, why are we introducing this change though?

@Rados13
Copy link
Copy Markdown
Contributor Author

Rados13 commented Apr 16, 2024

LGTM, why are we introducing this change though?

@kamil-stasiak requested these changes as they could simplify logic in back-end and front-end code.

Comment on lines +78 to +87
@spec get_jellyfish_address() :: binary()
def get_jellyfish_address() do
Application.fetch_env!(:jellyfish, :address)
end

@spec get_peer_websocket_address() :: binary()
def get_peer_websocket_address() do
Application.fetch_env!(:jellyfish, :address) <> "/socket/peer/websocket"
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about putting them in jellyfish.ex -> Jellyfish.address, Jellyfish.peer_websocket_address?

Comment on lines +29 to +39
base_path = Recording.get_base_path()
dir_result = File.mkdir_p(base_path)

case dir_result do
{:error, reason} ->
Logger.error("Can't create directory at #{base_path} with reason: #{reason}")

:ok ->
nil
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this change need to be mentioned in the PR description?

@Rados13 Rados13 force-pushed the add_websocket_url branch from 02e574b to e9b39a5 Compare April 17, 2024 08:11
@Rados13 Rados13 merged commit 69e3a61 into main Apr 17, 2024
@Rados13 Rados13 deleted the add_websocket_url branch April 17, 2024 12:37
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.

3 participants