Repository navigation
fix: isolate Appium session idempotency keys - #1338
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
|
|
Author
|
/easycla |
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.
Summary
AppiumConnection.get_remote_connection_headers()currently stores each new-sessionX-Idempotency-Keyin the class-levelextra_headersdictionary. Concurrent session creation can overwrite that shared value before headers are returned, giving separate/sessionrequests the same idempotency key. Keep the per-request key in a local copy while preserving the existing custom-header cleanup behavior for non-session requests.Adds a deterministic barrier-based unit regression test that forces two synthetic
/sessionheader builds to overlap and checks the keys remain distinct.Validation
uv run --no-sync pytest -q test/unit/webdriver/appium_connection_test.py— passed.uv run --no-sync pytest -q test/unit— passed on Windows, Python 3.13.8.The change and regression test were prepared with AI assistance and validated locally by the contributor.