Skip to content

perf: cache SDK version metadata - #302

Open
Linxiushen wants to merge 1 commit into
OpenHands:mainfrom
Linxiushen:perf/cache-sdk-version
Open

perf: cache SDK version metadata#302
Linxiushen wants to merge 1 commit into
OpenHands:mainfrom
Linxiushen:perf/cache-sdk-version

Conversation

@Linxiushen

Copy link
Copy Markdown
Contributor

Summary

  • cache the installed OpenHands SDK version for the process lifetime
  • avoid repeated synchronous package-metadata filesystem lookups on every telemetry event
  • add a regression test that verifies repeated reads perform one metadata lookup

Testing

  • pytest tests/test_version.py --noconftest -q
  • ruff check openhands/automation/utils/version.py tests/test_version.py
  • ruff format --check openhands/automation/utils/version.py tests/test_version.py

Fixes #289

Disclosure: This change was prepared with AI assistance. I reviewed the implementation and ran the checks listed above.

@github-actions github-actions Bot added the type: perf A performance improvement label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: perf A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry looks up the SDK version via importlib.metadata on every captured event

1 participant