From 15b3926cf190b53e4be9f3fe15ef271848f62b96 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 24 Oct 2022 11:49:34 -0700 Subject: [PATCH 1/6] Set check-latest to false when setup python and pip cache in CI --- .github/actions/setup-win/action.yml | 3 ++- .github/workflows/lint.yml | 9 ++++++++- .github/workflows/pr-labels.yml | 3 ++- .github/workflows/revert.yml | 3 ++- .github/workflows/trymerge.yml | 3 ++- .github/workflows/tryrebase.yml | 3 ++- .github/workflows/update-viablestrict.yml | 1 + 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup-win/action.yml b/.github/actions/setup-win/action.yml index c5f1cac550f6..c7491537d46d 100644 --- a/.github/actions/setup-win/action.yml +++ b/.github/actions/setup-win/action.yml @@ -57,7 +57,8 @@ runs: - name: Setup Python3 uses: actions/setup-python@v2 with: - python-version: "3.x" + python-version: 3.x + check-latest: false cache: pip cache-dependency-path: | **/requirements.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 669977b143a5..923c787233c3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,6 +25,7 @@ jobs: with: python-version: 3.8 architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/.github/requirements-gha-cache.txt @@ -87,6 +88,7 @@ jobs: with: python-version: 3.x architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/requirements.txt @@ -151,6 +153,7 @@ jobs: with: python-version: 3.x architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/requirements.txt @@ -242,7 +245,8 @@ jobs: with: python-version: 3.8 architecture: x64 - cache: 'pip' + check-latest: false + cache: pip cache-dependency-path: | **/.github/requirements-gha-cache.txt @@ -275,6 +279,7 @@ jobs: with: python-version: 3.8 architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/requirements.txt @@ -320,6 +325,7 @@ jobs: with: python-version: 3.5 architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/.github/requirements-gha-cache.txt @@ -329,6 +335,7 @@ jobs: with: python-version: 3.8 architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/.github/requirements-gha-cache.txt diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index aa8cf4472b78..de6da1feec02 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -17,7 +17,8 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: 3.10 + check-latest: false cache: pip cache-dependency-path: | **/.github/requirements-gha-cache.txt diff --git a/.github/workflows/revert.yml b/.github/workflows/revert.yml index d207840f383b..6468f3b8c804 100644 --- a/.github/workflows/revert.yml +++ b/.github/workflows/revert.yml @@ -23,7 +23,8 @@ jobs: with: python-version: 3.8 architecture: x64 - cache: 'pip' + check-latest: false + cache: pip - run: pip install pyyaml==6.0 - name: Setup committer id diff --git a/.github/workflows/trymerge.yml b/.github/workflows/trymerge.yml index dff92303f505..372b442163df 100644 --- a/.github/workflows/trymerge.yml +++ b/.github/workflows/trymerge.yml @@ -22,7 +22,8 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.8 - cache: 'pip' + check-latest: false + cache: pip architecture: x64 - run: pip install pyyaml==6.0 diff --git a/.github/workflows/tryrebase.yml b/.github/workflows/tryrebase.yml index fed9000c420e..dd3206993267 100644 --- a/.github/workflows/tryrebase.yml +++ b/.github/workflows/tryrebase.yml @@ -22,7 +22,8 @@ jobs: with: python-version: 3.8 architecture: x64 - cache: 'pip' + check-latest: false + cache: pip - run: pip install pyyaml==6.0 - name: Setup committer id diff --git a/.github/workflows/update-viablestrict.yml b/.github/workflows/update-viablestrict.yml index 5901b1f4cda1..4be70de020a3 100644 --- a/.github/workflows/update-viablestrict.yml +++ b/.github/workflows/update-viablestrict.yml @@ -24,6 +24,7 @@ jobs: with: python-version: 3.8 architecture: x64 + check-latest: false cache: pip cache-dependency-path: | **/.circleci/docker/requirements-ci.txt From 3ba86496f4ec8fb1070d1a575956dd400ab5538d Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 24 Oct 2022 12:39:57 -0700 Subject: [PATCH 2/6] Upgrade actionlint to 1.6.21 --- tools/linter/adapters/s3_init_config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/linter/adapters/s3_init_config.json b/tools/linter/adapters/s3_init_config.json index 0b0e87e8e26c..9edc66602d19 100644 --- a/tools/linter/adapters/s3_init_config.json +++ b/tools/linter/adapters/s3_init_config.json @@ -27,12 +27,12 @@ }, "actionlint": { "Darwin": { - "download_url": "https://oss-clang-format.s3.us-east-2.amazonaws.com/actionlint/1.6.15/Darwin_amd64/actionlint", - "hash": "e9a0e0b17e54cfefe7964b6aa1da8921b1f8f2318c31c0eb1a17ea3e8ab10db2" + "download_url": "https://oss-clang-format.s3.us-east-2.amazonaws.com/actionlint/1.6.21/Darwin_amd64/actionlint", + "hash": "b354db83815384d3c3a07f68f44b30cb0a70899757a0d185d7322de9952e8813" }, "Linux": { - "download_url": "https://oss-clang-format.s3.us-east-2.amazonaws.com/actionlint/1.6.15/Linux_arm64/actionlint", - "hash": "d6b45ae67f29a2bf9ddd226071ddd8f158fdf2992e8515a06838e5fef90f3a2d" + "download_url": "https://oss-clang-format.s3.us-east-2.amazonaws.com/actionlint/1.6.21/Linux_arm64/actionlint", + "hash": "7b10f1e9225709e39387730f3939caa0de83cbeaeed11e5333eaf403424a1ab3" } } } From d76e0ba74752c2d9de1f79fd4700a88eae470182 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 24 Oct 2022 13:25:05 -0700 Subject: [PATCH 3/6] Update Linux actionlint sha256 hash --- tools/linter/adapters/s3_init_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/linter/adapters/s3_init_config.json b/tools/linter/adapters/s3_init_config.json index 9edc66602d19..d48f264f83d5 100644 --- a/tools/linter/adapters/s3_init_config.json +++ b/tools/linter/adapters/s3_init_config.json @@ -32,7 +32,7 @@ }, "Linux": { "download_url": "https://oss-clang-format.s3.us-east-2.amazonaws.com/actionlint/1.6.21/Linux_arm64/actionlint", - "hash": "7b10f1e9225709e39387730f3939caa0de83cbeaeed11e5333eaf403424a1ab3" + "hash": "025ac157db121b33971ef24af72d73d71cda3cb1e3a94795bb2708ef4032ca76" } } } From ae22b986e219c2b6ee1d022a5d16d35f4c18fb12 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 26 Oct 2022 10:53:16 -0700 Subject: [PATCH 4/6] Use the same requirements-gha-cache.txt when setting up lintrunner --- .github/workflows/lint.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 923c787233c3..a9ca04b2a5a6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,12 +30,9 @@ jobs: cache-dependency-path: | **/.github/requirements-gha-cache.txt - - name: Install lintrunner - uses: nick-fields/retry@3e91a01664abd3c5cd539100d10d33b9c5b68482 - with: - timeout_minutes: 5 - max_attempts: 3 - command: pip install lintrunner==0.9.2 + - name: Install requirements + run: | + pip install -r .github/requirements-gha-cache.txt --user - name: Initialize lint dependencies run: lintrunner init From 3bcbb68af65ec8987076b3dcd6631e55ac250059 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 26 Oct 2022 11:12:20 -0700 Subject: [PATCH 5/6] Use the correct requirements.txt to avoid cache miss --- .github/workflows/lint.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a9ca04b2a5a6..17ffb239b15a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -325,7 +325,7 @@ jobs: check-latest: false cache: pip cache-dependency-path: | - **/.github/requirements-gha-cache.txt + **/requirements.txt - name: Setup Python 3.8 if: matrix.test_type != 'older_python_version' uses: actions/setup-python@v4 @@ -335,10 +335,11 @@ jobs: check-latest: false cache: pip cache-dependency-path: | - **/.github/requirements-gha-cache.txt + **/requirements.txt - name: Install torch if: matrix.test_type == 'with_torch' run: | + pip install -r requirements.txt # Doesn't really matter what torch version, we just need ANY torch installed pip install 'torch==1.*' - name: Run collect_env.py From 099aa922919f3253795908d59071a23084ab68c3 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 26 Oct 2022 12:45:22 -0700 Subject: [PATCH 6/6] Wrap python-version in quote Somehow 3.10 turns into 3.1 without the quote --- .github/actions/setup-win/action.yml | 2 +- .github/workflows/lint.yml | 14 +++++++------- .github/workflows/pr-labels.yml | 2 +- .github/workflows/revert.yml | 2 +- .github/workflows/trymerge.yml | 2 +- .github/workflows/tryrebase.yml | 2 +- .github/workflows/update-viablestrict.yml | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup-win/action.yml b/.github/actions/setup-win/action.yml index c7491537d46d..c4ff13cfcc5c 100644 --- a/.github/actions/setup-win/action.yml +++ b/.github/actions/setup-win/action.yml @@ -57,7 +57,7 @@ runs: - name: Setup Python3 uses: actions/setup-python@v2 with: - python-version: 3.x + python-version: '3.x' check-latest: false cache: pip cache-dependency-path: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 17ffb239b15a..cff22d72d4d2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip @@ -83,7 +83,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: '3.x' architecture: x64 check-latest: false cache: pip @@ -148,7 +148,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: '3.x' architecture: x64 check-latest: false cache: pip @@ -240,7 +240,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip @@ -274,7 +274,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip @@ -320,7 +320,7 @@ jobs: if: matrix.test_type == 'older_python_version' uses: actions/setup-python@v4 with: - python-version: 3.5 + python-version: '3.5' architecture: x64 check-latest: false cache: pip @@ -330,7 +330,7 @@ jobs: if: matrix.test_type != 'older_python_version' uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index de6da1feec02..9afa0e721ac6 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -17,7 +17,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: '3.10' check-latest: false cache: pip cache-dependency-path: | diff --git a/.github/workflows/revert.yml b/.github/workflows/revert.yml index 6468f3b8c804..2a2fff27044e 100644 --- a/.github/workflows/revert.yml +++ b/.github/workflows/revert.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip diff --git a/.github/workflows/trymerge.yml b/.github/workflows/trymerge.yml index 372b442163df..3d1d92967d88 100644 --- a/.github/workflows/trymerge.yml +++ b/.github/workflows/trymerge.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' check-latest: false cache: pip architecture: x64 diff --git a/.github/workflows/tryrebase.yml b/.github/workflows/tryrebase.yml index dd3206993267..53434310c3d0 100644 --- a/.github/workflows/tryrebase.yml +++ b/.github/workflows/tryrebase.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip diff --git a/.github/workflows/update-viablestrict.yml b/.github/workflows/update-viablestrict.yml index 4be70de020a3..12bf4e271f92 100644 --- a/.github/workflows/update-viablestrict.yml +++ b/.github/workflows/update-viablestrict.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' architecture: x64 check-latest: false cache: pip