Skip to content

[GSOC Taks 2] ceph-devstack Cli logs feature : To Display Teuthology Logs #18

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

abhi4578
Copy link

Adds implementation of logs and --logs-file option

  • ceph-devstack logs displays latest run
    teuthology logs of given job
  • ceph-devstack logs --log-file displays
    file location of latest run teuthology log of
    given job

Adds pytest unit tests to test 'logs' command

  • Pytest unit tests are added to test new logs command with different
    test cases using parametrized tests and fixtures

@abhi4578 abhi4578 changed the title ceph-devstack Cli logs feature : To Display Teuthology Logs [GSOC Taks 2} ceph-devstack Cli logs feature : To Display Teuthology Logs Mar 24, 2025
@abhi4578 abhi4578 changed the title [GSOC Taks 2} ceph-devstack Cli logs feature : To Display Teuthology Logs [GSOC Taks 2] ceph-devstack Cli logs feature : To Display Teuthology Logs Mar 24, 2025
@abhi4578
Copy link
Author

Hello @amathuria @VallariAg @zmc here is my gsoc task 2 logs command implementation on ceph-devstack. Looking forward to your feedback.

@abhi4578
Copy link
Author

abhi4578 commented Mar 24, 2025

Disclosure: Github Copilot was used to add doc-strings (like args of function docs/comments) and few one liner python exceptions. Please let me know if this is acceptable or needs to be changed accordingly?

Copy link
Collaborator

@kamoltat kamoltat left a comment

Choose a reason for hiding this comment

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

Reviewing

Copy link
Collaborator

@kamoltat kamoltat left a comment

Choose a reason for hiding this comment

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

First round comments for GSOC evaluation, good job! Will not approve the PR since it is just evaluation task.

@kamoltat
Copy link
Collaborator

kamoltat commented Apr 9, 2025

@abhi4578 also can you please rebase your PR against the main branch thank you

abhi4578 and others added 10 commits April 10, 2025 20:12
- ``ceph-devstack logs `` displays latest run
teuthology logs of given job
- ``ceph-devstack logs --log-file `` displace
file location of latest run teuthology log of
given job
Signed-off-by: Abhi  <[email protected]>
Co-authored-by: Kamoltat (Junior) Sirivadhna <[email protected]>
Signed-off-by: Abhi  <[email protected]>
- Add appropriate comments for better
  understanding
- Add try, except block while parsing
  latest job directory paths to catch
  ValueError
- Make flag_set to boolean from str
  for simplicity in test_logs.py
- Added chec condition if teuthology.log
  file exists before reading to
  prevent exceptions
- Also replace return statements with exit
  statements in test_logs.py file because
  pytest warnings
@abhi4578
Copy link
Author

@kamoltat I have added commits resolving the above issues and rebased it against main branch. Please review.

Find the screenshots of

  1. ceph-devstack --logs
    Screenshot from 2025-04-10 21-28-54

  2. ceph-devstack --logs --log-file
    Screenshot from 2025-04-10 21-28-10

  3. Tests python3 -m pytest ceph_devstack/resources/test/test_logs.py
    Screenshot from 2025-04-10 21-26-51

Copy link
Collaborator

@kamoltat kamoltat left a comment

Choose a reason for hiding this comment

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

Good work!

@abhi4578
Copy link
Author

abhi4578 commented Apr 15, 2025

Good work!

Thank you!

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