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

Add json logs endpoint which works for finished execution #718

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

olethanh
Copy link
Collaborator

@olethanh olethanh commented Nov 5, 2024

Add a endpoint to get log from program from history, even after they have run.

Related ClickUp, GitHub or Jira tickets : ALEPH-275

Related Client PR aleph-im/aleph-client#304

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.

Changes

add /control/machine/{ref}/logs.json

How to test

Use the related branch in the client ol-ALEPH-275-info-program-boot or check the unit test. You can also call the endpoint by hand

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 83.67347% with 8 lines in your changes missing coverage. Please review.

Project coverage is 62.50%. Comparing base (f1bad18) to head (841fd1a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/orchestrator/views/operator.py 80.76% 2 Missing and 3 partials ⚠️
src/aleph/vm/orchestrator/metrics.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #718      +/-   ##
==========================================
- Coverage   62.56%   62.50%   -0.07%     
==========================================
  Files          70       70              
  Lines        6235     6232       -3     
  Branches      503      506       +3     
==========================================
- Hits         3901     3895       -6     
+ Misses       2181     2179       -2     
- Partials      153      158       +5     

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

@olethanh olethanh changed the title Add json logs endpoint which allow for past record Add json logs endpoint which works for finished execution Nov 5, 2024
@olethanh olethanh requested a review from nesitor November 5, 2024 18:19
@olethanh olethanh force-pushed the ol-ALEPH-275-info-program-boot branch from 3f29f1d to b887add Compare November 8, 2024 14:17
@olethanh olethanh requested a review from hoh November 18, 2024 12:14
src/aleph/vm/conf.py Show resolved Hide resolved
src/aleph/vm/orchestrator/supervisor.py Outdated Show resolved Hide resolved
src/aleph/vm/orchestrator/views/operator.py Outdated Show resolved Hide resolved
src/aleph/vm/orchestrator/metrics.py Outdated Show resolved Hide resolved
@olethanh olethanh force-pushed the ol-ALEPH-275-info-program-boot branch 4 times, most recently from c3140c5 to bff9d52 Compare November 20, 2024 09:06
@olethanh olethanh requested a review from nesitor November 20, 2024 14:40
@olethanh olethanh force-pushed the ol-ALEPH-275-info-program-boot branch from bff9d52 to 841fd1a Compare November 24, 2024 16:42
@nesitor nesitor merged commit 6836d6d into main Nov 26, 2024
22 checks passed
@nesitor nesitor deleted the ol-ALEPH-275-info-program-boot branch November 26, 2024 12: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