Skip to content

Commit 836e633

Browse files
committed
chore: Merge branch 'main' into feature/kvp-reorg
2 parents aba6663 + 958f62f commit 836e633

File tree

301 files changed

+22267
-7968
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+22267
-7968
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
xtask = "run --package xtask --"

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
crates/stackable-operator/crds/*.yaml linguist-generated
12
*.stderr linguist-generated
23
*.snap linguist-generated

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
22
blank_issues_enabled: true
33
contact_links:
4-
- name: Feature request
5-
about: 🚀 Suggest an idea for this project
6-
url: https://github.com/stackabletech/operator-rs/discussions/new?category=ideas
74
- name: 🙋🏾 Question
85
about: Use this to ask a question about this project
9-
url: https://github.com/stackabletech/operator-rs/discussions/new?category=q-a
10-
- name: Other issue
11-
about: Open an issue that doesn't fit any other category
6+
url: https://github.com/orgs/stackabletech/discussions/new?category=q-a
7+
- name: 🚀 Feature Requests and other things
8+
about: Open an issue with your feature request or any other issue not covered elsewhere
129
url: https://github.com/stackabletech/operator-rs/issues/new

.github/ISSUE_TEMPLATE/release-workspace-members.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Pre-Release Workspace Member Updates and Releases
33
about: This template can be used to track the updates and releases of all workspace members leading up to the next Stackable release
4-
title: "chore: Update and release workspace members"
4+
title: "chore: Update and release workspace members for Stackable Release YY.M.X"
55
labels: ['epic']
66
assignees: ''
77
---
@@ -11,7 +11,7 @@ assignees: ''
1111
This was created by an issue template: https://github.com/stackabletech/operator-rs/issues/new/choose.
1212
-->
1313

14-
## Update and Release Workspace Members for Stackable Release XX.(X)X
14+
Part of stackabletech/issues#xxx.
1515

1616
> [!NOTE]
1717
> During a Stackable release we update all dependencies in the `operator-rs`
@@ -21,15 +21,12 @@ assignees: ''
2121
2222
Replace the items in the task lists below with the applicable Pull Requests
2323

24-
```[tasklist]
25-
### Tasks
2624
- [ ] Update Rust version and workflow actions, see below for more details.
2725
- [ ] Update Rust dependencies, see below for more details.
2826
- [ ] Adjust and then verify crate versions using `.scripts/verify_crate_versions.sh`.
2927
- [ ] Push the release tags using `.scripts/tag_and_push_release.sh`.
30-
```
3128

32-
### Update Rust Version and Workflow Actions
29+
## Update Rust Version and Workflow Actions
3330

3431
> [!NOTE]
3532
> The PR is usually titled: `chore: Bump Rust version and workflow actions`
@@ -39,12 +36,13 @@ Replace the items in the task lists below with the applicable Pull Requests
3936
2. Adjust the version `RUST_TOOLCHAIN_VERSION` in the workflows:
4037
- `.github/workflows/build.yml`
4138
- `.github/workflows/pre_commit.yaml`
39+
- `.github/workflows/publish-docs.yaml`
4240
3. Add a changelog entry.
4341
4. Update any actions (using the Git commit hash) in the workflows. Hint: Also
4442
make sure that the `cargo-udeps` action is up-to-date, otherwise the CI might
4543
report errors.
4644

47-
### Update Rust Dependencies
45+
## Update Rust Dependencies
4846

4947
> [!NOTE]
5048
> This PR is usually titled: `chore: Bump Rust dependencies`
@@ -58,7 +56,7 @@ Replace the items in the task lists below with the applicable Pull Requests
5856
override the dependency.
5957
5. Add a changelog entry if required.
6058

61-
### Adjust and Verify Crate Versions
59+
## Adjust and Verify Crate Versions
6260

6361
> [!WARNING]
6462
> Currently, all workspace members use `0.X.Y` versions. This means we can

.github/pull_request_template.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
- Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
88
- Please make sure all these things are done and tick the boxes
99

10-
```[tasklist]
11-
# Author
10+
### Author
11+
1212
- [ ] Changes are OpenShift compatible
1313
- [ ] CRD changes approved
14+
- [ ] CRD documentation for all fields, following the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs/style-guide).
1415
- [ ] Integration tests passed (for non trivial changes)
15-
```
16+
- [ ] Changes need to be "offline" compatible
17+
18+
### Reviewer
1619

17-
```[tasklist]
18-
# Reviewer
1920
- [ ] Code contains useful comments
21+
- [ ] Code contains useful logging statements
2022
- [ ] (Integration-)Test cases added
21-
- [ ] Documentation added or updated
23+
- [ ] Documentation added or updated. Follows the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs/style-guide).
2224
- [ ] Changelog updated
2325
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
24-
```
2526

26-
```[tasklist]
27-
# Acceptance
27+
### Acceptance
28+
2829
- [ ] Feature Tracker has been updated
2930
- [ ] Proper release label has been added
30-
```

.github/workflows/build.yml

Lines changed: 22 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ env:
1717
CARGO_TERM_COLOR: always
1818
CARGO_INCREMENTAL: '0'
1919
CARGO_PROFILE_DEV_DEBUG: '0'
20-
RUST_TOOLCHAIN_VERSION: "1.80.1"
20+
RUST_TOOLCHAIN_VERSION: "1.87.0"
2121
RUSTFLAGS: "-D warnings"
2222
RUSTDOCFLAGS: "-D warnings"
2323
RUST_LOG: "info"
2424

25+
permissions: {}
26+
2527
jobs:
2628
# Identify unused dependencies
2729
run_udeps:
@@ -30,14 +32,16 @@ jobs:
3032
env:
3133
RUSTC_BOOTSTRAP: 1
3234
steps:
33-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
persist-credentials: false
3438
- uses: dtolnay/rust-toolchain@master
3539
with:
3640
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
37-
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
41+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
3842
with:
3943
key: udeps
40-
- run: cargo install --locked [email protected].50
44+
- run: cargo install --locked [email protected].57
4145
- run: cargo udeps --all-targets --all-features
4246

4347
run_cargodeny:
@@ -53,96 +57,50 @@ jobs:
5357
continue-on-error: ${{ matrix.checks == 'advisories' }}
5458

5559
steps:
56-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
57-
- uses: EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3
58-
with:
59-
command: check ${{ matrix.checks }}
60-
61-
run_rustfmt:
62-
name: Run Rustfmt
63-
runs-on: ubuntu-latest
64-
steps:
65-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
66-
- uses: dtolnay/rust-toolchain@master
67-
with:
68-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
69-
components: rustfmt
70-
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
71-
with:
72-
key: fmt
73-
- run: cargo fmt --all -- --check
74-
75-
run_clippy:
76-
name: Run Clippy
77-
runs-on: ubuntu-latest
78-
steps:
79-
- name: Install host dependencies
80-
run: |
81-
sudo apt-get update
82-
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
83-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8461
with:
85-
submodules: recursive
86-
- uses: dtolnay/rust-toolchain@master
62+
persist-credentials: false
63+
- uses: EmbarkStudios/cargo-deny-action@30f817c6f72275c6d54dc744fbca09ebc958599f # v2.0.12
8764
with:
88-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
89-
components: clippy
90-
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
91-
with:
92-
key: clippy
93-
- name: Run clippy action to produce annotations
94-
# NOTE (@Techassi): This action might get a new release sonn, because it
95-
# currently uses Node 16, which is deprecated in the next few months by
96-
# GitHub. See https://github.com/giraffate/clippy-action/pull/87
97-
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1.0.1
98-
env:
99-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
if: env.GITHUB_TOKEN != null && github.event.pull_request.draft == false
101-
with:
102-
clippy_flags: --all-targets -- -D warnings
103-
reporter: 'github-pr-review'
104-
github_token: ${{ secrets.GITHUB_TOKEN }}
105-
- name: Run clippy manually without annotations
106-
env:
107-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108-
if: env.GITHUB_TOKEN == null
109-
run: cargo clippy --color never -q --all-targets -- -D warnings
65+
command: check ${{ matrix.checks }}
11066

11167
run_rustdoc:
11268
name: Run RustDoc
11369
runs-on: ubuntu-latest
11470
steps:
115-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
71+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
with:
73+
persist-credentials: false
11674
- uses: dtolnay/rust-toolchain@master
11775
with:
11876
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
11977
components: rustfmt
120-
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
78+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
12179
with:
12280
key: doc
12381
- run: cargo doc --document-private-items
12482

12583
run_tests:
12684
name: Run Cargo Tests
12785
needs:
128-
- run_cargodeny
129-
- run_clippy
130-
- run_rustfmt
13186
- run_rustdoc
13287
runs-on: ubuntu-latest
13388
steps:
134-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
89+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90+
with:
91+
persist-credentials: false
13592
- uses: dtolnay/rust-toolchain@master
13693
with:
13794
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
13895
# rust-src is required for trybuild stderr output comparison to work
13996
# for our cases.
14097
# See: https://github.com/dtolnay/trybuild/issues/236#issuecomment-1620950759
14198
components: rust-src
142-
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
99+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
143100
with:
144101
key: test
145-
- run: cargo test --all-features
102+
- run: cargo test --no-default-features --workspace
103+
- run: cargo test --all-features --workspace
146104

147105
tests_passed:
148106
name: All tests passed

.github/workflows/daily_security.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
- cron: '15 4 * * *'
77
workflow_dispatch:
88

9+
permissions: {}
10+
911
jobs:
1012
audit:
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
14-
- uses: rustsec/audit-check@dd51754d4e59da7395a4cd9b593f0ff2d61a9b95 # v1.4.1
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
18+
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
1519
with:
1620
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr_pre-commit.yaml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,26 @@ name: pre-commit
33

44
on:
55
pull_request:
6+
merge_group:
67

78
env:
89
CARGO_TERM_COLOR: always
9-
RUST_TOOLCHAIN_VERSION: "1.80.1"
10-
HADOLINT_VERSION: "v1.17.6"
10+
RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26"
11+
12+
permissions: {}
1113

1214
jobs:
1315
pre-commit:
1416
runs-on: ubuntu-latest
1517
steps:
16-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1719
with:
20+
persist-credentials: false
1821
fetch-depth: 0
19-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
20-
with:
21-
python-version: '3.12'
22-
- uses: dtolnay/rust-toolchain@master
23-
with:
24-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
25-
components: rustfmt,clippy
26-
- name: Setup Hadolint
27-
shell: bash
28-
run: |
29-
set -euo pipefail
30-
31-
LOCATION_DIR="$HOME/.local/bin"
32-
LOCATION_BIN="$LOCATION_DIR/hadolint"
33-
34-
SYSTEM=$(uname -s)
35-
ARCH=$(uname -m)
36-
37-
mkdir -p "$LOCATION_DIR"
38-
curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH"
39-
chmod 700 "${LOCATION_BIN}"
40-
41-
echo "$LOCATION_DIR" >> "$GITHUB_PATH"
42-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
22+
- uses: stackabletech/actions/run-pre-commit@4483641a7e24057bd2ba51cb4c3f2f0010ad21b7 # v0.8.4
4323
with:
44-
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
24+
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
25+
# rust-src is required for trybuild stderr output comparison to work
26+
# for our cases.
27+
# See: https://github.com/dtolnay/trybuild/issues/236#issuecomment-1620950759
28+
rust-components: rustfmt,clippy,rust-src

.github/workflows/publish-docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Publish Crate Docs
3+
4+
# Once the `preview` input is available, this can also run on PR when docs are
5+
# changed.
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .github/workflows/publish-docs.yml
13+
- crates/**
14+
15+
env:
16+
RUST_TOOLCHAIN_VERSION: "1.87.0"
17+
18+
permissions: {}
19+
20+
jobs:
21+
build-docs:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
32+
33+
- name: Build Crate Docs
34+
run: cargo doc --no-deps --all-features
35+
36+
- name: Add Redirect
37+
run: echo '<meta http-equiv="refresh" content="0;url=stackable_operator/index.html">' > target/doc/index.html
38+
39+
- name: Upload Documentation Artifacts
40+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
41+
with:
42+
path: target/doc
43+
44+
publish-docs:
45+
runs-on: ubuntu-latest
46+
needs: build-docs
47+
permissions:
48+
pages: write
49+
id-token: write
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deploy.outputs.page_url }}
53+
steps:
54+
- name: Deploy to Github Pages
55+
id: deploy
56+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)