Skip to content

Add endpoint which can gather extra rsyncer information#545

Merged
d-j-hatton merged 6 commits intomainfrom
more-rsyncer-info
Mar 28, 2025
Merged

Add endpoint which can gather extra rsyncer information#545
d-j-hatton merged 6 commits intomainfrom
more-rsyncer-info

Conversation

@d-j-hatton
Copy link
Contributor

Including how many files are queued for transfer and whether the rsync thread is alive

@codecov
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 31.91489% with 32 lines in your changes missing coverage. Please review.

Project coverage is 28.96%. Comparing base (9df4d4e) to head (202a244).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #545   +/-   ##
=======================================
  Coverage   28.95%   28.96%           
=======================================
  Files          80       80           
  Lines       10449    10495   +46     
  Branches     1391     1394    +3     
=======================================
+ Hits         3026     3040   +14     
- Misses       7322     7354   +32     
  Partials      101      101           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

token = instrument_server_tokens[session_id]["access_token"]
async with aiohttp.ClientSession() as clientsession:
async with clientsession.get(
f"{machine_config.instrument_server_url}/sessions/{sanitise(str(session_id))}/rsyncer_info",
Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to remove the sanitise(str()) call, as Pydantic already evaluates this.

) as resp:
data = await resp.json()
except KeyError:
data = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a debug/warning log, in case it's not performing what we expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case this is to catch the case where the instrument server has disconnected. Then I want data to be [] so it can be handled below and lead to a display in the web UI that indicates the rsyncers aren't running. I can add one to catch other exceptions

Copy link
Contributor

@tieneupin tieneupin left a comment

Choose a reason for hiding this comment

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

Some suggestions, but otherwise no obvious errors!

@d-j-hatton d-j-hatton merged commit 3fbe240 into main Mar 28, 2025
17 checks passed
@d-j-hatton d-j-hatton deleted the more-rsyncer-info branch March 28, 2025 10:08
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