From 4bb1ca92cc94e4d1dae1a365d396e488700254d7 Mon Sep 17 00:00:00 2001 From: Surbhi Jain Date: Thu, 18 Jun 2026 00:26:45 +0000 Subject: [PATCH] Rename Github workflows for consistency --- .../{AddLabel.yml => auto_label_pr.yml} | 9 ++- .github/workflows/build_and_upload_images.sh | 72 ----------------- .github/workflows/build_package.yml | 4 +- .github/workflows/check_docs_build.yml | 16 ++++ ...d_and_test_maxtext.yml => ci_pipeline.yml} | 7 +- .../{CodeQuality.yml => code_quality.yml} | 6 +- .../{linkcheck.yml => docs_link_check.yml} | 15 ++++ ...emini-dispatch.yml => gemini_dispatch.yml} | 24 +++++- ...investigate.yml => gemini_investigate.yml} | 19 +++++ .../{gemini-invoke.yml => gemini_invoke.yml} | 18 +++++ .../{gemini-review.yml => gemini_review.yml} | 16 ++++ ...Images.yml => nightly_images_pipeline.yml} | 4 +- .github/workflows/pypi_release.yml | 4 +- .github/workflows/release_pipeline.yml | 4 +- ...re-checklist.yml => require_checklist.yml} | 4 +- .github/workflows/run_jupyter_notebooks.yml | 4 +- .github/workflows/run_pathways_tests.yml | 4 +- .../workflows/run_tests_against_package.yml | 4 +- .github/workflows/run_tests_coordinator.yml | 2 +- .../{stale.yml => stale_pr_cleanup.yml} | 4 +- .github/workflows/update_reference_hlo.yml | 16 ++++ .github/workflows/utils/setup_runner.sh | 78 ------------------- README.md | 2 +- docs/development/hlo_diff_testing.md | 2 +- 24 files changed, 159 insertions(+), 179 deletions(-) rename .github/workflows/{AddLabel.yml => auto_label_pr.yml} (92%) delete mode 100644 .github/workflows/build_and_upload_images.sh rename .github/workflows/{build_and_test_maxtext.yml => ci_pipeline.yml} (98%) rename .github/workflows/{CodeQuality.yml => code_quality.yml} (93%) rename .github/workflows/{linkcheck.yml => docs_link_check.yml} (79%) rename .github/workflows/{gemini-dispatch.yml => gemini_dispatch.yml} (89%) rename .github/workflows/{gemini-investigate.yml => gemini_investigate.yml} (85%) rename .github/workflows/{gemini-invoke.yml => gemini_invoke.yml} (84%) rename .github/workflows/{gemini-review.yml => gemini_review.yml} (87%) rename .github/workflows/{UploadDockerImages.yml => nightly_images_pipeline.yml} (97%) rename .github/workflows/{require-checklist.yml => require_checklist.yml} (87%) rename .github/workflows/{stale.yml => stale_pr_cleanup.yml} (93%) delete mode 100644 .github/workflows/utils/setup_runner.sh diff --git a/.github/workflows/AddLabel.yml b/.github/workflows/auto_label_pr.yml similarity index 92% rename from .github/workflows/AddLabel.yml rename to .github/workflows/auto_label_pr.yml index 601a2227ca..fbb468a9c8 100644 --- a/.github/workflows/AddLabel.yml +++ b/.github/workflows/auto_label_pr.yml @@ -1,4 +1,4 @@ -# Copyright 2023–2025 Google LLC +# Copyright 2023–2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Add Label +# This workflow automatically adds a "pull ready" label to a PR +# when it has received at least 2 approving reviews and all checks have passed. +# It runs on pull request review events, workflow run completion events for the "MaxText Package Tests" workflow, +# and can also be triggered manually via workflow dispatch. + +name: Add Pull Ready Label on: workflow_run: diff --git a/.github/workflows/build_and_upload_images.sh b/.github/workflows/build_and_upload_images.sh deleted file mode 100644 index b03badb772..0000000000 --- a/.github/workflows/build_and_upload_images.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Copyright 2023–2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script builds and uploads two images - one with only dependencies, the other also has a code snapshot. -# These images are tagged in GCR with both "latest" and date in format YYYY-MM-DD via $(date +%Y-%m-%d) - -# This script wraps several steps meant for the github runners to push nightly images. -# If you want to create and push your own images you should instead use docker_build_dependency_image and -# docker_upload_runner in the maxtext root directory. - -# Example command: -# bash build_and_upload_images.sh PROJECT= MODE=stable DEVICE=tpu CLOUD_IMAGE_NAME=${USER}_runner - -if [ "${BASH_SOURCE-}" ]; then - this_file="${BASH_SOURCE[0]}" -elif [ "${ZSH_VERSION-}" ]; then - # shellcheck disable=SC2296 - this_file="${(%):-%x}" -else - this_file="${0}" -fi - -MAXTEXT_REPO_ROOT="${MAXTEXT_REPO_ROOT:-$(CDPATH='' cd -- "$(dirname -- "${this_file}")"'/../..' && pwd)}" -export LOCAL_IMAGE_NAME=maxtext_base_image - -# Set environment variables -for ARGUMENT in "$@"; do - IFS='=' read -r KEY VALUE <<< "$ARGUMENT" - export "$KEY"="$VALUE" - echo "$KEY"="$VALUE" -done - -if [[ ! -v CLOUD_IMAGE_NAME ]] || [[ ! -v PROJECT ]] || [[ ! -v MODE ]] || [[ ! -v DEVICE ]]; then - echo "You must set CLOUD_IMAGE_NAME, PROJECT, MODE, and DEVICE" - exit 1 -fi - -gcloud auth configure-docker us-docker.pkg.dev --quiet -bash "$MAXTEXT_REPO_ROOT"'/src/dependencies/scripts/docker_build_dependency_image.sh' LOCAL_IMAGE_NAME=$LOCAL_IMAGE_NAME MODE="$MODE" DEVICE="$DEVICE" -image_date=$(date +%Y-%m-%d) - -# Upload only dependencies image -dependency_image_name=${CLOUD_IMAGE_NAME}_dependencies -docker tag ${LOCAL_IMAGE_NAME} gcr.io/$PROJECT/${dependency_image_name}:latest -docker push gcr.io/$PROJECT/${dependency_image_name}:latest -docker tag ${LOCAL_IMAGE_NAME} gcr.io/$PROJECT/${dependency_image_name}:${image_date} -docker push gcr.io/$PROJECT/${dependency_image_name}:${image_date} - -# Download other test assets from GCS into ${MAXTEXT_TEST_ASSETS_ROOT:-${MAXTEXT_REPO_ROOT:-$PWD}/tests/assets/golden_logits} -if ! gcloud storage cp gs://maxtext-test-assets/* "${MAXTEXT_TEST_ASSETS_ROOT:-${MAXTEXT_REPO_ROOT:-$PWD}/tests/assets/golden_logits}"; then - echo "WARNING: Failed to download test assets from GCS. These files are only used for end-to-end tests; you may not have access to the bucket." -fi - -# Build then upload "dependencies + code" image -docker build --build-arg BASEIMAGE=${LOCAL_IMAGE_NAME} -f "$MAXTEXT_REPO_ROOT"'/src/dependencies/dockerfiles/maxtext_runner.Dockerfile' -t ${LOCAL_IMAGE_NAME}_runner . -docker tag ${LOCAL_IMAGE_NAME}_runner gcr.io/$PROJECT/${CLOUD_IMAGE_NAME}:latest -docker push gcr.io/$PROJECT/${CLOUD_IMAGE_NAME}:latest -docker tag ${LOCAL_IMAGE_NAME}_runner gcr.io/$PROJECT/${CLOUD_IMAGE_NAME}:${image_date} -docker push gcr.io/$PROJECT/${CLOUD_IMAGE_NAME}:${image_date} diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index edd9888ed8..25f2fd2229 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2023-2026 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file defines a module for building and uploading a maxtext pacakge +# This workflow builds and uploads MaxText package # based on the pyproject.toml at the current github workspace. name: Build and Upload MaxText Package diff --git a/.github/workflows/check_docs_build.yml b/.github/workflows/check_docs_build.yml index 42618333b4..6136256530 100644 --- a/.github/workflows/check_docs_build.yml +++ b/.github/workflows/check_docs_build.yml @@ -1,3 +1,19 @@ +# Copyright 2023-2026 Google LLC + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# https://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow checks if the documentation build is successful. + name: Check the Documentation Build on: diff --git a/.github/workflows/build_and_test_maxtext.yml b/.github/workflows/ci_pipeline.yml similarity index 98% rename from .github/workflows/build_and_test_maxtext.yml rename to .github/workflows/ci_pipeline.yml index d1e5248f52..095f885c28 100644 --- a/.github/workflows/build_and_test_maxtext.yml +++ b/.github/workflows/ci_pipeline.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2023-2026 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This workflow will build maxtext python package and run tests. +# This workflow orchestrates the CI pipeline for MaxText, +# including building the package, running tests, and notifying about failures. name: MaxText Package Tests @@ -308,7 +309,7 @@ jobs: name: Investigate failed build # investigates failure of scheduled run and comments on tracking issue needs: [tpu-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, notify_failure] if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' }} - uses: ./.github/workflows/gemini-investigate.yml + uses: ./.github/workflows/gemini_investigate.yml permissions: contents: 'read' id-token: 'write' diff --git a/.github/workflows/CodeQuality.yml b/.github/workflows/code_quality.yml similarity index 93% rename from .github/workflows/CodeQuality.yml rename to .github/workflows/code_quality.yml index 9b62b3d507..6f5c2a277a 100644 --- a/.github/workflows/CodeQuality.yml +++ b/.github/workflows/code_quality.yml @@ -1,4 +1,4 @@ -# Copyright 2023–2025 Google LLC +# Copyright 2023–2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: CodeQuality +# This workflow runs code quality checks using pre-commit on pull requests. + +name: Code Quality on: pull_request: diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/docs_link_check.yml similarity index 79% rename from .github/workflows/linkcheck.yml rename to .github/workflows/docs_link_check.yml index 112c18f03e..c865dc5b43 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/docs_link_check.yml @@ -1,3 +1,18 @@ +# Copyright 2023–2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow checks for broken links in the documentation. name: Documentation Link Checker diff --git a/.github/workflows/gemini-dispatch.yml b/.github/workflows/gemini_dispatch.yml similarity index 89% rename from .github/workflows/gemini-dispatch.yml rename to .github/workflows/gemini_dispatch.yml index 92935df1e7..e1b535c051 100644 --- a/.github/workflows/gemini-dispatch.yml +++ b/.github/workflows/gemini_dispatch.yml @@ -1,3 +1,21 @@ +# Copyright 2023–2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow acts as a central dispatcher for handling Gemini-related commands +# issued via PR comments, review comments, or issue comments. +# Depending on the command, it routes the request to the appropriate workflow for processing. + name: 'Gemini Dispatch' on: @@ -130,7 +148,7 @@ jobs: needs: 'dispatch' if: |- ${{ needs.dispatch.outputs.command == 'review' }} - uses: './.github/workflows/gemini-review.yml' + uses: './.github/workflows/gemini_review.yml' permissions: contents: 'read' id-token: 'write' @@ -144,7 +162,7 @@ jobs: needs: 'dispatch' if: |- ${{ needs.dispatch.outputs.command == 'invoke' }} - uses: './.github/workflows/gemini-invoke.yml' + uses: './.github/workflows/gemini_invoke.yml' permissions: contents: 'read' id-token: 'write' @@ -158,7 +176,7 @@ jobs: needs: 'dispatch' if: |- ${{ needs.dispatch.outputs.command == 'investigate' }} - uses: './.github/workflows/gemini-investigate.yml' + uses: './.github/workflows/gemini_investigate.yml' permissions: contents: 'read' id-token: 'write' diff --git a/.github/workflows/gemini-investigate.yml b/.github/workflows/gemini_investigate.yml similarity index 85% rename from .github/workflows/gemini-investigate.yml rename to .github/workflows/gemini_investigate.yml index d8b5f226ed..672c36020c 100644 --- a/.github/workflows/gemini-investigate.yml +++ b/.github/workflows/gemini_investigate.yml @@ -1,3 +1,22 @@ +# Copyright 2023–2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow handles the "investigate" command for Gemini, +# which is used to analyze and investigate test failures by +# gathering relevant logs and context, and then running a Gemini +# agent to assist in diagnosing the issue. + name: 'Gemini Failure Investigator' on: diff --git a/.github/workflows/gemini-invoke.yml b/.github/workflows/gemini_invoke.yml similarity index 84% rename from .github/workflows/gemini-invoke.yml rename to .github/workflows/gemini_invoke.yml index 0242f1e062..c3c6b9bebd 100644 --- a/.github/workflows/gemini-invoke.yml +++ b/.github/workflows/gemini_invoke.yml @@ -1,3 +1,21 @@ +# Copyright 2023–2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow handles "invoke" commands from the Gemini Dispatch workflow, +# allowing for flexible execution of custom logic based on PR comments, +# review comments, issue comments, or label events. + name: 'Gemini Invoke' on: diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini_review.yml similarity index 87% rename from .github/workflows/gemini-review.yml rename to .github/workflows/gemini_review.yml index 92c777a5ff..1babf822ba 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini_review.yml @@ -1,3 +1,19 @@ +# Copyright 2023–2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow handles Gemini review commands issued via PR comments, review comments, or issue comments. + name: 'Gemini Review' on: diff --git a/.github/workflows/UploadDockerImages.yml b/.github/workflows/nightly_images_pipeline.yml similarity index 97% rename from .github/workflows/UploadDockerImages.yml rename to .github/workflows/nightly_images_pipeline.yml index 38486c583c..4ab0a932b3 100644 --- a/.github/workflows/UploadDockerImages.yml +++ b/.github/workflows/nightly_images_pipeline.yml @@ -13,9 +13,9 @@ # limitations under the License. # This workflow builds and pushes MaxText images for both TPU and GPU devices. -# It runs automatically daily at 12am UTC, on Pull Requests, or manually via Workflow Dispatch. +# It runs automatically daily at 12am UTC, or manually via Workflow Dispatch. -name: Build Images +name: Build Nightly Docker Images on: schedule: diff --git a/.github/workflows/pypi_release.yml b/.github/workflows/pypi_release.yml index f794aedf40..6bd5126dfa 100644 --- a/.github/workflows/pypi_release.yml +++ b/.github/workflows/pypi_release.yml @@ -40,7 +40,7 @@ jobs: build_and_test_maxtext_package: name: Build and Test MaxText Package needs: [release_approval] - uses: ./.github/workflows/build_and_test_maxtext.yml + uses: ./.github/workflows/ci_pipeline.yml secrets: inherit build_docs: @@ -51,7 +51,7 @@ jobs: check_links: name: Check Links in Documentation - uses: ./.github/workflows/linkcheck.yml + uses: ./.github/workflows/docs_link_check.yml secrets: inherit publish_maxtext_package_to_pypi: diff --git a/.github/workflows/release_pipeline.yml b/.github/workflows/release_pipeline.yml index bad68cec61..c5da61988f 100644 --- a/.github/workflows/release_pipeline.yml +++ b/.github/workflows/release_pipeline.yml @@ -1,4 +1,4 @@ -# Copyright 2026 Google LLC +# Copyright 2023-2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ jobs: if: | always() && (needs.release_approval.result == 'success' || needs.release_approval.result == 'skipped') - uses: ./.github/workflows/build_and_test_maxtext.yml + uses: ./.github/workflows/ci_pipeline.yml secrets: inherit build_release_candidate_images: diff --git a/.github/workflows/require-checklist.yml b/.github/workflows/require_checklist.yml similarity index 87% rename from .github/workflows/require-checklist.yml rename to .github/workflows/require_checklist.yml index 8b0dd747eb..83d99f60b1 100644 --- a/.github/workflows/require-checklist.yml +++ b/.github/workflows/require_checklist.yml @@ -1,4 +1,4 @@ -# Copyright 2023–2025 Google LLC +# Copyright 2023–2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This workflow checks if a PR description contains a checklist, and fails if not. + name: Require Checklist on: pull_request: diff --git a/.github/workflows/run_jupyter_notebooks.yml b/.github/workflows/run_jupyter_notebooks.yml index cd243f3039..fcbbb9c0ce 100644 --- a/.github/workflows/run_jupyter_notebooks.yml +++ b/.github/workflows/run_jupyter_notebooks.yml @@ -1,4 +1,4 @@ -# Copyright 2026 Google LLC +# Copyright 2023-2026 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file defines a module for running jupyter notebooks against the built maxtext package. +# This workflow runs jupyter notebooks against the built MaxText package. name: Run Jupyter Notebooks diff --git a/.github/workflows/run_pathways_tests.yml b/.github/workflows/run_pathways_tests.yml index 9f0b755106..f04711d094 100644 --- a/.github/workflows/run_pathways_tests.yml +++ b/.github/workflows/run_pathways_tests.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2023-2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file runs unit tests with Pathways backend. +# This workflow runs unit tests with Pathways backend. name: Run Pathways Tests diff --git a/.github/workflows/run_tests_against_package.yml b/.github/workflows/run_tests_against_package.yml index 1600f92608..34a05d8b21 100644 --- a/.github/workflows/run_tests_against_package.yml +++ b/.github/workflows/run_tests_against_package.yml @@ -1,4 +1,4 @@ -# Copyright 2025 Google LLC +# Copyright 2023-2026 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file defines a module for running tests against the built maxtext package. +# This workflow runs tests against the built MaxText package. name: Run Tests Against MaxText Package diff --git a/.github/workflows/run_tests_coordinator.yml b/.github/workflows/run_tests_coordinator.yml index c6c15acd3f..d76eaec3bd 100644 --- a/.github/workflows/run_tests_coordinator.yml +++ b/.github/workflows/run_tests_coordinator.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file defines a module for running tests against the built maxtext package or +# This workflow runs tests against the built MaxText package or # pre-built images. It can run unit tests and integration tests. name: MaxText Test Coordinator diff --git a/.github/workflows/stale.yml b/.github/workflows/stale_pr_cleanup.yml similarity index 93% rename from .github/workflows/stale.yml rename to .github/workflows/stale_pr_cleanup.yml index b8430add34..0ae2577f85 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale_pr_cleanup.yml @@ -1,4 +1,4 @@ -# Copyright 2023–2025 Google LLC +# Copyright 2023–2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This workflow closes stale PRs that have been inactive for a certain period of time. + name: 'Close stale PRs' on: schedule: diff --git a/.github/workflows/update_reference_hlo.yml b/.github/workflows/update_reference_hlo.yml index 97af9f9af2..3d7cee7201 100644 --- a/.github/workflows/update_reference_hlo.yml +++ b/.github/workflows/update_reference_hlo.yml @@ -1,3 +1,19 @@ +# Copyright 2023–2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This workflow updates reference HLO files for hlo_diff_test.py. + name: "Update HLO References (for hlo_diff_test.py)" on: diff --git a/.github/workflows/utils/setup_runner.sh b/.github/workflows/utils/setup_runner.sh deleted file mode 100644 index 6e960c4879..0000000000 --- a/.github/workflows/utils/setup_runner.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -# Copyright 2023–2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Not currently used after the move to ML Actions (GKE). Kept around in case -# we need to reference it for older workflows or as a guide for future workflow -# configurations. - -# This file sets up a tpu vm to be used as a github runner for testing. -# It creates a user runner without sudo permissions to -# run the config file and authenticate to github - - -set -eux - -if [ "$#" -ne 4 ]; then - echo "Usage: setup_runner.sh " -fi - -runner_name="$1" -runner_tags="$2" -runner_token="$3" -repo_url="$4" - - -# Create `runner` user. This user won't have sudo access unless you ssh into the -# GCP VM as `runner` using gcloud. Don't do that! -sudo useradd runner -m -ORIGIN_USER=${USER} -# Find the latest actions-runner download. The runner will automatically update -# itself when new versions are released. Github requires that all self-hosted -# runners are updated to the latest version within 30 days of release -# (https://docs.github.com/en/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners#controlling-runner-software-updates-on-self-hosted-runners). -# Example URL: -# https://github.com/actions/runner/releases/download/v2.298.2/actions-runner-linux-x64-2.298.2.tar.gz -actions_runner_download_regexp='https://github.com/actions/runner/releases/'\ -'download/v[0-9.]\+/actions-runner-linux-x64-[0-9.]\+\.tar\.gz' -# Use `head -n 1` because there are multiple instances of the same URL -actions_runner_download=$( - curl -s -X GET 'https://api.github.com/repos/actions/runner/releases/latest' | - grep -o "${actions_runner_download_regexp}" | - head -n 1) -echo "actions_runner_download: ${actions_runner_download}" - -# Run the rest of the setup as `runner`. -# -# Note that env vars in the heredoc will be expanded according to the _calling_ -# environment, not the `runner` environment we're creating -- it acts like a -# double-quoted string. This is how variables like $runner_name are inserted -# without using sudo -E (which would cause the current environment to be -# inherited). This also means we must be careful to escape any variables that -# we'd like to evaluate in the `runner` environment, e.g. $HOME. -sudo -i -u runner bash -ex < **_NOTE:_** We recommend running MaxText with Python 3.12, as it is our primary supported version. Other Python versions may encounter compatibility issues. diff --git a/docs/development/hlo_diff_testing.md b/docs/development/hlo_diff_testing.md index f486f3e6de..de0ebf7ecb 100644 --- a/docs/development/hlo_diff_testing.md +++ b/docs/development/hlo_diff_testing.md @@ -30,7 +30,7 @@ ______________________________________________________________________ ## How the Test Works -This test runs automatically as part of the [`tpu-integration`](https://github.com/AI-Hypercomputer/maxtext/actions/workflows/build_and_test_maxtext.yml) CI test suite on every Pull Request. +This test runs automatically as part of the [`tpu-integration`](https://github.com/AI-Hypercomputer/maxtext/actions/workflows/ci_pipeline.yml) CI test suite on every Pull Request. When the test method executes, it performs the following sequence of actions: