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

Logging at realtime from the async subprocess while pulling #1392

Merged
merged 6 commits into from
Nov 25, 2024

Conversation

Abellegese
Copy link
Contributor

@Abellegese Abellegese commented Nov 20, 2024

Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed

  • Have you followed the guidelines in our Contribution Guide
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Description

This PR enhances the async_pull method by adding real-time logging for Docker subprocess commands. The changes improve debugging and provide better insight into the progress of docker pull operations.

@miquelduranfrigola
Copy link
Member

Copilot generated summary below

This pull request includes changes to improve the logging and error handling in the async_pull method in ersilia/hub/pull/pull.py. The most important changes include removing the temporary log file, adding asynchronous log streaming, and simplifying the error handling process.

Improvements to logging and error handling:

  • Removed the creation and usage of a temporary log file for storing Docker pull logs. (ersilia/hub/pull/pull.py)
  • Added an async function log_stream to stream logs asynchronously from the Docker pull process to the logger. (ersilia/hub/pull/pull.py)
  • Simplified the error handling by directly logging the return code of the Docker pull process and raising an exception if it fails. (ersilia/hub/pull/pull.py)
  • Improved the logging of successful pull completion messages for both conventional and forced pulls. (ersilia/hub/pull/pull.py)

@DhanshreeA DhanshreeA merged commit f9c5e34 into ersilia-os:master Nov 25, 2024
18 checks passed
Abellegese added a commit to Abellegese/ersilia that referenced this pull request Nov 26, 2024
…os#1392)

* Update config.yml - fix Circle CI pipeline

* Logging at realtime from the async subprocess while pulling

---------

Co-authored-by: Dhanshree Arora <[email protected]>
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