Skip to content

refactor: simplify find_executable using shutil.which - #35

Closed
Dor-bl wants to merge 1 commit into
masterfrom
claude/vigilant-mccarthy-39sqp2
Closed

Dor-bl wants to merge 1 commit into
masterfrom
claude/vigilant-mccarthy-39sqp2

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Clean copy of refactor/simplify-find-executable-14895471279632432151, rebuilt on top of upstream appium/python-client master so it carries only the refactor commit.

The original branch was based on this fork's master, which includes an unrelated commit (2834058 ci: only run the release workflow on the upstream repository, touching .github/workflows/publish.yml). That commit is not on this branch.

Changes

  • appium/webdriver/appium_service.py: replace the hand-rolled PATH search in find_executable with shutil.which.
  • test/unit/webdriver/appium_service_test.py: add a unit test for it.

Testing

  • pytest test/unit/webdriver/appium_service_test.py: 5 passed.

Dor-bl commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

flutter_e2e_test (macos-15, flutter-ios) failed with 2 errors and 10 passes. Both errors are in fixture setup (test_wait_command, test_scroll_till_visible_command). In each, POST /session to the Appium server took longer than the 600s read timeout while the iOS simulator was starting the Flutter session.

This doesn't look caused by this PR. The diff only changes how AppiumService.find_executable looks up a binary (now via shutil.which), and these tests connect to an Appium server that's already running instead of going through find_executable. The Android Flutter job, the Android functional job and all unit tests passed. No fix exists to port, so I'm re-running the failed job once.


Generated by Claude Code

Dor-bl commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

The re-run of ios_test (safari_tests.py) failed the same way: test_context errored in setup because POST /session exceeded the 600s read timeout, and the other test passed. On that runner the "Prepare iOS simulator" step took about 18 minutes; it took about 7 minutes on the last green run.

This looks like flaky macOS simulator infrastructure, not this change:

  • These tests connect to an Appium server the workflow already started, so they never call find_executable.
  • Run 39206721068 (test: add unit tests for format_stacktrace, which only touches tests) failed flutter_e2e_test (macos-15, flutter-ios) in the same way yesterday.

No fix exists to port, and the one re-run is used up, so I'm leaving CI as it is. The PR is still watched.


Generated by Claude Code

Replace manual PATH lookup logic in find_executable with shutil.which.
Add corresponding unit test coverage.
@Dor-bl
Dor-bl force-pushed the claude/vigilant-mccarthy-39sqp2 branch from 1b38825 to 2b5d845 Compare October 20, 2026 19:22
@Dor-bl Dor-bl closed this Oct 20, 2026
@Dor-bl
Dor-bl deleted the claude/vigilant-mccarthy-39sqp2 branch October 20, 2026 19:29
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.

1 participant