Fix preStop behavior for KEDA scale-down#2625
Open
kool79 wants to merge 2 commits intoSeleniumHQ:trunkfrom
Open
Fix preStop behavior for KEDA scale-down#2625kool79 wants to merge 2 commits intoSeleniumHQ:trunkfrom
kool79 wants to merge 2 commits intoSeleniumHQ:trunkfrom
Conversation
Updated the preStop hook to decouple it from Selenium node command-line arguments. This prevents random node terminations during KEDA scale-down.
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
Contributor
Review Summary by QodoFix preStop hook for reliable KEDA scale-down behavior
WalkthroughsDescription• Replace fragile preStop hook relying on node command-line arguments • Use health check polling instead of process-specific tail command • Ensure compatibility with standard Docker Selenium node images • Fix POSIX compliance by removing "s" from sleep command Diagramflowchart LR
A["Old preStop Hook<br/>tail + sleep 30s"] -->|"Fragile, node-specific"| B["Failed on standard<br/>Docker images"]
C["New preStop Hook<br/>Health check polling"] -->|"Robust, image-agnostic"| D["Works with all<br/>node configurations"]
File Changes1. website_and_docs/content/blog/2022/scaling-grid-with-keda.md
|
Contributor
Code Review by Qodo
1.
|
apply fix for all axamples
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.
Description
Updated the preStop hook in example to decouple it from Selenium node command-line arguments. This prevents random node terminations during KEDA scale-down when use the standard docker images for nodes.
Removed "s" from the 'sleep' command to ensure compatibility with POSIX
Motivation and Context
The previous implementation of the preStop hook relied on Selenium node command-line arguments to delay shutdown until session finished. This made the logic fragile and dependent on how the node process was started, which could vary between environments or deployments.
In practice, this approach failed for the standard Docker Chrome node container, where the expected command-line structure is different.
As a result, during KEDA scale-down events, nodes were sometimes terminated unexpectedly before properly handling ongoing sessions.
Types of changes
Checklist