From c8c0d6886ec29081740129cdd97588c000360baf Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Thu, 17 Oct 2024 13:41:27 -0700 Subject: [PATCH] tc --- .../workflows/test-update-viablestrict.yml | 23 ----- .github/workflows/update-viablestrict.yml | 92 ------------------- 2 files changed, 115 deletions(-) delete mode 100644 .github/workflows/test-update-viablestrict.yml delete mode 100644 .github/workflows/update-viablestrict.yml diff --git a/.github/workflows/test-update-viablestrict.yml b/.github/workflows/test-update-viablestrict.yml deleted file mode 100644 index fc3df53d53..0000000000 --- a/.github/workflows/test-update-viablestrict.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Test the update viable/strict - -on: - pull_request: - paths: - - .github/workflows/update-viablestrict.yml - - .github/workflows/test-update-viablestrict.yml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: false - -jobs: - test: - uses: ./.github/workflows/update-viablestrict.yml - with: - repository: pytorch/vision - viable_strict_branch: test_strict - required_checks: "Build Linux,Build M1,Build Macos,Unit-tests on Linux,Unit-tests on M1" - secrets: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} - GITHUB_DEPLOY_KEY: ${{ secrets.VISION_GITHUB_DEPLOY_KEY }} diff --git a/.github/workflows/update-viablestrict.yml b/.github/workflows/update-viablestrict.yml deleted file mode 100644 index 8f0e0c7046..0000000000 --- a/.github/workflows/update-viablestrict.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Update viable/strict - -on: - workflow_call: - inputs: - repository: - description: 'Repository to checkout, defaults to "".' - default: "" - type: string - test-infra-repository: - description: "Test infra repository to use/" - default: "pytorch/test-infra" - type: string - test-infra-ref: - description: "Test infra reference to use." - default: "" - type: string - required_checks: - description: "A comma-separated string of workflows to be completed successfully" - required: true - type: string - viable_strict_branch: - description: "The name of the viable/strict branch." - default: "viable/strict" - type: string - secrets: - ROCKSET_API_KEY: - required: true - description: 'API key for ROCKSET' - GITHUB_DEPLOY_KEY: - required: true - description: 'GitHub deploy key' - - -jobs: - do_update_viablestrict: - runs-on: ubuntu-20.04 - steps: - - name: Checkout ${{ inputs.test-infra-repository }} repo - uses: actions/checkout@v3 - with: - repository: ${{ inputs.test-infra-repository }} - ref: ${{ inputs.test-infra-ref }} - path: test-infra - - - name: Checkout ${{ inputs.repository }} repo - uses: actions/checkout@v3 - with: - repository: ${{ inputs.repository }} - ssh-key: ${{ secrets.GITHUB_DEPLOY_KEY }} - fetch-depth: 0 - path: ${{ inputs.repository }} - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - architecture: x64 - cache: pip - - - name: Install Python Packages - run: | - pip3 install rockset==1.0.3 - pip3 install boto3==1.19.12 - - - name: Get latest viable commit - env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} - run: | - cd ${{ inputs.repository }} - - TEST_INFRA_PATH="../../test-infra" - - output=$(python3 ${TEST_INFRA_PATH}/tools/scripts/fetch_latest_green_commit.py \ - --required-checks "${{ inputs.required_checks }}" \ - --viable-strict-branch "${{ inputs.viable_strict_branch }}" \ - --main-branch "main") - echo "latest_viable_sha=$output" >> "${GITHUB_OUTPUT}" - id: get-latest-commit - - - name: Push SHA to viable/strict branch - if: steps.get-latest-commit.outputs.latest_viable_sha != 'None' - run: | - cd ${{ inputs.repository }} - - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - echo "Set the latest sha variable to be ${{ steps.get-latest-commit.outputs.latest_viable_sha }}" - # Pushing an older green commit here will fail because it's non-fast-forward, which is ok - # to ignore because we already have the later green commit in viable/strict - git push origin "${{ steps.get-latest-commit.outputs.latest_viable_sha }}":${{ inputs.viable_strict_branch }}