Skip to content

Commit cd7fd9c

Browse files
authored
Merge branch 'master' into fix/sagemaker-client-honor-session
2 parents 02af58b + e69cc40 commit cd7fd9c

17 files changed

Lines changed: 54 additions & 102 deletions

‎.github/workflows/ci-health-v3-master.yml‎

Lines changed: 24 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
permissions:
99
id-token: write # This is required for requesting the JWT
1010

11+
# Credentials are requested for 6h (the GithubActionsRole max session duration)
12+
# so the aws-codebuild-run-build step can keep polling for the whole build. The
13+
# canary CodeBuild timeout is set just under this (5.5h in CDK) so a hung build
14+
# is recorded by CodeBuild as TIMED_OUT (counted in FailedBuilds) instead of the
15+
# GitHub job being cancelled first.
1116
jobs:
1217
unit-test-v3:
1318
runs-on: ubuntu-latest
@@ -21,7 +26,7 @@ jobs:
2126
with:
2227
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
2328
aws-region: us-west-2
24-
role-duration-seconds: 10800
29+
role-duration-seconds: 21600
2530
- name: Run Unit Tests V3 for ${{ matrix.submodule }}
2631
uses: aws-actions/aws-codebuild-run-build@v1
2732
with:
@@ -31,8 +36,13 @@ jobs:
3136
SUBMODULE
3237
env:
3338
SUBMODULE: ${{ matrix.submodule }}
39+
# Per-submodule integ canaries. These also cover the us-west-2 gpu_intensive
40+
# tests (train, serve) and, in sagemaker-serve, the Bedrock import_model tests
41+
# (run in a dedicated serial step inside the canary buildspec because the
42+
# "Concurrent model import jobs" quota is fixed at 1).
3443
canaries-v3-master:
3544
runs-on: ubuntu-latest
45+
timeout-minutes: 360
3646
strategy:
3747
fail-fast: false
3848
matrix:
@@ -43,7 +53,7 @@ jobs:
4353
with:
4454
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
4555
aws-region: us-west-2
46-
role-duration-seconds: 10800
56+
role-duration-seconds: 21600
4757
- name: Run Canaries V3 master for ${{ matrix.submodule }}
4858
uses: aws-actions/aws-codebuild-run-build@v1
4959
with:
@@ -53,24 +63,9 @@ jobs:
5363
SUBMODULE
5464
env:
5565
SUBMODULE: ${{ matrix.submodule }}
56-
# GPU integ tests against the master source. Two region jobs trigger the same
57-
# CodeBuild project name (deployed in both regions); only the region/creds and
58-
# the region-override buildspec differ. Their results are AND-ed with
59-
# import-model in report-result into a single per-run pass/fail metric.
60-
gpu-integ-tests-master:
61-
runs-on: ubuntu-latest
62-
steps:
63-
- name: Configure AWS Credentials
64-
uses: aws-actions/configure-aws-credentials@v4
65-
with:
66-
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
67-
aws-region: us-west-2
68-
role-duration-seconds: 10800
69-
- name: Run GPU Integ Tests (master)
70-
uses: aws-actions/aws-codebuild-run-build@v1
71-
with:
72-
project-name: sagemaker-python-sdk-ci-health-gpu-integ-tests-master
73-
source-version: refs/heads/master
66+
# us_east_1-marked GPU integ tests against the master source. These run in the
67+
# separate us-east-1 (Nova) account, so they cannot be part of the us-west-2
68+
# canaries. Their result is reported to us-west-2 by report-result.
7469
gpu-integ-tests-master-us-east-1:
7570
runs-on: ubuntu-latest
7671
steps:
@@ -79,39 +74,21 @@ jobs:
7974
with:
8075
role-to-assume: ${{ secrets.CI_AWS_ROLE_US_EAST_1_ARN }}
8176
aws-region: us-east-1
82-
role-duration-seconds: 10800
77+
role-duration-seconds: 21600
8378
- name: Run GPU Integ Tests (master, us-east-1)
8479
uses: aws-actions/aws-codebuild-run-build@v1
8580
with:
8681
project-name: sagemaker-python-sdk-ci-health-gpu-integ-tests-master
8782
source-version: refs/heads/master
88-
# Bedrock model-import integ tests. Run serially (concurrency 1) in their own
89-
# CodeBuild project because the "Concurrent model import jobs" Bedrock quota is
90-
# fixed at 1 and not raisable; running them in parallel (as PR checks did)
91-
# makes them collide and flake. us-west-2 only (no us_east_1-marked tests).
92-
# Folded into the master run-level pass/fail metric alongside the GPU jobs.
93-
import-model-integ-tests:
94-
runs-on: ubuntu-latest
95-
steps:
96-
- name: Configure AWS Credentials
97-
uses: aws-actions/configure-aws-credentials@v4
98-
with:
99-
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
100-
aws-region: us-west-2
101-
role-duration-seconds: 10800
102-
- name: Run Bedrock Model-Import Integ Tests
103-
uses: aws-actions/aws-codebuild-run-build@v1
104-
with:
105-
project-name: sagemaker-python-sdk-ci-health-import-model-integ-tests
106-
source-version: refs/heads/master
107-
# Run-level result: the master GPU run is successful only if the us-west-2,
108-
# us-east-1, and import-model jobs all succeeded. Emits GpuIntegMasterRunFailure
109-
# = 1 (failed) / 0 (succeeded) to CloudWatch in us-west-2. The CDK alarm
83+
# Run-level result for the us-east-1 GPU job. Its CodeBuild FailedBuilds metric
84+
# lives in the us-east-1 account, which the us-west-2 CIHealthCompositeAlarm-V3
85+
# cannot see, so the result is re-emitted to us-west-2 as
86+
# GpuIntegMasterRunFailure = 1 (failed) / 0 (succeeded). The CDK alarm
11087
# (GpuIntegMasterRunAlarm) sums this over a UTC day; it is folded into
11188
# CIHealthCompositeAlarm-V3, which owns ticketing. Only scheduled runs emit the
11289
# metric (manual workflow_dispatch runs are excluded).
11390
report-result:
114-
needs: [gpu-integ-tests-master, gpu-integ-tests-master-us-east-1, import-model-integ-tests]
91+
needs: [gpu-integ-tests-master-us-east-1]
11592
if: always()
11693
runs-on: ubuntu-latest
11794
steps:
@@ -129,14 +106,12 @@ jobs:
129106
echo "Not a scheduled run (${{ github.event_name }}); skipping metric emission."
130107
exit 0
131108
fi
132-
if [ "${{ needs.gpu-integ-tests-master.result }}" == "success" ] && \
133-
[ "${{ needs.gpu-integ-tests-master-us-east-1.result }}" == "success" ] && \
134-
[ "${{ needs.import-model-integ-tests.result }}" == "success" ]; then
109+
if [ "${{ needs.gpu-integ-tests-master-us-east-1.result }}" == "success" ]; then
135110
value=0
136-
echo "All master GPU/import jobs succeeded; emitting GpuIntegMasterRunFailure=0"
111+
echo "us-east-1 master GPU job succeeded; emitting GpuIntegMasterRunFailure=0"
137112
else
138113
value=1
139-
echo "At least one master GPU/import job did not succeed; emitting GpuIntegMasterRunFailure=1"
114+
echo "us-east-1 master GPU job did not succeed; emitting GpuIntegMasterRunFailure=1"
140115
fi
141116
aws cloudwatch put-metric-data \
142117
--namespace GpuIntegRunMetrics \

‎.github/workflows/ci-health-v3-release.yml‎

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ on:
88
permissions:
99
id-token: write # This is required for requesting the JWT
1010

11+
# Credentials are requested for 6h (the GithubActionsRole max session duration)
12+
# so the aws-codebuild-run-build step can keep polling for the whole build. The
13+
# canary CodeBuild timeout is set just under this (5.5h in CDK) so a hung build
14+
# is recorded by CodeBuild as TIMED_OUT (counted in FailedBuilds) instead of the
15+
# GitHub job being cancelled first.
1116
jobs:
17+
# Per-submodule integ canaries against the published PyPI release. These also
18+
# cover the us-west-2 gpu_intensive tests (train, serve).
1219
canaries-v3-release:
1320
runs-on: ubuntu-latest
21+
timeout-minutes: 360
1422
strategy:
1523
fail-fast: false
1624
matrix:
@@ -21,7 +29,7 @@ jobs:
2129
with:
2230
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
2331
aws-region: us-west-2
24-
role-duration-seconds: 10800
32+
role-duration-seconds: 21600
2533
- name: Run Canaries V3 release for ${{ matrix.submodule }}
2634
uses: aws-actions/aws-codebuild-run-build@v1
2735
with:
@@ -31,24 +39,9 @@ jobs:
3139
SUBMODULE
3240
env:
3341
SUBMODULE: ${{ matrix.submodule }}
34-
# GPU integ tests against the published PyPI release. Two region jobs trigger
35-
# the same CodeBuild project name (deployed in both regions); only the
36-
# region/creds and the region-override buildspec differ. Their results are
37-
# AND-ed in report-result into a single per-run pass/fail metric.
38-
gpu-integ-tests-release:
39-
runs-on: ubuntu-latest
40-
steps:
41-
- name: Configure AWS Credentials
42-
uses: aws-actions/configure-aws-credentials@v4
43-
with:
44-
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
45-
aws-region: us-west-2
46-
role-duration-seconds: 10800
47-
- name: Run GPU Integ Tests (release)
48-
uses: aws-actions/aws-codebuild-run-build@v1
49-
with:
50-
project-name: sagemaker-python-sdk-ci-health-gpu-integ-tests-release
51-
source-version: refs/heads/master
42+
# us_east_1-marked GPU integ tests against the published PyPI release. These
43+
# run in the separate us-east-1 (Nova) account, so they cannot be part of the
44+
# us-west-2 canaries. Their result is reported to us-west-2 by report-result.
5245
gpu-integ-tests-release-us-east-1:
5346
runs-on: ubuntu-latest
5447
steps:
@@ -57,20 +50,21 @@ jobs:
5750
with:
5851
role-to-assume: ${{ secrets.CI_AWS_ROLE_US_EAST_1_ARN }}
5952
aws-region: us-east-1
60-
role-duration-seconds: 10800
53+
role-duration-seconds: 21600
6154
- name: Run GPU Integ Tests (release, us-east-1)
6255
uses: aws-actions/aws-codebuild-run-build@v1
6356
with:
6457
project-name: sagemaker-python-sdk-ci-health-gpu-integ-tests-release
6558
source-version: refs/heads/master
66-
# Run-level result: the release GPU run is successful only if both region jobs
67-
# succeeded. Emits GpuIntegReleaseRunFailure = 1 (failed) / 0 (succeeded) to
68-
# CloudWatch in us-west-2. The CDK alarm (GpuIntegReleaseRunAlarm) sums this
69-
# over a UTC day; it is folded into CIHealthCompositeAlarm-V3, which owns
70-
# ticketing. Only scheduled runs emit the metric (manual workflow_dispatch runs
71-
# are excluded).
59+
# Run-level result for the us-east-1 GPU job. Its CodeBuild FailedBuilds metric
60+
# lives in the us-east-1 account, which the us-west-2 CIHealthCompositeAlarm-V3
61+
# cannot see, so the result is re-emitted to us-west-2 as
62+
# GpuIntegReleaseRunFailure = 1 (failed) / 0 (succeeded). The CDK alarm
63+
# (GpuIntegReleaseRunAlarm) sums this over a UTC day; it is folded into
64+
# CIHealthCompositeAlarm-V3, which owns ticketing. Only scheduled runs emit the
65+
# metric (manual workflow_dispatch runs are excluded).
7266
report-result:
73-
needs: [gpu-integ-tests-release, gpu-integ-tests-release-us-east-1]
67+
needs: [gpu-integ-tests-release-us-east-1]
7468
if: always()
7569
runs-on: ubuntu-latest
7670
steps:
@@ -88,13 +82,12 @@ jobs:
8882
echo "Not a scheduled run (${{ github.event_name }}); skipping metric emission."
8983
exit 0
9084
fi
91-
if [ "${{ needs.gpu-integ-tests-release.result }}" == "success" ] && \
92-
[ "${{ needs.gpu-integ-tests-release-us-east-1.result }}" == "success" ]; then
85+
if [ "${{ needs.gpu-integ-tests-release-us-east-1.result }}" == "success" ]; then
9386
value=0
94-
echo "All release GPU jobs succeeded; emitting GpuIntegReleaseRunFailure=0"
87+
echo "us-east-1 release GPU job succeeded; emitting GpuIntegReleaseRunFailure=0"
9588
else
9689
value=1
97-
echo "At least one release GPU job did not succeed; emitting GpuIntegReleaseRunFailure=1"
90+
echo "us-east-1 release GPU job did not succeed; emitting GpuIntegReleaseRunFailure=1"
9891
fi
9992
aws cloudwatch put-metric-data \
10093
--namespace GpuIntegRunMetrics \

‎sagemaker-serve/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ python_classes = ["Test*"]
7474
python_functions = ["test_*"]
7575
addopts = "-v --tb=short"
7676
markers = [
77-
"skip_in_pr_check: mark a test that is excluded from PR check runs. Long-running or hang-prone tests that would otherwise push the run past the CodeBuild timeout; they run in a dedicated scheduled CI run instead.",
77+
"slow_test: mark a test that is excluded from PR check runs. Long-running or hang-prone tests that would otherwise push the run past the CodeBuild timeout; they run in a dedicated scheduled CI run instead.",
7878
]
7979

8080
[tool.black]

‎sagemaker-serve/tests/integ/test_ai_inference_recommender_enhancements_integration.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ def test_list_benchmarks_and_recommendations_plumbing():
9595
logger.info("Non-matching filters correctly returned empty lists.")
9696

9797

98-
@pytest.mark.slow_test
9998
@pytest.mark.gpu_intensive
10099
def test_recommendation_deploy_best_and_compare_e2e():
101100
"""Full flow across all three enhancements, sharing one rec job + endpoint:

‎sagemaker-serve/tests/integ/test_ai_inference_recommender_integration.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def _build_jumpstart_model_builder(role_arn):
7171

7272

7373
@pytest.mark.slow_test
74-
@pytest.mark.skip_in_pr_check
7574
def test_benchmark_workflow_end_to_end():
7675
"""Deploy a JumpStart endpoint, run a benchmark against it, parse the result."""
7776
logger.info("Starting AI inference recommender benchmark integration test...")
@@ -127,7 +126,6 @@ def test_benchmark_workflow_end_to_end():
127126
)
128127

129128

130-
@pytest.mark.slow_test
131129
@pytest.mark.gpu_intensive
132130
def test_recommendation_workflow_end_to_end():
133131
"""Run an AI recommendation via generate_deployment_recommendations and deploy the top recommendation."""

‎sagemaker-serve/tests/integ/test_ai_inference_recommender_sdkt_ic_integration.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def _src(uri):
6363
]
6464

6565

66-
@pytest.mark.slow_test
6766
@pytest.mark.gpu_intensive
6867
def test_deploy_sdkt_model_as_inference_component():
6968
"""A model carrying SD/KT AdditionalModelDataSources deploys as an

‎sagemaker-serve/tests/integ/test_in_process_integration.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def invoke(self, input_object, model):
5050
return {"result": result, "operation": f"multiply by {factor}"}
5151

5252

53-
@pytest.mark.slow_test
5453
def test_in_process_build_deploy_invoke_cleanup():
5554
"""Integration test for In-Process mode build, deploy, invoke, and cleanup workflow"""
5655
logger.info("Starting In-Process integration test...")

‎sagemaker-serve/tests/integ/test_jumpstart_deploy_parity.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
MODEL_NAME_PREFIX = "js-netiso-test"
2727

2828

29-
@pytest.mark.slow_test
3029
def test_jumpstart_build_enables_network_isolation():
3130
"""Integration test verifying JumpStart models are built with EnableNetworkIsolation.
3231
@@ -71,7 +70,6 @@ def test_jumpstart_build_enables_network_isolation():
7170
VOLUME_SIZE_INSTANCE_TYPE = "ml.inf2.xlarge"
7271

7372

74-
@pytest.mark.slow_test
7573
def test_jumpstart_build_sets_volume_size():
7674
"""Integration test verifying volume_size from model specs is propagated.
7775

‎sagemaker-serve/tests/integ/test_jumpstart_integration.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT = 15
3333

3434

35-
@pytest.mark.slow_test
3635
@pytest.mark.gpu_intensive
3736
def test_jumpstart_build_deploy_invoke_cleanup():
3837
"""Integration test for JumpStart model build, deploy, invoke, and cleanup workflow"""

‎sagemaker-serve/tests/integ/test_jumpstart_vllm_integration.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
MODEL_NAME_PREFIX = "js-vllm-test-model"
2828

2929

30-
@pytest.mark.slow_test
3130
def test_jumpstart_vllm_build():
3231
"""Integration test for JumpStart model using vLLM container image.
3332

0 commit comments

Comments
 (0)