Repository navigation
test: stop slow CI Health V2 suite from timing out - #6391
Merged
lucasjia-aws merged 1 commit intoOct 7, 2026
Merged
Conversation
- jumpstart: run gated training jobs through fit_estimator_with_capacity_xfail so a job stuck in Pending waiting for ml.g5 capacity becomes an xfail after 30 minutes instead of blocking the build; let the helper forward fit() kwargs (accept_eula) - clarify monitor: upload the model under a per-run key, and move the abalone model uploads off the shared integ-test-data/xgboost/model key, so concurrently running tests cannot swap in a model the xgboost:1 image cannot load (Clarify shadow endpoint ping failures) - clarify monitor: cut reruns of the scheduled-execution tests from 5 to 1, since each attempt waits for the next hourly execution - feature processor: serialize local Spark runs across xdist workers with a file lock, so concurrent spark-submit --packages downloads do not corrupt the shared ivy cache
jam-jee
approved these changes
Oct 7, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The scheduled CI Health V2 slow-tests-v2 job (run against master-v2) hit the 180-minute CodeBuild timeout in 9 of the last 16 runs, including https://github.com/aws/sagemaker-python-sdk/actions/runs/37570212277. When that happens the GitHub job only reports "The security token included in the request is expired", because the workflow's 3-hour AWS session expires at the same moment. This PR fixes the test-side causes of the timeouts and one recurring failure. No SDK source changes. Follow-up to #6386.
Root causes and fixes
JumpStart gated training tests block for hours:
test_gated_model_training_v1/v2train on ml.g5.12xlarge withestimator.fit()andmax_run=259200. When capacity is short the job sits inPendingwithout failing, so@x_fail_if_icenever fires (e.g. 524 and 449 minutes of Pending on 2026-10-07, 1348 and 1521 minutes on 2026-10-02). These tests, andtest_jumpstart_hub_gated_estimator_with_eula, now use the existingfit_estimator_with_capacity_xfail, which stops a job that has not been granted capacity after 30 minutes and raises a CapacityError thatx_fail_if_iceturns into an xfail. The helper gains**fit_kwargsso the hub test can still passaccept_eula=True.test_run_explainability_monitor reruns until the build times out: On 2026-09-29, 10-03 and 10-04 every explainability monitoring execution failed with "The primary container for production variant AllTraffic did not pass the ping health check" on the Clarify shadow endpoint. The shadow endpoint re-downloads the model from
session-default-prefix/integ-test-data/xgboost/model/xgb_model.tar.gz, and that key is shared by tests uploading two different files:tests/data/xgboost_model(the model thexgboost:1image serves) andtests/data/xgboost_abalone/ the identical experiments transform model (a newer XGBoost pickle). When an abalone upload from a concurrently running suite lands between the clarify endpoint deploy and the shadow endpoint creation, the shadow endpoint cannot load the model. On 2026-10-03 the last model created from that key before the shadow endpoint was test_model_package's abalone model; on good days it was an xgboost_model test. Withreruns=5and each attempt waiting for the next hourly scheduled execution, one bad day costs about six hours. The clarify fixture now uploads under a per-run key, the 13 abalone uploads move tointeg-test-data/xgboost_abalone/model, and the twotest_run_*_monitortests drop toreruns=1.Feature processor tests fail when two start Spark at once: Local feature_processor runs start a JVM whose
spark-submit --packagesresolves hadoop-aws/hadoop-common into the shared~/.ivy2cache. When two xdist workers do this at the same moment on a cold cache the downloads collide ("Downloaded file size (0) doesn't match expected Content Length") and the JVM exits with "Java gateway process exited before sending its port number". This failedtest_feature_processor_transform_with_customized_data_sourceon 2026-10-06 andtest_feature_processor_transform_online_only_store_ingestionon 2026-10-07. Alocal_spark_lockfixture (a host-wideFileLock) now runs the three local Spark tests one at a time; each takes under about 70 seconds.Not included
test_ldafailed on 2026-10-07 because canaries-v2-release, which runs the tests of the latest released v2 tag, still contains the account-wide endpoint cleanup removed in #6386 and deleted the test's endpoint mid-deploy. That resolves with the next v2 release.Testing
black (24.3.0) and flake8 (7.1.2) pass on all changed files, and
pytest --collect-onlycollects every changed module with the new fixtures resolving. Offline checks coveredfit_estimator_with_capacity_xfailforwardingaccept_eula, its unchanged behavior without extra kwargs, and its stop-and-raise path on capacity timeout, plus the file lock serializing tests across separate xdist worker processes. The integ tests themselves were not run locally because they need the CI account; they will be exercised by the next CI Health V2 run.