Skip to content

Commit 86ef07a

Browse files
Merge branch 'main' into release-2.7.0
2 parents 4d87b3b + c14eed3 commit 86ef07a

22 files changed

+782
-311
lines changed

.github/pull_request_template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Description
2+
[Provide a brief description of the changes]
3+
4+
## Type of Change
5+
- [ ] Image update - Bug fix
6+
- [ ] Image update - New feature
7+
- [ ] Image update - Breaking change
8+
- [ ] SMD image build tool update
9+
- [ ] Documentation update
10+
11+
## Release Information
12+
Does this change need to be included in patch version releases? By default, any pull requests will only be added to the next SMD image minor version release once they are merged in template folder. Only critical bug fix or security update should be applied to new patch versions of existed image minor versions.
13+
- [ ] Yes (Critical bug fix or security update)
14+
- [ ] No (New feature or non-critical change)
15+
- [ ] N/A (Not an image update)
16+
17+
If yes, please explain why:
18+
[Explain the criticality of this change and why it should be included in patch releases]
19+
20+
## How Has This Been Tested?
21+
[Describe the tests you ran]
22+
23+
## Checklist:
24+
- [ ] My code follows the style guidelines of this project
25+
- [ ] I have commented my code, particularly in hard-to-understand areas
26+
- [ ] I have made corresponding changes to the documentation
27+
- [ ] I have added tests that prove my fix is effective or that my feature works
28+
29+
## Test Screenshots (if applicable):
30+
31+
## Related Issues
32+
[Link any related issues here]
33+
34+
## Additional Notes
35+
[Any additional information that might be helpful for reviewers]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Workflow to start nightly build(s) upon new image version release.
2+
# Triggered by release (https://github.com/aws/sagemaker-distribution/releases) publication, for `*-cpu` only so we run once per image version.
3+
# Can also be triggered manually.
4+
# When a minor version (X.y.0) is released, we'll start the next minor (X.(y+1).0) and patch (X.y.1).
5+
# When a patch version (X.y.z) is released, we'll start the next patch (X.y.(z+1)).
6+
name: Add New Nightly Build(s)
7+
on:
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Released version to add next versions for (x.y.z)'
14+
required: true
15+
type: string
16+
concurrency:
17+
group: schedule-update
18+
cancel-in-progress: false
19+
defaults:
20+
run:
21+
shell: bash -l {0}
22+
jobs:
23+
update-nightly-schedule:
24+
name: Update NIGHTLY_BUILD_SCHEDULE with new version(s).
25+
runs-on: ubuntu-latest
26+
# Only run for CPU releases or manual triggers
27+
if: |
28+
github.event_name == 'workflow_dispatch' ||
29+
(github.event_name == 'release' && endsWith(github.event.release.tag_name, '-cpu'))
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: mamba-org/setup-micromamba@v2
33+
with:
34+
environment-file: ./environment.lock
35+
environment-name: sagemaker-distribution
36+
init-shell: bash
37+
- name: Set version
38+
id: version
39+
run: |
40+
if [ "${{ github.event_name }}" == "release" ]; then
41+
# Extract x.y.z from x.y.z-cpu
42+
VERSION=$(echo "${{ github.event.release.tag_name }}" | sed 's/-cpu$//')
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
else
45+
# Use manually provided version
46+
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
47+
fi
48+
- name: Update nightly build schedule
49+
id: update-schedule
50+
env:
51+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
52+
run: |
53+
micromamba activate sagemaker-distribution
54+
python ./.github/workflows/utils/nightly_build_helper.py \
55+
add-next-versions ${{ steps.version.outputs.version }}

.github/workflows/build-image.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ jobs:
4040
target_version: ${{ steps.calc_target.outputs.target_version }}
4141
steps:
4242
- uses: actions/checkout@v4
43-
- uses: mamba-org/setup-micromamba@v1
43+
with:
44+
fetch-depth: 0
45+
- uses: mamba-org/setup-micromamba@v2
4446
with:
4547
environment-file: ./environment.lock
4648
environment-name: sagemaker-distribution

.github/workflows/check-image-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
contents: write
4040
steps:
4141
- uses: actions/checkout@v4
42-
- uses: mamba-org/setup-micromamba@v1
42+
- uses: mamba-org/setup-micromamba@v2
4343
with:
4444
environment-file: ./environment.lock
4545
environment-name: sagemaker-distribution

.github/workflows/check_code_quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
contents: write
3030
steps:
3131
- uses: actions/checkout@v4
32-
- uses: mamba-org/setup-micromamba@v1
32+
- uses: mamba-org/setup-micromamba@v2
3333
with:
3434
environment-file: ./environment.lock
3535
environment-name: sagemaker-distribution
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Kickoff Nightly builds
2+
run-name: Kickoff nightly builds
3+
on:
4+
# Run manually
5+
workflow_dispatch:
6+
# Run on Mon-Fri at 4PM PST / 5PM PDT
7+
schedule:
8+
- cron: '0 0 * * 1-5'
9+
jobs:
10+
generate-version-matrix:
11+
name: Generate version matrix
12+
runs-on: ubuntu-latest
13+
if: github.repository == 'aws/sagemaker-distribution'
14+
outputs:
15+
matrix: ${{ steps.set-matrix.outputs.matrix }}
16+
patch-versions: ${{ steps.set-matrix.outputs.patch-versions }}
17+
minor-versions: ${{ steps.set-matrix.outputs.minor-versions }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Get versions from schedule
21+
id: set-matrix
22+
env:
23+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
24+
run: |
25+
SCHEDULE='${{ vars.NIGHTLY_BUILD_SCHEDULE }}'
26+
echo "Triggering builds for $(echo $SCHEDULE | jq -c '.active_nightly_builds')"
27+
echo "matrix=$(echo $SCHEDULE | jq -c)" >> $GITHUB_OUTPUT
28+
echo "patch-versions=$(echo $SCHEDULE | jq -c '.patch_base_versions')" >> $GITHUB_OUTPUT
29+
echo "minor-versions=$(echo $SCHEDULE | jq -c '.minor_base_versions')" >> $GITHUB_OUTPUT
30+
start-minor-build:
31+
name: Start nightly minor build
32+
needs: generate-version-matrix
33+
permissions:
34+
pull-requests: write
35+
contents: write
36+
id-token: write
37+
strategy:
38+
matrix:
39+
version: ${{ fromJson(needs.generate-version-matrix.outputs.minor-versions) }}
40+
fail-fast: false
41+
uses: aws/sagemaker-distribution/.github/workflows/build-image.yml@main
42+
secrets: inherit
43+
with:
44+
release-type: "minor"
45+
base-version: ${{ matrix.version }}
46+
start-patch-build:
47+
name: Start nightly patch build
48+
needs: generate-version-matrix
49+
permissions:
50+
pull-requests: write
51+
contents: write
52+
id-token: write
53+
strategy:
54+
matrix:
55+
version: ${{ fromJson(needs.generate-version-matrix.outputs.patch-versions) }}
56+
fail-fast: false
57+
uses: aws/sagemaker-distribution/.github/workflows/build-image.yml@main
58+
secrets: inherit
59+
with:
60+
release-type: "patch"
61+
base-version: ${{ matrix.version }}

.github/workflows/nightly-minor-build.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Workflow manually triggered to stop nightly builds for a given image version.
2+
name: Stop Nightly Build
3+
run-name: Stop Nightly Build (${{ inputs.version }})
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: 'Version to stop building (x.y.z, e.g. 3.0.0)'
9+
required: true
10+
type: string
11+
concurrency:
12+
group: schedule-update
13+
cancel-in-progress: false
14+
defaults:
15+
run:
16+
shell: bash -l {0}
17+
jobs:
18+
update-nightly-schedule:
19+
name: Update nightly build schedule
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: mamba-org/setup-micromamba@v2
24+
with:
25+
environment-file: ./environment.lock
26+
environment-name: sagemaker-distribution
27+
init-shell: bash
28+
- name: Update nightly_build_schedule.json
29+
id: update-schedule
30+
env:
31+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
32+
run: |
33+
micromamba activate sagemaker-distribution
34+
python ./.github/workflows/utils/nightly_build_helper.py remove-version ${{ inputs.version }}

.github/workflows/update-environment-lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
contents: write
1919
steps:
2020
- uses: actions/checkout@v4
21-
- uses: mamba-org/setup-micromamba@v1
21+
- uses: mamba-org/setup-micromamba@v2
2222
with:
2323
environment-file: ./environment.yml
2424
environment-name: sagemaker-distribution

0 commit comments

Comments
 (0)