From 1948fe54859e5156186fd45fc6d96b4660f6a942 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 5 Dec 2023 18:18:27 +0000 Subject: [PATCH 1/7] `ctx.print` is not the same as python's `print` Signed-off-by: Pedro Algarvio --- tools/precommit/docstrings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/precommit/docstrings.py b/tools/precommit/docstrings.py index 9cbc5a848d0..40c962c2dc9 100644 --- a/tools/precommit/docstrings.py +++ b/tools/precommit/docstrings.py @@ -10,7 +10,6 @@ import ast import os import pathlib import re -import sys from typing import TYPE_CHECKING from ptscripts import Context, command_group @@ -831,8 +830,7 @@ def annotate( # Print it to stdout so that the GitHub runner pick's it up and adds the annotation ctx.print( f"::{kind} file={fpath},line={start_lineno},endLine={end_lineno}::{message}", - file=sys.stdout, - flush=True, + soft_wrap=True, ) From 6b891fa37828d9ec34cc56a1f5341e55d3c9e826 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 5 Dec 2023 18:36:01 +0000 Subject: [PATCH 2/7] One more place where `arch` needs to be translated Signed-off-by: Pedro Algarvio --- .../workflows/templates/test-package-downloads-action.yml.jinja | 2 +- .github/workflows/test-package-downloads-action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index ce608ce98bb..4f9502d7aae 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -346,7 +346,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 1a1b8a50268..b771b7265cd 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -489,7 +489,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache From 546b3ee29b58d5c83d65f9363025e1ccbacd2477 Mon Sep 17 00:00:00 2001 From: Shane Lee Date: Tue, 5 Dec 2023 17:30:26 -0700 Subject: [PATCH 3/7] Add workflow to add arm for macos to the repo --- .github/workflows/nightly.yml | 6 ++++++ .github/workflows/staging.yml | 6 ++++++ .github/workflows/templates/build-onedir-repo.yml.jinja | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 06bbecd6e06..a3ec6b27dd3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -3714,6 +3714,12 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz path: artifacts/pkgs/incoming + - name: Download macOS arm64 Onedir Archive + uses: actions/download-artifact@v3 + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + path: artifacts/pkgs/incoming + - name: Download Windows amd64 Onedir Archive uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index da7f6fd2c36..6e731f36da6 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -3520,6 +3520,12 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz path: artifacts/pkgs/incoming + - name: Download macOS arm64 Onedir Archive + uses: actions/download-artifact@v3 + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + path: artifacts/pkgs/incoming + - name: Download Windows amd64 Onedir Archive uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/templates/build-onedir-repo.yml.jinja b/.github/workflows/templates/build-onedir-repo.yml.jinja index 9b1daf3ce7e..f3b204d8ba9 100644 --- a/.github/workflows/templates/build-onedir-repo.yml.jinja +++ b/.github/workflows/templates/build-onedir-repo.yml.jinja @@ -37,6 +37,12 @@ name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz path: artifacts/pkgs/incoming + - name: Download macOS arm64 Onedir Archive + uses: actions/download-artifact@v3 + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + path: artifacts/pkgs/incoming + - name: Download Windows amd64 Onedir Archive uses: actions/download-artifact@v3 with: From d116b654e09ea4380dd8872627bf3f5a3674cdcc Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 5 Dec 2023 20:30:16 -0700 Subject: [PATCH 4/7] Bump cache seed --- .github/workflows/templates/layout.yml.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 45c529f1e86..4eb3c6e1b5a 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -34,7 +34,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-5 # Bump the number to invalidate all caches + CACHE_SEED: SEED-6 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" <%- endblock env %> From 760c4ce1e359baeaa010689b2ec601bf5d4514af Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 5 Dec 2023 21:11:31 -0700 Subject: [PATCH 5/7] compile workflows --- .github/workflows/ci.yml | 2 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/scheduled.yml | 2 +- .github/workflows/staging.yml | 2 +- .github/workflows/templates/layout.yml.jinja | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4949c233c59..ffeb2dfef10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-5 # Bump the number to invalidate all caches + CACHE_SEED: SEED-7 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" permissions: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a3ec6b27dd3..763faa31521 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -22,7 +22,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-5 # Bump the number to invalidate all caches + CACHE_SEED: SEED-7 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f9b99ccd27..b0752237544 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-5 # Bump the number to invalidate all caches + CACHE_SEED: SEED-7 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" permissions: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index f8ce37c72fe..c03929fc970 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -12,7 +12,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-5 # Bump the number to invalidate all caches + CACHE_SEED: SEED-7 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" permissions: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 6e731f36da6..3e41ed1a800 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -37,7 +37,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-5 # Bump the number to invalidate all caches + CACHE_SEED: SEED-7 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" permissions: diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 4eb3c6e1b5a..5934eb8d579 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -34,7 +34,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-6 # Bump the number to invalidate all caches + CACHE_SEED: SEED-7 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" <%- endblock env %> From 18d4d98e945047662fee03c68a8f617f94227327 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 5 Dec 2023 22:45:35 -0700 Subject: [PATCH 6/7] Fix artifact name --- .github/workflows/nightly.yml | 2 +- .github/workflows/staging.yml | 2 +- .github/workflows/templates/build-onedir-repo.yml.jinja | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 763faa31521..62c58619c70 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -3717,7 +3717,7 @@ jobs: - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 3e41ed1a800..0940d371b7e 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -3523,7 +3523,7 @@ jobs: - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/templates/build-onedir-repo.yml.jinja b/.github/workflows/templates/build-onedir-repo.yml.jinja index f3b204d8ba9..8e51caa9c8b 100644 --- a/.github/workflows/templates/build-onedir-repo.yml.jinja +++ b/.github/workflows/templates/build-onedir-repo.yml.jinja @@ -40,7 +40,7 @@ - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive From 4ff201ac038900322957620270529b09fce0c8e1 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 6 Dec 2023 01:46:28 -0700 Subject: [PATCH 7/7] Fix onedir pkg download test --- .github/workflows/test-package-downloads-action.yml | 2 +- tools/precommit/workflows.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index b771b7265cd..6bed0c6a01c 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -445,7 +445,7 @@ jobs: arch: arm64 pkg-type: package - distro-slug: macos-13-xlarge - arch: arm64 + arch: aarch64 pkg-type: onedir steps: diff --git a/tools/precommit/workflows.py b/tools/precommit/workflows.py index 2946ae9f279..4a75dba2148 100644 --- a/tools/precommit/workflows.py +++ b/tools/precommit/workflows.py @@ -270,8 +270,6 @@ def generate_workflows(ctx: Context): arch = "arm64" test_salt_pkg_downloads_listing["macos"].append((slug, arch, "package")) for slug, display_name, arch in build_ci_deps_listing["macos"][-1:]: - if arch == "aarch64": - arch = "arm64" test_salt_pkg_downloads_listing["macos"].append((slug, arch, "onedir")) for slug, display_name, arch in build_ci_deps_listing["windows"][-1:]: for pkg_type in ("nsis", "msi", "onedir"):