Skip to content

Commit b0206e6

Browse files
rsareddy0329Roja Reddy Sareddy
andauthored
feat(sagemaker-core): Add botocore-sync GitHub workflows (#6226)
* feat(sagemaker-core): Add botocore-sync GitHub workflows Enable the daily botocore-sync automation for the sagemaker-core module in the monorepo: - Add scheduled sync (sagemaker-core-botocore-sync.yml), auto-approve, and auto-merge workflows. They trigger the CodeBuild projects via the repo's existing CI_AWS_ROLE_ARN OIDC role; auto-merge is gated to sagemaker-bot + botocore-sync* branch + "Daily Sync with Botocore" title, scoped to sagemaker-core/sample/**/*.json. - Remove a stray hardcoded absolute SERVICE_JSON_FILE_PATH override in data_extractor.py so codegen resolves service models via the package-relative constant in constants.py. * chore(sagemaker-core): Defer auto-approve/merge sync workflows Remove the auto-approve and auto-merge workflows for now so the daily botocore sync can be validated in isolation: the sync workflow opens a PR that is left for manual review. The approve/merge automation will be re-added in a follow-up once PR generation is verified. Both files remain in history (commit 99ac5f7) and can be restored when needed. --------- Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com>
1 parent d0016e8 commit b0206e6

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: SageMaker Core - Daily Sync with Botocore
2+
3+
# Scheduled trigger that kicks off the CodeBuild project which fetches the
4+
# latest service-2.json models from boto3/botocore, regenerates the
5+
# sagemaker-core resource/shape classes, and opens a "Daily Sync with Botocore"
6+
# PR as the sagemaker-bot user.
7+
#
8+
# NOTE: The CodeBuild project `sagemaker-core-botocore-sync` is provisioned
9+
# separately (deferred account-side setup). It reuses the repo's existing
10+
# `CI_AWS_ROLE_ARN` OIDC role (same role every other CI workflow uses); that
11+
# role must be granted codebuild:StartBuild on this project. Until the project
12+
# exists, this workflow will fail on the Run CodeBuild step.
13+
14+
on:
15+
schedule:
16+
# Every Monday to Friday at 10:00 UTC (3:00 PDT)
17+
- cron: "00 10 * * 1-5"
18+
# Allow manual runs for testing once CodeBuild is wired up.
19+
workflow_dispatch:
20+
21+
permissions:
22+
id-token: write # Required for requesting the OIDC JWT
23+
24+
jobs:
25+
sync-with-botocore:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Configure AWS Credentials
29+
uses: aws-actions/configure-aws-credentials@v4
30+
with:
31+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
32+
role-duration-seconds: 10800
33+
aws-region: us-west-2
34+
35+
- name: Run CodeBuild
36+
uses: aws-actions/aws-codebuild-run-build@v1
37+
with:
38+
project-name: sagemaker-core-botocore-sync

0 commit comments

Comments
 (0)