-
Notifications
You must be signed in to change notification settings - Fork 31
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
Conversation
Signed-off-by: Vallari Agrawal <[email protected]>
- 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]>
Signed-off-by: Vallari Agrawal <[email protected]>
Signed-off-by: Vallari Agrawal <[email protected]>
There was a problem hiding this 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:
- The logfile path should probably be configurable, but adding a configuration system should probably be its own PR
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 😄
Signed-off-by: Vallari Agrawal <[email protected]>
@kamoltat should we merge this PR? I think this was approved over call. And the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add two query params
dry_run
(bool) andlogs
(bool).If
dry_run
is true, don't schedule suite and return logs (regardless of the value oflogs
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