Skip to content

fix: isolate Appium session idempotency keys - #1338

Open
dajiaohuang wants to merge 1 commit into
appium:masterfrom
dajiaohuang:w15/concurrent-idempotency-headers
Open

dajiaohuang wants to merge 1 commit into
appium:masterfrom
dajiaohuang:w15/concurrent-idempotency-headers

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

AppiumConnection.get_remote_connection_headers() currently stores each new-session X-Idempotency-Key in the class-level extra_headers dictionary. Concurrent session creation can overwrite that shared value before headers are returned, giving separate /session requests 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 /session header 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.
  • Ruff check and format check on both changed files — passed.
  • No Appium server, real device, application, or remote account was used.

The change and regression test were prepared with AI assistance and validated locally by the contributor.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: dajiaohuang / name: dajiaohuang (1a468fd)

@KazuCocoa KazuCocoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign the CLA

@dajiaohuang

Copy link
Copy Markdown
Author

/easycla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants