Skip to content

Conversation

@Buzz1167
Copy link
Collaborator

@Buzz1167 Buzz1167 commented Nov 11, 2025

Description

  1. Add timeouts to all the rest calls to the worker
  2. Avoid duplicating tons of logs when large numbers of files are uploaded.

Checklist

  • I have tested these changes locally.
  • I have added unit tests (if appropriate).
  • I have added necessary documentation or updated existing documentation.
  • I have linked the issue(s) addressed by this PR if any.

@github-actions github-actions bot added the bug Something isn't working label Nov 11, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.22%. Comparing base (cd04de2) to head (8ac3ba2).

Files with missing lines Patch % Lines
...rc/ansys/hps/data_transfer/client/api/async_api.py 63.63% 4 Missing ⚠️
src/ansys/hps/data_transfer/client/api/api.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
+ Coverage   84.84%   85.22%   +0.37%     
==========================================
  Files          17       17              
  Lines        1551     1557       +6     
==========================================
+ Hits         1316     1327      +11     
+ Misses        235      230       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

self.dump_mode = "json"
self.client = client
self.wait_handler_factory = WaitHandler
self.request_timeout = (10.0, 10.0, 10.0, 10.0) # connect, read, write, pool timeouts
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. From the doc I understand the default httpx timeout is 5s for all operations: https://www.python-httpx.org/advanced/timeouts/
    In the PR description you're saying 'Add timeouts to all the rest calls to the worker': so you actually want to increase the default one?
  2. Could we not set the timeout directly on the httpx.Client/AsyncClient? (that is ClientBase.session)? to avoid having to set it on each and every call

Copy link
Collaborator Author

@Buzz1167 Buzz1167 Nov 12, 2025

Choose a reason for hiding this comment

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

@FedericoNegri My bad I should have made this a draft PR, we were trying to figure out what was wrong with Simons machine and we figured it out, this part is not needed, he was not using the latest code at all even though he was pulling the latest through poetry, when we went to debug it showed older code in the stacktrace, we eventually got it after reinstalling the lot. Im going to pull this out and just do the logging changes.

@Buzz1167 Buzz1167 closed this Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants