Skip to content

fix: Fix flaky macos test runner apply subprocess unit tests - #7203

Merged
ntkathole merged 1 commit into
feast-dev:masterfrom
ntkathole:fix_flaky_macos
Nov 21, 2026
Merged

ntkathole merged 1 commit into
feast-dev:masterfrom
ntkathole:fix_flaky_macos

Conversation

@ntkathole

@ntkathole ntkathole commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace CliRunner.local_repo() / feast apply subprocess setup in test_feature_server.py with an in-process FeatureStore + store.apply() helper.
  • Keeps the same real-store REST coverage (push → online → get-online-features, missing push source, feature-view metadata, non-finite floats) without spawning a cold child interpreter.
  • Sets repo_path to the temp dir so get_app() lifespan does not fall back to cwd when looking for static_artifacts.py.

Why

macOS unit CI (unit-test-python, pytest-xdist) has been flaking on:

ERROR test_feature_server.py::test_push_and_get
AssertionError: stdout: b''
stderr: b"Command timed out after 120s (attempt 2/2): ['apply']"

Previous mitigations (subprocess timeouts, one retry in #6592) treated the symptom. The flake is cold-start cost of a fresh Python process importing Feast/pandas/pyarrow under loaded macOS runners — retries still fail when both attempts exceed 120s.

CliRunner needs a subprocess for CLI tests that dynamically import a feature repo module. These feature-server tests only need a pushable online FeatureView, so in-process apply is the appropriate unit-test setup (same pattern as other local registry fixtures).

Impact

  • Removes the macOS apply-timeout flake for these fixtures.
  • Speeds setup from tens/hundreds of seconds to sub-second after warm import.
  • Does not change CLI feast apply coverage elsewhere; only this file’s fixtures.

Test plan

  • pytest sdk/python/tests/unit/test_feature_server.py (40 passed locally)
  • Confirm macOS unit-test-python legs are green on this PR

Devin Review

Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
@ntkathole ntkathole self-assigned this Nov 21, 2026
@ntkathole
ntkathole requested a review from a team as a code owner November 21, 2026 06:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Devin Review: 4 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.63%. Comparing base (39598f5) to head (e53ee14).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7203      +/-   ##
==========================================
- Coverage   53.63%   53.63%   -0.01%     
==========================================
  Files         462      462              
  Lines       58538    58538              
  Branches     8632     8632              
==========================================
- Hits        31397    31396       -1     
  Misses      25006    25006              
- Partials     2135     2136       +1     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 55.21% <ø> (-0.01%) ⬇️
see 1 file with indirect coverage changes

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39598f5...e53ee14. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntkathole
ntkathole merged commit 10f981f into feast-dev:master Nov 21, 2026
36 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants