5353 DEVELOCITY_ACCESS_KEY : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5454 GRADLE_ENTERPRISE_CACHE_USERNAME : ${{ secrets.GE_CACHE_USERNAME }}
5555 GRADLE_ENTERPRISE_CACHE_PASSWORD : ${{ secrets.GE_CACHE_PASSWORD }}
56+ # Aggressive stability settings for flaky CI environment
57+ PYTHONHASHSEED : " 0"
58+ OMP_NUM_THREADS : " 1"
59+ OPENBLAS_NUM_THREADS : " 1"
60+ # gRPC stability - more conservative for unstable networks
61+ GRPC_ARG_KEEPALIVE_TIME_MS : " 10000"
62+ GRPC_ARG_KEEPALIVE_TIMEOUT_MS : " 15000"
63+ GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS : " 1"
64+ GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA : " 0"
65+ GRPC_ARG_MAX_RECONNECT_BACKOFF_MS : " 30000"
66+ # Beam-specific - very generous timeouts
67+ BEAM_RETRY_MAX_ATTEMPTS : " 5"
68+ BEAM_RETRY_INITIAL_DELAY_MS : " 5000"
69+ BEAM_RETRY_MAX_DELAY_MS : " 120000"
70+ # Force stable execution
71+ BEAM_TESTING_FORCE_SINGLE_BUNDLE : " true"
72+ BEAM_TESTING_DETERMINISTIC_ORDER : " true"
5673
5774jobs :
5875 beam_PreCommit_Python :
@@ -91,6 +108,23 @@ jobs:
91108 PY_VER_CLEAN=${PY_VER//.}
92109 echo "py_ver_clean=$PY_VER_CLEAN" >> $GITHUB_OUTPUT
93110 - name : Run pythonPreCommit
111+ env :
112+ TOX_TESTENV_PASSENV : " DOCKER_*,TESTCONTAINERS_*,TC_*,BEAM_*,GRPC_*,OMP_*,OPENBLAS_*,PYTHONHASHSEED,PYTEST_*"
113+ # Aggressive retry and timeout settings for flaky CI
114+ PYTEST_ADDOPTS : " -v --tb=short --maxfail=5 --durations=30 --reruns=5 --reruns-delay=15 --timeout=600 --disable-warnings"
115+ # Container stability - much more generous timeouts
116+ TC_TIMEOUT : " 300"
117+ TC_MAX_TRIES : " 15"
118+ TC_SLEEP_TIME : " 5"
119+ # Additional gRPC stability for flaky environment
120+ GRPC_ARG_MAX_CONNECTION_IDLE_MS : " 60000"
121+ GRPC_ARG_HTTP2_BDP_PROBE : " 1"
122+ GRPC_ARG_SO_REUSEPORT : " 1"
123+ # Force sequential execution to reduce load
124+ PYTEST_XDIST_WORKER_COUNT : " 1"
125+ # Additional gRPC settings
126+ GRPC_ARG_MAX_RECONNECT_BACKOFF_MS : " 120000"
127+ GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS : " 2000"
94128 uses : ./.github/actions/gradle-command-self-hosted-action
95129 with :
96130 gradle-command : :sdks:python:test-suites:tox:py${{steps.set_py_ver_clean.outputs.py_ver_clean}}:preCommitPy${{steps.set_py_ver_clean.outputs.py_ver_clean}}
@@ -110,4 +144,14 @@ jobs:
110144 commit : ' ${{ env.prsha || env.GITHUB_SHA }}'
111145 comment_mode : ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
112146 files : ' **/pytest*.xml'
113- large_files : true
147+ large_files : true
148+ - name : Cleanup
149+ if : always()
150+ run : |
151+ # Kill any remaining processes
152+ sudo pkill -f "gradle" || true
153+ sudo pkill -f "java" || true
154+ sudo pkill -f "python.*pytest" || true
155+ # Clean up temp files
156+ sudo rm -rf /tmp/beam-* || true
157+ sudo rm -rf /tmp/gradle-* || true
0 commit comments