Skip to content

Increase expansion service startup wait timeout to 180s in run_expansion_services.sh - #41219

Draft
damccorm wants to merge 1 commit into
masterfrom
fix/expansion-service-startup-wait-timeout
Draft

damccorm wants to merge 1 commit into
masterfrom
fix/expansion-service-startup-wait-timeout

Conversation

@damccorm

@damccorm damccorm commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes Timed out waiting 60s for Python expansion service failures in validatesCrossLanguageRunnerSetup across PostCommit XVR PythonUsingJava Dataflow (run 43071232200 and run 42591167549).

Root Cause

Before apache_beam.runners.portability.expansion_service_test binds its gRPC server port, ExpansionServiceServicer initializes its default environment and invokes pip download beautifulsoup4>=4.9,<5.0 (as well as fitting the test sklearn SVM artifact). When PyPI experiences a transient socket timeout/retry (pip's default timeout is 15s × up to 5 retries = 75s), wait_for_port in sdks/python/scripts/run_expansion_services.sh times out at 60s before the server starts listening.

Fix

Increase the wait_for_port timeout in sdks/python/scripts/run_expansion_services.sh from 60s to 180s.

Verification

  • Triggered beam_PostCommit_XVR_PythonUsingJava_Dataflow.yml workflow run on branch: 43083880271

@damccorm damccorm added the test-failure-cleanup Automated test health and flake cleanup PRs label Nov 11, 2026
@damccorm

Copy link
Copy Markdown
Contributor Author

/gemini review

@github-actions github-actions 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.

📋 Review Summary

This PR increases the startup wait timeout in sdks/python/scripts/run_expansion_services.sh from 60 seconds to 180 seconds. This resolves flaky timeouts during cross-language runner setup when the Python expansion service experiences transient PyPI network retries while downloading test dependencies (beautifulsoup4) before binding its gRPC port.

🔍 General Feedback

  • The root cause analysis and timeout adjustment are clear, well-scoped, and safe to merge.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@github-actions github-actions Bot added python size/xs XS: <10 lines changed labels Nov 11, 2026
@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.54%. Comparing base (e62a1de) to head (f82ca52).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #41219   +/-   ##
=========================================
  Coverage     58.54%   58.54%           
  Complexity     2277     2277           
=========================================
  Files          1132     1132           
  Lines        169699   169712   +13     
  Branches       1485     1485           
=========================================
+ Hits          99351    99361   +10     
- Misses        67806    67809    +3     
  Partials       2542     2542           
Flag Coverage Δ
python 80.54% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@damccorm damccorm added the ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review size/xs XS: <10 lines changed test-failure-cleanup Automated test health and flake cleanup PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant