-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[grid] Tracking SessionRemovalInfo when removing session from SessionMap #16678
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
Conversation
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
PR Compliance Guide πBelow is a summary of compliance checks for this PR:
Compliance status legendπ’ - Fully Compliantπ‘ - Partial Compliant π΄ - Not Compliant βͺ - Requires Further Human Verification π·οΈ - Compliance label |
|||||||||||||||||||||||||||||||||
PR Code Suggestions β¨Explore these optional code suggestions:
|
|||||||||||||||||
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
User description
π Related Issues
π₯ What does this PR do?
SeleniumHQ/docker-selenium#3025 - Selenium Grid throwing NoSuchSessionException β Session ID not found
There are 3 events to trigger the removal of the session from LocalSessionMap. Possibility session closed on demand (QUIT command) or timed out, Node restarted, or Node removed (detach from grid and shutdown)
Based on triggered event, reason will be attached with closed timestamp for more info instead of a common message
π§ Implementation Notes
π‘ Additional Considerations
π Types of changes
PR Type
Enhancement
Description
Add session closure reason tracking throughout grid lifecycle
Create SessionClosedReason enum with four closure scenarios
Track recently removed sessions with removal info for diagnostics
Enhance NoSuchSessionException with detailed closure reasons
Update SessionId to carry close reason metadata
Diagram Walkthrough
File Walkthrough
8 files
New enum for session closure reasonsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒNew class to track session removal detailsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β ΒAdd reason parameter to SessionClosedEventΒ Β Β Β Β Β Β Β Β Β Β Β Β Β ΒAdd close reason tracking to SessionIdΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒPass SessionClosedReason to slot stop methodΒ Β Β Β Β Β Β Β Β Β Β Β ΒAccept and propagate SessionClosedReasonΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ΒTrack removed sessions with Caffeine cacheΒ Β Β Β Β Β Β Β Β Β Β Β Β Β ΒInclude close reason in exception messagesΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β1 files
Add tests for session closure reasonsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β1 files
Add Caffeine cache dependencyΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β