Merging to release-5.8: when worker node is on emergency node, do not panic when using a new jwt token (#5534) #7549
+1
−0
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.



User description
when worker node is on emergency node, do not panic when using a new jwt token (#5534)
Description
When worker node is on Emergency mode, anyway return a session with a
session key set so it doesn't panic
Related Issue
TT-9970
Motivation and Context
Better experience in MDCB
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
functionality to change)
coverage to functionality)
Checklist
why it's required
explained why
Co-authored-by: andrei-tyk [email protected]
PR Type
Bug fix
Description
Prevent panic in MDCB emergency mode
Set
session.KeyIDfor new JWT tokensReturn safe cloned session when RPC emergency
Diagram Walkthrough
File Walkthrough
middleware.go
Set session key to avoid panic in emergencygateway/middleware.go
session.KeyIDtokeysession.Clone(), falseto avoid nil key-induced panic