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

teuth-suite: Add dry-run for scheduling suites #3

Merged
merged 5 commits into from
Mar 8, 2023
Merged

teuth-suite: Add dry-run for scheduling suites #3

merged 5 commits into from
Mar 8, 2023

Conversation

VallariAg
Copy link
Owner

@VallariAg VallariAg commented Aug 27, 2022

Add two query params dry_run (bool) and logs (bool).
If dry_run is true, don't schedule suite and return logs (regardless of the value of logs param).
If logs is true, return logs (for both normal and dry-run).

After scheduling the suite, query paddles for run details.
If run is not found, throw error.

To separate logs of two parallel runs, multiprocessing is used.
Why multiprocessing?
For two parallel runs, teuthology was printing logs to the same file, and configuring those runs to print to different files was not working as expected. It was not able to identify difference between the source of logs from those two parallel runs.
So, I wanted to get a new instance of the teuthology import, for which multiprocessing seemed like a good solution.


Requested changes

  • Push dockerfile changes
  • Create log files in /tmp instead. It might not have permissions to access /archive_dir directory or directory path might not exist.

- Add two query params (dry_run and logs) to /suite
- Use multiprocessing to isolate logs of two parallel runs

Signed-off-by: Vallari Agrawal <[email protected]>
@VallariAg VallariAg linked an issue Aug 27, 2022 that may be closed by this pull request
@VallariAg VallariAg requested a review from amathuria August 29, 2022 15:04
@VallariAg VallariAg requested review from kamoltat and zmc August 29, 2022 17:14
Copy link
Collaborator

@zmc zmc left a comment

Choose a reason for hiding this comment

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

Clever idea to use multiprocessing to redirect the logging! A couple feedback items that I don't consider a blocker for this PR:

  1. The logfile path should probably be configurable, but adding a configuration system should probably be its own PR
  2. create_run will take a significant amount of time to execute; likely longer than a client's default timeout for http requests. We may need to place these requests into a queue and return an ID, so the client can check the status of a scheduling request later on. celery might be a good choice here. This is a larger topic, but just wanted to mention it before I forgot 😄

@kamoltat kamoltat added the enhancement New feature or request label Sep 14, 2022
@VallariAg
Copy link
Owner Author

VallariAg commented Mar 7, 2023

@kamoltat should we merge this PR? I think this was approved over call. And the kill branch is built on top of this branch (kill might still need rebasing because of the last commit on this PR).

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.

LGTM

@kamoltat kamoltat merged commit a7e97f6 into main Mar 8, 2023
@kamoltat kamoltat deleted the dry-run branch March 8, 2023 15:15
@kamoltat kamoltat changed the title Suite: Add dry-run for scheduling suites teuth-suite: Add dry-run for scheduling suites Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dry-run feature for suite
3 participants