Skip to content

Commit 424de27

Browse files
committed
cleanup: fix broken CI/CD jobs and prune redundant pipeline checks
- ci: declare crd-drift in docker job needs (fixes invalid needs ref) - chaos: load operator-image.tar.gz produced by build-operator action - perf: export and load image tarball correctly across build/benchmark - link-check: gate issue creation on steps.lychee.outputs.exit_code - stale-docs: drop leftover dup dtolnay toolchain install after setup-rust - maintenance: keep only stale-artifact regression (drop duplicated audit/docs jobs) - dependency-review: remove cargo-audit job duplicated by ci/security-audit - ci: drop cli-examples, backup-restore, upgrade-test, reconciler-benchmark (covered by make test) - check-cache-keys: fix unclosed if (repo-hygiene gate always failed)
1 parent 622a26d commit 424de27

8 files changed

Lines changed: 27 additions & 214 deletions

File tree

.github/workflows/chaos-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
name: chaos-operator-image
8484

8585
- name: Load Docker image
86-
run: gunzip -c stellar-operator-chaos.tar.gz | docker load
86+
run: gunzip -c operator-image.tar.gz | docker load
8787

8888
- name: Setup kind cluster
8989
uses: ./.github/actions/setup-kind-cluster
@@ -243,7 +243,7 @@ jobs:
243243
name: chaos-operator-image
244244

245245
- name: Load Docker image
246-
run: gunzip -c stellar-operator-chaos.tar.gz | docker load
246+
run: gunzip -c operator-image.tar.gz | docker load
247247

248248
- name: Setup kind cluster
249249
uses: ./.github/actions/setup-kind-cluster
@@ -415,7 +415,7 @@ jobs:
415415
name: chaos-operator-image
416416

417417
- name: Load Docker image
418-
run: gunzip -c stellar-operator-chaos.tar.gz | docker load
418+
run: gunzip -c operator-image.tar.gz | docker load
419419

420420
- name: Setup kind cluster
421421
uses: ./.github/actions/setup-kind-cluster

.github/workflows/ci.yml

Lines changed: 2 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -804,52 +804,6 @@ jobs:
804804
- name: Run tests
805805
run: make test
806806

807-
# ── 9.5. CLI Examples Validation ──────────────────────────────────────────────
808-
# Validates that all documented CLI examples parse correctly and are executable.
809-
# Ensures documentation stays in sync with the actual CLI interface.
810-
# Related: #1154 - Add pipeline stage that validates every documented CLI example command
811-
cli-examples-test:
812-
name: CLI Examples Validation
813-
runs-on: ubuntu-latest
814-
timeout-minutes: 10
815-
needs: [test]
816-
if: >-
817-
always() &&
818-
needs.test.result == 'success'
819-
steps:
820-
- uses: actions/checkout@v7
821-
822-
- name: Setup Rust
823-
uses: ./.github/actions/setup-rust
824-
with:
825-
cache-key: "ci-cli-examples"
826-
827-
- name: Run CLI examples tests
828-
run: cargo test --test cli_examples_test -- --nocapture
829-
830-
# ── 9.6. Backup & Restore Smoke Tests ─────────────────────────────────────────
831-
# Command-level smoke tests for backup and restore workflows.
832-
# Validates that backup/restore CLI commands work end-to-end with the file backend.
833-
# Related: #1149 - Add command-level smoke tests for backup and restore workflows
834-
backup-restore-smoke-test:
835-
name: Backup & Restore Smoke Tests
836-
runs-on: ubuntu-latest
837-
timeout-minutes: 15
838-
needs: [test]
839-
if: >-
840-
always() &&
841-
needs.test.result == 'success'
842-
steps:
843-
- uses: actions/checkout@v7
844-
845-
- name: Setup Rust
846-
uses: ./.github/actions/setup-rust
847-
with:
848-
cache-key: "ci-backup-restore"
849-
850-
- name: Run backup/restore smoke tests
851-
run: cargo test --test backup_restore_smoke_test -- --nocapture
852-
853807
# ── 10. Code coverage ─────────────────────────────────────────────────────────
854808
coverage:
855809
name: Code Coverage
@@ -901,7 +855,7 @@ jobs:
901855
(needs.crd-drift.result == 'success' || needs.crd-drift.result == 'skipped')
902856
runs-on: ubuntu-latest
903857
timeout-minutes: 20
904-
needs: [changes, helm-test, api-docs]
858+
needs: [changes, helm-test, api-docs, crd-drift]
905859
env:
906860
DOCKER_PLATFORMS: linux/amd64
907861
permissions:
@@ -981,64 +935,7 @@ jobs:
981935
with:
982936
image-ref: ${{ env.REGISTRY }}/${{ steps.setup-docker.outputs.image-name }}:sha-${{ github.sha }}
983937

984-
# ── 13. Upgrade workflow test ─────────────────────────────────────────────────
985-
upgrade-test:
986-
name: Upgrade Workflow Test
987-
runs-on: ubuntu-latest
988-
timeout-minutes: 15
989-
needs: [test]
990-
if: >-
991-
always() &&
992-
needs.test.result == 'success'
993-
steps:
994-
- uses: actions/checkout@v7
995-
996-
- name: Setup Rust
997-
uses: ./.github/actions/setup-rust
998-
with:
999-
cache-key: "ci-upgrade-test"
1000-
1001-
- name: Run upgrade orchestrator unit tests
1002-
# Note: compilation runs with K8S_OPENAPI_ENABLED_VERSION=1.30
1003-
run: cargo test --locked upgrade_orchestrator -- --nocapture
1004-
1005-
- name: Run PVC autoscaler unit tests
1006-
run: cargo test --locked pvc_autoscaler -- --nocapture
1007-
1008-
# ── 14. Reconciler Benchmark ──────────────────────────────────────────────────
1009-
reconciler-benchmark:
1010-
name: Reconciler Benchmark
1011-
runs-on: ubuntu-latest
1012-
timeout-minutes: 15
1013-
steps:
1014-
- uses: actions/checkout@v4
1015-
1016-
- name: Setup Rust
1017-
uses: ./.github/actions/setup-rust
1018-
with:
1019-
cache-key: "ci-bench"
1020-
1021-
- name: Run reconciler benchmark
1022-
run: |
1023-
cargo test --release --lib -- --nocapture 2>&1 \
1024-
| tee bench-amd64.txt
1025-
1026-
- name: Write benchmark summary
1027-
if: always()
1028-
run: |
1029-
{
1030-
echo "## Reconciler Benchmark Summary"
1031-
echo ""
1032-
if [[ -f bench-amd64.txt ]]; then
1033-
echo '```'
1034-
cat bench-amd64.txt
1035-
echo '```'
1036-
else
1037-
echo "⚠️ Benchmark results not available"
1038-
fi
1039-
} >> "$GITHUB_STEP_SUMMARY"
1040-
1041-
# ── 15. Chart Render Diff Check ───────────────────────────────────────────────
938+
# ── 13. Chart Render Diff Check ───────────────────────────────────────────────
1042939
# Detects unintended Helm chart template drift by comparing rendered output
1043940
# against a stored baseline.
1044941
# Related: #1145 - Implement chart render diff checks to catch unintended template drift

.github/workflows/dependency-review.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -44,40 +44,6 @@ env:
4444
CARGO_TERM_COLOR: always
4545

4646
jobs:
47-
# ── 1. cargo audit — known vulnerabilities ──────────────────────────────────
48-
cargo-audit:
49-
name: Cargo Audit (Vulnerabilities)
50-
runs-on: ubuntu-latest
51-
timeout-minutes: 10
52-
steps:
53-
- uses: actions/checkout@v4
54-
55-
- name: Setup Rust
56-
uses: ./.github/actions/setup-rust
57-
with:
58-
cache-key: "ci-audit"
59-
extra-tools: "cargo-audit"
60-
61-
- name: Run cargo audit
62-
run: |
63-
echo "── Security advisory audit ──────────────────────────────────────"
64-
cargo audit
65-
66-
- name: Generate audit JSON report
67-
if: always()
68-
run: |
69-
cargo audit --json 2>/dev/null > audit-report.json || true
70-
echo "Audit report saved to audit-report.json"
71-
72-
- name: Upload audit report
73-
if: always()
74-
uses: actions/upload-artifact@v4
75-
with:
76-
name: cargo-audit-report
77-
path: audit-report.json
78-
retention-days: 30
79-
80-
# ── 2. cargo deny — license + bans + advisories ─────────────────────────────
8147
# ── 1. cargo deny — license + bans + advisories ─────────────────────────────
8248
cargo-deny:
8349
name: Cargo Deny (Licenses + Bans)

.github/workflows/link-check.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v7
2727

28-
- name: (optional) Restore lychee cache removed
29-
run: echo "Skipping cache restore in scheduled link-check to satisfy repository hygiene checks. Lychee will run without cache."
30-
3128
- name: Run lychee
3229
id: lychee
3330
uses: lycheeverse/lychee-action@v2
@@ -44,13 +41,11 @@ jobs:
4441
output: lychee-report.md
4542

4643
- name: Open / update tracking issue on failure
47-
if: env.lychee_exit_code != '0'
44+
if: steps.lychee.outputs.exit_code != '0'
4845
uses: peter-evans/create-issue-from-file@v5
4946
with:
5047
title: "Link Check Report"
5148
content-filepath: lychee-report.md
5249
labels: |
5350
documentation
5451
ci
55-
env:
56-
lychee_exit_code: ${{ steps.lychee.outputs.exit_code }}

.github/workflows/maintenance.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,3 @@ jobs:
2727

2828
- name: Run stale artifact cleanup regression tests
2929
run: cargo test stale_artifact_cleanup -- --nocapture
30-
31-
dependency-audit:
32-
name: Dependency Audit
33-
runs-on: ubuntu-latest
34-
timeout-minutes: 10
35-
steps:
36-
- uses: actions/checkout@v4
37-
38-
- name: Setup Rust
39-
uses: ./.github/actions/setup-rust
40-
with:
41-
cache-key: "ci-maintenance-audit"
42-
extra-tools: "cargo-audit"
43-
cache-key: "ci-audit-maintenance"
44-
extra-tools: "cargo-audit"
45-
46-
- name: Run security audit
47-
run: cargo audit
48-
49-
docs-health:
50-
name: Docs Health Check
51-
runs-on: ubuntu-latest
52-
timeout-minutes: 10
53-
steps:
54-
- uses: actions/checkout@v4
55-
56-
- name: Set up Python
57-
uses: actions/setup-python@v6
58-
with:
59-
python-version: '3.12'
60-
61-
- name: Check documentation links
62-
run: python3 scripts/check-links.py

.github/workflows/performance.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,20 @@ jobs:
7474
7575
# Shared build-operator composite action consolidates Rust + Docker
7676
# bootstrap that was previously duplicated across workflows (issue #1136).
77+
# upload-artifact: "true" exports operator-image.tar.gz as an artifact.
7778
- name: Build operator binary and Docker image
7879
uses: ./.github/actions/build-operator
7980
with:
8081
image-tag: ${{ steps.version.outputs.version }}
8182
artifact-name: perf-operator-image-${{ steps.version.outputs.version }}
8283
cache-key: "perf-build"
83-
upload-artifact: "false" # we upload together with the binary below
84+
upload-artifact: "true"
8485

85-
- name: Upload artifacts
86+
- name: Upload operator binary
8687
uses: actions/upload-artifact@v7
8788
with:
8889
name: perf-artifacts-${{ steps.version.outputs.version }}
89-
path: |
90-
target/release/stellar-operator
91-
operator-image.tar.gz
90+
path: target/release/stellar-operator
9291
retention-days: 7
9392

9493
benchmark:
@@ -103,16 +102,22 @@ jobs:
103102
steps:
104103
- uses: actions/checkout@v7
105104

106-
- name: Download artifacts
105+
- name: Download operator binary
107106
uses: actions/download-artifact@v8
108107
with:
109108
name: perf-artifacts-${{ needs.build.outputs.version }}
110109

110+
- name: Download operator image tarball
111+
if: matrix.suite != 'webhook'
112+
uses: actions/download-artifact@v8
113+
with:
114+
name: perf-operator-image-${{ needs.build.outputs.version }}
115+
111116
- name: Load Docker image
112117
if: matrix.suite != 'webhook'
113118
run: |
114-
gunzip stellar-operator-image.tar.gz
115-
docker load < stellar-operator-image.tar
119+
gunzip operator-image.tar.gz
120+
docker load < operator-image.tar
116121
117122
- name: Setup performance environment
118123
if: matrix.suite != 'webhook'

.github/workflows/stale-docs.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@ jobs:
6969
uses: ./.github/actions/setup-rust
7070
with:
7171
cache-key: "docs-stale"
72-
# ── Rust toolchain ──────────────────────────────────────────────────────
73-
- name: Install Rust toolchain
74-
uses: dtolnay/rust-toolchain@stable
75-
76-
# ── Cargo cache step removed to satisfy repository-hygiene checks
77-
- name: (optional) Cargo cache removed
78-
run: echo "Skipping cargo cache restore to satisfy repository hygiene checks; building without cache."
7972

8073
# ── Build the doc-check binary ──────────────────────────────────────────
8174
# Uses cargo directly; the binary is an internal tool that does not need

scripts/ci/check-cache-keys.sh

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ echo "Running Cache Key Consistency Checks..."
66
echo "========================================"
77

88
ERRORS=0
9+
KEY_REGEX='^(ci|perf|soak|release|chaos|docs|verify|image|dep)-[a-zA-Z0-9_-]+$'
10+
SCOPE_REGEX='^(stellar-k8s-docker|image-build-[a-zA-Z0-9_-]+|perf-docker)$'
911

1012
# Ensure raw actions/cache is avoided unless specific dimensions are included
1113
while IFS= read -r -d '' file; do
@@ -14,34 +16,22 @@ while IFS= read -r -d '' file; do
1416
ERRORS=$((ERRORS + 1))
1517
fi
1618

17-
# Extract cache-key or shared-key values (skip GitHub expressions).
19+
# Validate cache-key / shared-key values (skip GitHub expressions).
1820
while IFS= read -r line; do
1921
key=$(echo "$line" | sed -E 's/^[^:]*:[[:space:]]*//; s/["'\'']//g; s/[[:space:]]*$//')
20-
[[ -z "$key" || "$key" == default ]] && continue
21-
# Allow GitHub Actions expressions (${{ ... }}) unchanged.
22-
if [[ "$key" == *'${{'* ]]; then
23-
continue
24-
fi
25-
if [[ ! "$key" =~ ^(ci|perf|soak|release|chaos|docs|verify|image|dep)-[a-zA-Z0-9_-]+$ ]]; then
22+
[[ -z "$key" || "$key" == "default" ]] && continue
23+
# Allow GitHub Actions expressions (${{ ... }) unchanged.
24+
[[ "$key" == *'${{'* ]] && continue
25+
if [[ ! "$key" =~ $KEY_REGEX ]]; then
2626
echo "::error file=$file::Invalid cache key format: $key. Expected format: <prefix>-<name> where prefix is ci, perf, soak, release, chaos, docs, verify, image, or dep."
27-
# Extract cache-key or shared-key
28-
keys=$(grep -E 'cache-key:|shared-key:' "$file" | awk -F':' '{print $2}' | tr -d ' "''' || true)
29-
for key in $keys; do
30-
# Skip GitHub Actions expression templates (e.g. release-${{ matrix.target }})
31-
if [[ "$key" == *'${{'* ]]; then
32-
continue
33-
fi
34-
# Valid prefixes
35-
if [[ ! "$key" =~ ^(ci|perf|soak|release|chaos|docs|verify|image)-[a-zA-Z0-9_-]+$ ]] && [[ "$key" != "default" ]]; then
36-
echo "::error file=$file::Invalid cache key format: $key. Expected format: <prefix>-<name> where prefix is ci, perf, soak, release, chaos, docs, verify, or image."
3727
ERRORS=$((ERRORS + 1))
3828
fi
3929
done < <(grep -E '^\s*(cache-key|shared-key):' "$file" || true)
4030

4131
# Check Docker cache scopes
4232
while IFS= read -r scope; do
4333
[[ -z "$scope" ]] && continue
44-
if [[ ! "$scope" =~ ^(stellar-k8s-docker|image-build-[a-zA-Z0-9_-]+|perf-docker)$ ]]; then
34+
if [[ ! "$scope" =~ $SCOPE_REGEX ]]; then
4535
echo "::error file=$file::Invalid Docker cache scope: $scope"
4636
ERRORS=$((ERRORS + 1))
4737
fi

0 commit comments

Comments
 (0)