Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions .github/ISSUE_TEMPLATE/pre-release.md
Original file line number Diff line number Diff line change
@@ -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: ''
---
Expand All @@ -11,30 +14,42 @@ 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

<!--
Replace 'TRACKING_ISSUE' with the applicable release tracking issue number.
-->

Part of <https://github.com/stackabletech/issues/TRACKING_ISSUE>

### Update pre-commit Workflow

> [!NOTE]
> The pre-commit config and workflows need to be kept up-to-date to ensure
> usage of recent tooling versions. This requires some manual work in this
> repository.

```[tasklist]
### Tasks
- [ ] Update `python-version` in local and templated `pr_pre-commit.yml` workflow
- [ ] Update hook refs in local and templated `.pre-commit-config.yaml` file
- [ ] Update Hadolint version in the `config/versions.yaml` file
```

### Update Rust Toolchain

> [!NOTE]
> During a Stackable release we need to ensure that every product operator uses
> the latest Rust toolchain (used by us). To keep the toolchain in sync across
> all our operators, we update the version centrally in this repository.

### Update Rust Toolchain

```[tasklist]
### Tasks in this Repository
- [ ] Update Rust toolchain in the `config/rust.yaml` file.
- [ ] Update Rust toolchain in the `config/versions.yaml` file.
- [ ] Generate downstream PRs using the ["Generate Downstream PRs"](https://github.com/stackabletech/operator-templating/actions/workflows/generate_prs.yml) action.
- [ ] Merge downstream PRs, see below for more details.
```

### Merge Downstream PRs

Replace the items in the task lists below with the applicable Pull Requests

<!--
Expand All @@ -46,7 +61,7 @@ Replace the items in the task lists below with the applicable Pull Requests
-->

```[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
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/pr_pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions config/rust.yaml → config/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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