Commit 3ecf467
committed
fix(integ): Use SAGEMAKER_REGION for cross-region training job lookup
The SageMaker SDK's SageMakerClient reads SAGEMAKER_REGION env var
at init time and caches the region for all subsequent API calls.
The cleanup_e2e_endpoints session fixture was the first to create
a SageMakerClient (in the default region), which then poisoned all
subsequent TrainingJob.get calls regardless of the region parameter.
Fix by setting SAGEMAKER_REGION=us-west-2 in cleanup_e2e_endpoints
before any SDK session is created, since all resources in this test
file live in us-west-2. The env var is restored after cleanup.
In CodeBuild (us-west-2) this is a no-op since the default region
already matches. The other test files (triton, tei, tgi) are not
affected since they have their own fixtures and don't import from
this file.1 parent 7e54110 commit 3ecf467
1 file changed
Lines changed: 18 additions & 5 deletions
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
| |||
534 | 543 | | |
535 | 544 | | |
536 | 545 | | |
537 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
538 | 551 | | |
539 | 552 | | |
540 | 553 | | |
| |||
0 commit comments