Skip to content

Commit 9d51b75

Browse files
authored
Merge branch 'main' into chore/update-vector-25.3.0
2 parents ac67a9e + 66b0b80 commit 9d51b75

File tree

81 files changed

+4418
-9006
lines changed

Some content is hidden

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

81 files changed

+4418
-9006
lines changed

.flake8

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
self-hosted-runner:
3+
# Ubicloud machines we are using
4+
labels:
5+
- ubicloud-standard-8-arm

.github/workflows/build.yml

Lines changed: 60 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- "renovate/**"
1515
tags:
1616
- '[0-9][0-9].[0-9]+.[0-9]+'
17+
- '[0-9][0-9].[0-9]+.[0-9]+-rc[0-9]+'
1718
pull_request:
1819
merge_group:
1920
schedule:
@@ -25,7 +26,7 @@ env:
2526
CARGO_TERM_COLOR: always
2627
CARGO_INCREMENTAL: '0'
2728
CARGO_PROFILE_DEV_DEBUG: '0'
28-
RUST_TOOLCHAIN_VERSION: "1.79.0"
29+
RUST_TOOLCHAIN_VERSION: "1.82.0"
2930
RUSTFLAGS: "-D warnings"
3031
RUSTDOCFLAGS: "-D warnings"
3132
RUST_LOG: "info"
@@ -49,7 +50,7 @@ jobs:
4950
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5051
with:
5152
submodules: recursive
52-
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
53+
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
5354
with:
5455
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
5556
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
@@ -88,18 +89,18 @@ jobs:
8889
TRIGGER: ${{ github.event_name }}
8990
GITHUB_REF: ${{ github.ref }}
9091
run: |
91-
if [[ $TRIGGER == "pull_request" ]]; then
92+
if [[ "$TRIGGER" == "pull_request" ]]; then
9293
echo "exporting test as target helm repo: ${{ env.TEST_REPO_HELM_URL }}"
93-
echo "helm_repo=${{ env.TEST_REPO_HELM_URL }}" >> $GITHUB_OUTPUT
94-
elif [[ ( $TRIGGER == "push" || $TRIGGER == "schedule" || $TRIGGER == "workflow_dispatch" ) && $GITHUB_REF == "refs/heads/main" ]]; then
94+
echo "helm_repo=${{ env.TEST_REPO_HELM_URL }}" >> "$GITHUB_OUTPUT"
95+
elif [[ ( "$TRIGGER" == "push" || "$TRIGGER" == "schedule" || "$TRIGGER" == "workflow_dispatch" ) && "$GITHUB_REF" == "refs/heads/main" ]]; then
9596
echo "exporting dev as target helm repo: ${{ env.DEV_REPO_HELM_URL }}"
96-
echo "helm_repo=${{ env.DEV_REPO_HELM_URL }}" >> $GITHUB_OUTPUT
97-
elif [[ $TRIGGER == "push" && $GITHUB_REF == refs/tags/* ]]; then
97+
echo "helm_repo=${{ env.DEV_REPO_HELM_URL }}" >> "$GITHUB_OUTPUT"
98+
elif [[ "$TRIGGER" == "push" && $GITHUB_REF == refs/tags/* ]]; then
9899
echo "exporting stable as target helm repo: ${{ env.STABLE_REPO_HELM_URL }}"
99-
echo "helm_repo=${{ env.STABLE_REPO_HELM_URL }}" >> $GITHUB_OUTPUT
100+
echo "helm_repo=${{ env.STABLE_REPO_HELM_URL }}" >> "$GITHUB_OUTPUT"
100101
else
101102
echo "Unknown trigger and ref combination encountered, skipping publish step: $TRIGGER $GITHUB_REF"
102-
echo "helm_repo=skip" >> $GITHUB_OUTPUT
103+
echo "helm_repo=skip" >> "$GITHUB_OUTPUT"
103104
fi
104105
105106
run_cargodeny:
@@ -118,7 +119,7 @@ jobs:
118119
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
119120
with:
120121
submodules: recursive
121-
- uses: EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3
122+
- uses: EmbarkStudios/cargo-deny-action@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268 # v2.0.1
122123
with:
123124
command: check ${{ matrix.checks }}
124125

@@ -129,7 +130,7 @@ jobs:
129130
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
130131
with:
131132
submodules: recursive
132-
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
133+
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
133134
with:
134135
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
135136
components: rustfmt
@@ -147,7 +148,7 @@ jobs:
147148
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
148149
with:
149150
submodules: recursive
150-
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
151+
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
151152
with:
152153
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
153154
components: clippy
@@ -182,7 +183,7 @@ jobs:
182183
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
183184
with:
184185
submodules: recursive
185-
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
186+
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
186187
with:
187188
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
188189
components: rustfmt
@@ -204,7 +205,7 @@ jobs:
204205
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
205206
with:
206207
submodules: recursive
207-
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
208+
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
208209
with:
209210
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
210211
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
@@ -224,7 +225,7 @@ jobs:
224225
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
225226
with:
226227
submodules: recursive
227-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
228+
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
228229
with:
229230
python-version: '3.12'
230231
- name: Install jinja2-cli
@@ -265,9 +266,9 @@ jobs:
265266
- name: Set up Helm
266267
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
267268
with:
268-
version: v3.13.3
269+
version: v3.16.1
269270
- name: Set up cargo
270-
uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
271+
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
271272
with:
272273
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
273274
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
@@ -310,6 +311,7 @@ jobs:
310311
matrix:
311312
runner: ["ubuntu-latest", "ubicloud-standard-8-arm"]
312313
runs-on: ${{ matrix.runner }}
314+
timeout-minutes: 120
313315
permissions:
314316
id-token: write
315317
env:
@@ -331,8 +333,8 @@ jobs:
331333
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
332334
with:
333335
submodules: recursive
334-
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
335-
- uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a
336+
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
337+
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
336338
with:
337339
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
338340
components: rustfmt
@@ -343,17 +345,30 @@ jobs:
343345
with:
344346
crate: cargo-edit
345347
bin: cargo-set-version
346-
- name: Update version if PR
347-
if: ${{ github.event_name == 'pull_request' }}
348-
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
348+
- name: Update version if PR against main branch
349+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
350+
env:
351+
PR_NUMBER: ${{ github.event.pull_request.number }}
352+
run: |
353+
PR_VERSION="0.0.0-pr${PR_NUMBER}"
354+
cargo set-version --offline --workspace "$PR_VERSION"
355+
- name: Update version if PR against non-main branch
356+
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
357+
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
358+
env:
359+
PR_NUMBER: ${{ github.event.pull_request.number }}
360+
run: |
361+
MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version')
362+
PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}"
363+
cargo set-version --offline --workspace "$PR_VERSION"
349364
350365
# Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
351366
# default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
352367
# This is needed for the HELM_REPO variable.
353368
- name: Install cosign
354-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
369+
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
355370
- name: Install syft
356-
uses: anchore/sbom-action/download-syft@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0
371+
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2
357372
- name: Build Docker image and Helm chart
358373
run: |
359374
# Installing helm and yq on ubicloud-standard-8-arm only
@@ -379,10 +394,11 @@ jobs:
379394
- id: printtag
380395
name: Output image name and tag
381396
if: ${{ !github.event.pull_request.head.repo.fork }}
382-
run: echo "IMAGE_TAG=$(make -e print-docker-tag)" >> $GITHUB_OUTPUT
397+
run: echo "IMAGE_TAG=$(make -e print-docker-tag)" >> "$GITHUB_OUTPUT"
383398

384399
create_manifest_list:
385400
name: Build and publish manifest list
401+
if: ${{ !github.event.pull_request.head.repo.fork }}
386402
needs:
387403
- package_and_publish
388404
runs-on: ubuntu-latest
@@ -396,7 +412,7 @@ jobs:
396412
OCI_REGISTRY_SDP_CHARTS_USERNAME: "robot$sdp-charts+github-action-build"
397413
steps:
398414
- name: Install cosign
399-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
415+
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
400416
- name: Checkout
401417
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
402418
with:
@@ -408,9 +424,22 @@ jobs:
408424
with:
409425
crate: cargo-edit
410426
bin: cargo-set-version
411-
- name: Update version if PR
412-
if: ${{ github.event_name == 'pull_request' }}
413-
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
427+
- name: Update version if PR against main branch
428+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
429+
env:
430+
PR_NUMBER: ${{ github.event.pull_request.number }}
431+
run: |
432+
PR_VERSION="0.0.0-pr${PR_NUMBER}"
433+
cargo set-version --offline --workspace "$PR_VERSION"
434+
- name: Update version if PR against non-main branch
435+
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
436+
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
437+
env:
438+
PR_NUMBER: ${{ github.event.pull_request.number }}
439+
run: |
440+
MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version')
441+
PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}"
442+
cargo set-version --offline --workspace "$PR_VERSION"
414443
- name: Build manifest list
415444
run: |
416445
# Creating manifest list
@@ -430,11 +459,11 @@ jobs:
430459
steps:
431460
- name: Install preflight
432461
run: |
433-
wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.9.4/preflight-linux-amd64
462+
wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.10.0/preflight-linux-amd64
434463
chmod +x preflight-linux-amd64
435464
- name: Check container
436465
run: |
437466
ARCH_FOR_PREFLIGHT="$(arch | sed -e 's#x86_64#amd64#' | sed -e 's#aarch64#arm64#')"
438467
./preflight-linux-amd64 check container "$IMAGE_TAG" --platform "${ARCH_FOR_PREFLIGHT}" > preflight.out
439468
- name: "Passed?"
440-
run: '[ "$(cat preflight.out | jq -r .passed)" == true ]'
469+
run: '[ "$(jq -r .passed < preflight.out)" == true ]'
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
name: Integration Test
3+
run-name: |
4+
Integration Test on ${{ inputs.test-platform }}-${{ inputs.test-architecture }} (${{ inputs.test-run == 'all' && 'all' || format('{0}={1}', inputs.test-run, inputs.test-parameter) }})
5+
6+
env:
7+
DEFAULT_TEST_PLATFORM: kind-1.31.0
8+
DEFAULT_TEST_ARCHITECTURE: amd64
9+
DEFAULT_TEST_RUN: all
10+
DEFAULT_TEST_PARAMETER: "" # Unused when the test-run is 'all'
11+
TEST_PLATFORM: ${{ inputs.test-platform }}
12+
TEST_ARCHITECTURE: ${{ inputs.test-architecture }}
13+
TEST_RUN: ${{ inputs.test-run }}
14+
TEST_PARAMETER: ${{ inputs.test-parameter }}
15+
16+
on:
17+
# schedule:
18+
# At 00:00 on Sunday. See: https://crontab.guru/#0_0_*_*_0
19+
# - cron: "0 0 * * 0"
20+
workflow_dispatch:
21+
inputs:
22+
test-platform:
23+
description: |
24+
The test platform to run on
25+
required: true
26+
type: choice
27+
options:
28+
- kind-1.31.2
29+
- kind-1.30.6
30+
- rke2-1.31.2
31+
- rke2-1.30.6
32+
- k3s-1.31.2
33+
- k3s-1.30.6
34+
- aks-1.29
35+
- aks-1.28
36+
- aks-1.27
37+
- eks-1.29
38+
- eks-1.28
39+
- eks-1.27
40+
- gke-1.29
41+
- gke-1.28
42+
- gke-1.27
43+
- okd-4.15
44+
- okd-4.14
45+
- okd-4.13
46+
test-architecture:
47+
description: |
48+
The architecture the tests will run on. Consult the run-integration-test action README for
49+
more details on supported architectures for each distribution
50+
required: true
51+
type: choice
52+
options:
53+
- amd64
54+
- arm64
55+
test-run:
56+
description: Type of test run
57+
required: true
58+
type: choice
59+
options:
60+
- all
61+
- test-suite
62+
- test
63+
test-parameter:
64+
description: Parameter to `--test-suite` or `--test` (ignored for `all`)
65+
default: smoke
66+
67+
jobs:
68+
test:
69+
name: Run Integration Test
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Override integration test options for scheduled run
73+
if: github.event_name == 'schedule'
74+
shell: bash
75+
run: |
76+
set -euo pipefail
77+
78+
echo "TEST_PLATFORM=$DEFAULT_TEST_PLATFORM" | tee -a "$GITHUB_ENV"
79+
echo "TEST_ARCHITECTURE=$DEFAULT_TEST_ARCHITECTURE" | tee -a "$GITHUB_ENV"
80+
echo "TEST_RUN=$DEFAULT_TEST_RUN" | tee -a "$GITHUB_ENV"
81+
echo "TEST_PARAMETER=$DEFAULT_TEST_PARAMETER" | tee -a "$GITHUB_ENV"
82+
83+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
84+
with:
85+
submodules: recursive
86+
87+
- name: Run Integration Test
88+
id: test
89+
uses: stackabletech/actions/run-integration-test@5901c3b1455488820c4be367531e07c3c3e82538 # v0.4.0
90+
with:
91+
test-platform: ${{ env.TEST_PLATFORM }}-${{ env.TEST_ARCHITECTURE }}
92+
test-run: ${{ env.TEST_RUN }}
93+
test-parameter: ${{ env.TEST_PARAMETER }}
94+
replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }}
95+
96+
- name: Send Notification
97+
if: ${{ failure() }}
98+
env:
99+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
100+
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
101+
with:
102+
channel-id: "C07UYJYSMSN" # notifications-integration-tests
103+
payload: |
104+
{
105+
"text": "Integration Test *${{ github.repository }}* failed",
106+
"attachments": [
107+
{
108+
"pretext": "Started at ${{ steps.test.outputs.start-time }}, failed at ${{ steps.test.outputs.end-time }}",
109+
"color": "#aa0000",
110+
"actions": [
111+
{
112+
"type": "button",
113+
"text": "Go to integration test run",
114+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
115+
}
116+
]
117+
}
118+
]
119+
}

.github/workflows/pr_pre-commit.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ name: pre-commit
44
on:
55
pull_request:
66

7+
env:
8+
CARGO_TERM_COLOR: always
9+
RUST_TOOLCHAIN_VERSION: "1.82.0"
10+
HADOLINT_VERSION: "v2.12.0"
11+
PYTHON_VERSION: "3.12"
12+
713
jobs:
814
pre-commit:
915
runs-on: ubuntu-latest
1016
steps:
17+
- name: Install host dependencies
18+
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
19+
with:
20+
packages: protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config apt-transport-https
21+
version: ubuntu-latest
1122
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
12-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
1323
with:
14-
python-version: '3.12'
15-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
24+
fetch-depth: 0
25+
submodules: recursive
26+
- uses: stackabletech/actions/run-pre-commit@5b66858af3597c4ea34f9b33664b8034a1d28427 # v0.3.0
1627
with:
17-
extra_args: "" # Disable --all-files until we have time to fix druid/stackable/bin/run-druid
28+
python-version: ${{ env.PYTHON_VERSION }}
29+
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
30+
hadolint: ${{ env.HADOLINT_VERSION }}

0 commit comments

Comments
 (0)