From a51cefe10b65c719a7e3caf1aa7e81a5fe9e70c2 Mon Sep 17 00:00:00 2001 From: Amarjeet LNU Date: Wed, 22 Jul 2026 15:16:57 -0700 Subject: [PATCH] fix(ci): point PR unit-tests at the CDK-managed V3 project The PR-check `unit-tests` job invoked per-submodule CodeBuild projects named `sagemaker-python-sdk-ci--unit-tests`. Those projects were created manually (no CloudFormation tags) and are not managed by the SageMakerMLFPySDKInfraCDK pipeline, so they drifted stale: they still run `tox ... --cov=.` (last modified 2026-06-15) even though the merged and deployed buildspec CR changed this to `--cov=sagemaker`. As a result PR coverage kept reporting the old test-file-inflated numbers and never reflected the fix. Point the job at the single CDK/pipeline-managed project `sagemaker-python-sdk-ci-health-unit-test-v3` (createCIUnitV3BuildSpec), driven by the `SUBMODULE` env var, exactly as the ci-health workflow invokes it. This project carries the deployed `--cov=sagemaker` buildspec, so PR coverage now tracks the intended product-only measurement, and the CI wiring stays in sync with the CDK going forward. The manual per-submodule `-unit-tests` projects can be retired separately. --- .github/workflows/pr-checks-master.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks-master.yml b/.github/workflows/pr-checks-master.yml index c62b4f4fc4..1195ed2779 100644 --- a/.github/workflows/pr-checks-master.yml +++ b/.github/workflows/pr-checks-master.yml @@ -208,8 +208,18 @@ jobs: - name: Run Unit Tests for ${{ matrix.submodule }} uses: aws-actions/aws-codebuild-run-build@v1 with: - project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-unit-tests + # Use the single CDK-managed V3 unit-test project (driven by the SUBMODULE + # env var), the same project the CI-health workflow uses. The previous + # per-submodule projects (sagemaker-python-sdk-ci--unit-tests) + # were created manually, are not CDK/pipeline-managed, and had drifted + # stale (e.g. still running `--cov=.` instead of the deployed + # `--cov=sagemaker`), so PR coverage never reflected buildspec fixes. + project-name: ${{ github.event.repository.name }}-ci-health-unit-test-v3 source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}' + env-vars-for-codebuild: | + SUBMODULE + env: + SUBMODULE: ${{ matrix.submodule }} integ-tests: runs-on: ubuntu-latest