Title: test: Retry CliRunner apply subprocess on timeout to reduce flakiness by nikolauspschuetz · Pull Request #6592 · feast-dev/feast · GitHub
Open Graph Title: test: Retry CliRunner apply subprocess on timeout to reduce flakiness by nikolauspschuetz · Pull Request #6592 · feast-dev/feast
X Title: test: Retry CliRunner apply subprocess on timeout to reduce flakiness by nikolauspschuetz · Pull Request #6592 · feast-dev/feast
Description: What changed CliRunner.run() (the helper that runs feast apply in a fresh child interpreter for unit tests) now retries once on subprocess.TimeoutExpired instead of treating the first timeout as terminal. The per-attempt timeout is unchanged (120s); the timeout message now includes the attempt counter. Why The unit-test workflow flaked on unit-test-python (3.11, macos-14) while setting up test_feature_server.py::test_push_and_get: ERROR sdk/python/tests/unit/test_feature_server.py::test_push_and_get AssertionError: stdout: b'' stderr: b"Command timed out after 120s: [\x27apply\x27]" 2259 passed, 47 skipped, 1 error run() spawns a new Python interpreter (sys.executable feast.cli apply) — deliberately, for feature-repo import isolation — which has to import Feast (pandas/pyarrow/protobuf/...) from cold. On a loaded macOS runner that cold start can occasionally exceed the 120s guard. The same commit passed on macos-14 / 3.12 and on all three Ubuntu legs, which is the signature of an environmental cold-start stall rather than a code fault. Crucially, commands routed through run() (e.g. apply) do not materialize, so they cannot trigger the Dask atexit hang that run_with_output() and the module docstring describe. A timeout here is therefore almost always transient slowness, not a deadlock — so a single retry with warm OS/page caches clears it, while a genuine repeated stall still fails once the attempts are exhausted. Retries are intentionally not added to run_with_output(), whose commands can legitimately hang and whose existing machinery recovers partial output rather than retrying. This builds directly on the CliRunner subprocess stabilization in #6560. Validation uv run ruff check sdk/python/tests/utils/cli_repo_creator.py — passed uv run ruff format --check sdk/python/tests/utils/cli_repo_creator.py — already formatted Retry logic verified by monkeypatching subprocess.run: transient timeout on attempt 1 → recovered on attempt 2 (returncode == 0) always timing out → returncode == -1, message ... (attempt 2/2): [...], no exception raised success on first attempt → exactly one subprocess call (no behavior change for the passing path) Note: the full unit suite could not be collected on my machine (local venv lacks the google.cloud test extra pulled by conftest.py); the change is confined to the retry loop, which is covered by the targeted verification above. Separate from #6591 (which surfaced this flake).
Open Graph Description: What changed CliRunner.run() (the helper that runs feast apply in a fresh child interpreter for unit tests) now retries once on subprocess.TimeoutExpired instead of treating the first timeout as te...
X Description: What changed CliRunner.run() (the helper that runs feast apply in a fresh child interpreter for unit tests) now retries once on subprocess.TimeoutExpired instead of treating the first timeout as te...
Opengraph URL: https://github.com/feast-dev/feast/pull/6592
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3e73c3b5-9d9c-787a-d395-176900729101 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A5BE:1111EE:979EE3:CCB0CD:6A51E129 |
| html-safe-nonce | 6db4d460e475d829e41b513c584a5ce4485989e649500c92dfd4a8c671545220 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUJFOjExMTFFRTo5NzlFRTM6Q0NCMENEOjZBNTFFMTI5IiwidmlzaXRvcl9pZCI6IjQwMTc3MjE4MDcyOTc3MDAxMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8d6a677a3c5f6de8331204cd83584fc1c0f76099a953dfc7d5bdeb3a452d82e4 |
| hovercard-subject-tag | pull_request:4020051033 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6592/files |
| twitter:image | https://avatars.githubusercontent.com/u/8151217?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8151217?s=400&v=4 |
| og:image:alt | What changed CliRunner.run() (the helper that runs feast apply in a fresh child interpreter for unit tests) now retries once on subprocess.TimeoutExpired instead of treating the first timeout as te... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width