From 8b3033d06d23f88863b52c7852e8686f14746473 Mon Sep 17 00:00:00 2001 From: Techassi Date: Fri, 13 Sep 2024 12:08:20 +0200 Subject: [PATCH 1/5] chore: Remove unused pre-commit hooks --- .github/workflows/pr_pre-commit.yml | 25 ------------------------- .pre-commit-config.yaml | 5 ----- 2 files changed, 30 deletions(-) diff --git a/.github/workflows/pr_pre-commit.yml b/.github/workflows/pr_pre-commit.yml index c10a09c9..863af074 100644 --- a/.github/workflows/pr_pre-commit.yml +++ b/.github/workflows/pr_pre-commit.yml @@ -4,11 +4,6 @@ name: pre-commit on: pull_request: -env: - CARGO_TERM_COLOR: always - RUST_TOOLCHAIN_VERSION: "1.80.1" - HADOLINT_VERSION: "v1.17.6" - jobs: pre-commit: runs-on: ubuntu-latest @@ -19,26 +14,6 @@ jobs: - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: '3.12' - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} - components: rustfmt,clippy - - name: Setup Hadolint - shell: bash - run: | - set -euo pipefail - - LOCATION_DIR="$HOME/.local/bin" - LOCATION_BIN="$LOCATION_DIR/hadolint" - - SYSTEM=$(uname -s) - ARCH=$(uname -m) - - mkdir -p "$LOCATION_DIR" - curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH" - chmod 700 "${LOCATION_BIN}" - - echo "$LOCATION_DIR" >> "$GITHUB_PATH" - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 with: extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 39a40f3e..e33e378e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,8 +49,3 @@ repos: rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1 hooks: - id: actionlint - - - repo: https://github.com/hadolint/hadolint - rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0 - hooks: - - id: hadolint From b089fe9436169ec125451b7ac50e6eb652ec2923 Mon Sep 17 00:00:00 2001 From: Techassi Date: Fri, 13 Sep 2024 12:08:43 +0200 Subject: [PATCH 2/5] chore: Rename Ansible config file --- config/{rust.yaml => versions.yaml} | 4 ++++ 1 file changed, 4 insertions(+) rename config/{rust.yaml => versions.yaml} (59%) diff --git a/config/rust.yaml b/config/versions.yaml similarity index 59% rename from config/rust.yaml rename to config/versions.yaml index 8abf7693..7e60cc1a 100644 --- a/config/rust.yaml +++ b/config/versions.yaml @@ -3,4 +3,8 @@ # If you change the Rust toolchain version here, make sure to also change # docker-images/ubi8-rust-builder/Dockerfile & docker-images/ubi9-rust-builder/Dockerfile rust_version: 1.80.0 + +# IMPORTANT +# If you change the Hadolint version here, make sure to also change the hook +# refs in the local and template .pre-commit-config.yaml files. hadolint_version: v2.12.0 From 0158cbf1a2f776ff49db6eb4afc4f2524d9c58e3 Mon Sep 17 00:00:00 2001 From: Techassi Date: Fri, 13 Sep 2024 12:09:09 +0200 Subject: [PATCH 3/5] chore: Add pre-commit instructions to issue template --- .github/ISSUE_TEMPLATE/pre-release.md | 35 +++++++++++++++++++-------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/pre-release.md b/.github/ISSUE_TEMPLATE/pre-release.md index 1a399e3b..341e4315 100644 --- a/.github/ISSUE_TEMPLATE/pre-release.md +++ b/.github/ISSUE_TEMPLATE/pre-release.md @@ -1,7 +1,10 @@ --- -name: Pre-Release Rust Toolchain Update -about: This template can be used to track the update of the Rust toolchain in this repository as well as all downstream product operators leading up to the next Stackable release -title: "chore: Update Rust toolchain to 1.XX" +name: Pre-Release Updates +about: | + This template can be used to track the update of various dependencies and + tooling in this repository as well as all downstream product operators leading + up to the next Stackable release +title: "chore: Pre-release updates" labels: ['epic'] assignees: '' --- @@ -11,7 +14,7 @@ assignees: '' This was created by an issue template: https://github.com/stackabletech/operator-templating/issues/new/choose. --> -## Pre-Release Rust Toolchain Update for Stackable Release XX.(X)X +## Pre-Release Updates for Stackable Release XX.(X)X ```[tasklist] -### Tasks in Downstream Repositories +### Tasks in Downstream Operator Repositories - [ ] https://github.com/stackabletech/airflow-operator/pulls?q=sort:updated-desc+is:pr+is:open+Update+templated+files - [ ] https://github.com/stackabletech/commons-operator/pulls?q=sort:updated-desc+is:pr+is:open+Update+templated+files - [ ] https://github.com/stackabletech/druid-operator/pulls?q=sort:updated-desc+is:pr+is:open+Update+templated+files From b850bc6e1ef220a109c253ce19fea264f3bfd3d8 Mon Sep 17 00:00:00 2001 From: Techassi Date: Fri, 13 Sep 2024 13:22:55 +0200 Subject: [PATCH 4/5] Revert "chore: Remove unused pre-commit hooks" This reverts commit 8b3033d06d23f88863b52c7852e8686f14746473. --- .github/workflows/pr_pre-commit.yml | 19 +++++++++++++++++++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/pr_pre-commit.yml b/.github/workflows/pr_pre-commit.yml index 863af074..af999b61 100644 --- a/.github/workflows/pr_pre-commit.yml +++ b/.github/workflows/pr_pre-commit.yml @@ -4,6 +4,9 @@ name: pre-commit on: pull_request: +env: + HADOLINT_VERSION: "v1.17.6" + jobs: pre-commit: runs-on: ubuntu-latest @@ -14,6 +17,22 @@ jobs: - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: '3.12' + - name: Setup Hadolint + shell: bash + run: | + set -euo pipefail + + LOCATION_DIR="$HOME/.local/bin" + LOCATION_BIN="$LOCATION_DIR/hadolint" + + SYSTEM=$(uname -s) + ARCH=$(uname -m) + + mkdir -p "$LOCATION_DIR" + curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH" + chmod 700 "${LOCATION_BIN}" + + echo "$LOCATION_DIR" >> "$GITHUB_PATH" - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 with: extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e33e378e..39a40f3e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,3 +49,8 @@ repos: rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1 hooks: - id: actionlint + + - repo: https://github.com/hadolint/hadolint + rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0 + hooks: + - id: hadolint From d3fcbb258bf6d80866da393b5c7edd4f31e892b0 Mon Sep 17 00:00:00 2001 From: Techassi Date: Fri, 13 Sep 2024 13:26:11 +0200 Subject: [PATCH 5/5] chore: Bump to Rust 1.80.1 --- config/versions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/versions.yaml b/config/versions.yaml index 7e60cc1a..d7f74902 100644 --- a/config/versions.yaml +++ b/config/versions.yaml @@ -2,7 +2,7 @@ # IMPORTANT # If you change the Rust toolchain version here, make sure to also change # docker-images/ubi8-rust-builder/Dockerfile & docker-images/ubi9-rust-builder/Dockerfile -rust_version: 1.80.0 +rust_version: 1.80.1 # IMPORTANT # If you change the Hadolint version here, make sure to also change the hook