Docker: Fix video.sh busy-loop when se:recordVideo=false (#3164)#3165
Merged
VietND96 merged 1 commit intoJul 4, 2026
Merged
Conversation
…3164) When a session capability sets se:recordVideo=false, the recorder's polling loop skipped the sleep before looping back to re-check the node status, since the sleep only ran inside the `caps_se_video_record = "true"` branch. With recording_started staying false and the same session id still active, this caused a tight loop (curl + jq + python3 video_nodeQuery.py subprocess) with no delay for the entire remaining duration of that session, consuming CPU shared with the browser process (most noticeable with videoRecorder.sidecarContainer=false). Add the missing sleep after the if/else, and track the last skipped session id so the script does not keep re-invoking video_nodeQuery.py for a session that was already decided not to be recorded. Fixes SeleniumHQ#3164 Signed-off-by: Bartek Kępka <bartekkepka6@gmail.com>
Contributor
PR Summary by QodoFix video.sh busy-loop when se:recordVideo=false
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Contributor
Code Review by Qodo
Context used 1. Misleading skip reason log
|
VietND96
approved these changes
Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a session capability sets se:recordVideo=false, the recorder's polling loop skipped the sleep before looping back to re-check the node status, since the sleep only ran inside the
caps_se_video_record = "true"branch. With recording_started staying false and the same session id still active, this caused a tight loop (curl + jq + python3 video_nodeQuery.py subprocess) with no delay for the entire remaining duration of that session, consuming CPU shared with the browser process (most noticeable withvideoRecorder.sidecarContainer=false).
Add the missing sleep after the if/else, and track the last skipped session id so the script does not keep re-invoking video_nodeQuery.py for a session that was already decided not to be recorded.
Fixes #3164
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Types of changes
Checklist
Closes #3164