mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Move the slow test json to be in the pytorch/pytorch repo and make a job that will update it weekly. The job uses the same environment as the commit hash. It uses similar code to the hash updates, but the hash update contains a lot of code that is specific to the hash update, so I chose to pick out the parts that are relevant Remove references to the old file and set up testing to read from the new file instead The old update cadence was every day, the new one is every week The auto slow test infra + the lack of pinning between pytorch and test-infra makes it really hard to tell if a test started failing because of a change or because of the slow test json changing. While this can have benefits, like disable test issues being effective everywhere immediately, it can also be very confusing, especially since we don't have the same insight into slow tests like we do for disable issues. Example PR made: https://github.com/pytorch/pytorch/pull/132383 (with all the changes from this PR because it was working on top of this) We should just get rid of this at some point in favor of the slowTest decorator, but there are some tests that take 5+ minutes to run and I don't want to track them down right now Pull Request resolved: https://github.com/pytorch/pytorch/pull/132379 Approved by: https://github.com/huydhn
56 lines
2.5 KiB
Bash
Executable file
56 lines
2.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Step 2 after branch cut is complete.
|
|
#
|
|
# Creates PR with release only changes.
|
|
#
|
|
# Prerequisite: Must be successfully authenticated in aws fbossci account.
|
|
#
|
|
# Usage (run from root of project):
|
|
# DRY_RUN=disabled ./scripts/release/apply-release-changes.sh
|
|
#
|
|
# RELEASE_VERSION: Version of this current release
|
|
|
|
set -eou pipefail
|
|
|
|
GIT_TOP_DIR=$(git rev-parse --show-toplevel)
|
|
RELEASE_VERSION=${RELEASE_VERSION:-$(cut -d'.' -f1-2 "${GIT_TOP_DIR}/version.txt")}
|
|
DRY_RUN=${DRY_RUN:-enabled}
|
|
|
|
# Change all GitHub Actions to reference the test-infra release branch
|
|
# as opposed to main.
|
|
echo "Applying to workflows"
|
|
for i in .github/workflows/*.yml; do
|
|
sed -i -e s#@main#@"release/${RELEASE_VERSION}"# $i;
|
|
done
|
|
|
|
# Change all checkout step in templates to not add ref to checkout
|
|
echo "Applying to templates"
|
|
for i in .github/templates/*.yml.j2; do
|
|
sed -i 's#common.checkout(\(.*\))#common.checkout(\1, checkout_pr_head=False)#' $i;
|
|
done
|
|
|
|
# Triton wheel
|
|
echo "Triton Changes"
|
|
sed -i -e s#-\ main#"-\ release\/${RELEASE_VERSION}"# .github/workflows/build-triton-wheel.yml
|
|
|
|
# XLA related changes
|
|
echo "XLA Changes"
|
|
sed -i -e s#--quiet#-b\ r"${RELEASE_VERSION}"# .ci/pytorch/common_utils.sh
|
|
sed -i -e s#.*#r"${RELEASE_VERSION}"# .github/ci_commit_pins/xla.txt
|
|
|
|
# Regenerate templates
|
|
export RELEASE_VERSION_TAG=${RELEASE_VERSION}
|
|
./.github/regenerate.sh
|
|
|
|
# Pin Unstable and disabled jobs and tests
|
|
UNSTABLE_VER=$(aws s3api list-object-versions --bucket ossci-metrics --prefix unstable-jobs.json --query 'Versions[?IsLatest].[VersionId]' --output text)
|
|
DISABLED_VER=$(aws s3api list-object-versions --bucket ossci-metrics --prefix disabled-jobs.json --query 'Versions[?IsLatest].[VersionId]' --output text)
|
|
SLOW_VER=$(aws s3api list-object-versions --bucket ossci-metrics --prefix slow-tests.json --query 'Versions[?IsLatest].[VersionId]' --output text)
|
|
DISABLED_TESTS_VER=$(aws s3api list-object-versions --bucket ossci-metrics --prefix disabled-tests-condensed.json --query 'Versions[?IsLatest].[VersionId]' --output text)
|
|
sed -i -e s#unstable-jobs.json#"unstable-jobs.json?versionId=${UNSTABLE_VER}"# .github/scripts/filter_test_configs.py
|
|
sed -i -e s#disabled-jobs.json#"disabled-jobs.json?versionId=${DISABLED_VER}"# .github/scripts/filter_test_configs.py
|
|
sed -i -e s#disabled-tests-condensed.json#"disabled-tests-condensed.json?versionId=${DISABLED_TESTS_VER}"# tools/stats/import_test_stats.py
|
|
# Optional
|
|
git commit -m "[RELEASE-ONLY CHANGES] Branch Cut for Release {RELEASE_VERSION}"
|
|
git push origin "${RELEASE_BRANCH}"
|