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

Improve logging, Add logging per VM #724

Merged
merged 11 commits into from
Nov 20, 2024
Merged

Improve logging, Add logging per VM #724

merged 11 commits into from
Nov 20, 2024

Conversation

olethanh
Copy link
Collaborator

Split of from #719 , better reviewability.

Improve the logging for ALEPH-VM
This is a lot of small improvement to make aleph-vm more usable. I'm putting them all under the banner of the Jira tickets : ALEPH-166

  • Include the VM hash in logs were relevant (might have missed some place yet) to help debug endpoint
  • Remove the duplicate output of the db logs (sqlalchemy)
  • Ensure logs for http request are printed
  • Set default level for logging to INFO (so node owner have useful info by default for debugging problem)
  • Fix hatch fmt command (and ruff fmt )
  • Less crap in the program output in general
  • Don't check payment for fake debug instances.
  • Ability to set the LOG level via an environment variable (replace Fix: Log level could not be configured from settings #581 )

Related ClickUp, GitHub or Jira tickets :Part of ALEPH-166 Epic

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.
  • Documentation has been updated regarding these changes.
  • Dependencies update in the project.toml have been mirrored in the Debian package build script packaging/Makefile

Changes

Explain the changes that were made. The idea is not to list exhaustively all the changes made (GitHub already provides a full diff), but to help the reviewers better understand:

  • which specific file changes go together, e.g: when creating a table in the front-end, there usually is a config file that goes with it
  • the reasoning behind some changes, e.g: deleted files because they are now redundant
  • the behaviour to expect, e.g: tooltip has purple background color because the client likes it so, changed a key in the API response to be consistent with other endpoints

How to test

Use is as usual.

@olethanh olethanh requested a review from nesitor November 18, 2024 12:12
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 48.64865% with 114 lines in your changes missing coverage. Please review.

Project coverage is 62.57%. Comparing base (927ce06) to head (346d9fc).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/orchestrator/views/operator.py 46.80% 65 Missing and 10 partials ⚠️
src/aleph/vm/orchestrator/custom_logs.py 50.00% 16 Missing ⚠️
tests/supervisor/views/test_operator.py 58.06% 13 Missing ⚠️
src/aleph/vm/orchestrator/cli.py 0.00% 5 Missing ⚠️
src/aleph/vm/orchestrator/views/__init__.py 33.33% 4 Missing ⚠️
src/aleph/vm/version.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #724      +/-   ##
==========================================
- Coverage   62.59%   62.57%   -0.03%     
==========================================
  Files          69       70       +1     
  Lines        6152     6233      +81     
  Branches      500      503       +3     
==========================================
+ Hits         3851     3900      +49     
- Misses       2151     2180      +29     
- Partials      150      153       +3     

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


🚨 Try these New Features:

Copy link
Member

@nesitor nesitor left a comment

Choose a reason for hiding this comment

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

I have put a suggestion about the log level, but the rest looks so good 😃 🚀

src/aleph/vm/orchestrator/cli.py Outdated Show resolved Hide resolved
@olethanh olethanh merged commit 4d319f0 into main Nov 20, 2024
19 of 22 checks passed
@Psycojoker Psycojoker deleted the ol-improve-logging branch December 10, 2024 21:16
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