Skip to content

Commit c047c46

Browse files
committed
Refactor collectors, expand dashboards, and harden CI
Restructure committime and failure collectors for clearer data flow and better error recovery. Add failure __init__ module for shared types. Expand DORA dashboard panels with trend indicators and additional recording rules. Migrate CI workflow templates from custom Dockerfiles to composite actions. Improve webhook payload validation and metric store consistency. Update test assertions for stricter type checking.
1 parent a6fcc03 commit c047c46

86 files changed

Lines changed: 1749 additions & 1271 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ updates:
3434
interval: "weekly"
3535
commit-message:
3636
prefix:
37+
groups:
38+
docker-dependencies:
39+
patterns:
40+
- "*"
3741
labels:
3842
- "dependencies"
3943
- "docker"
@@ -44,6 +48,10 @@ updates:
4448
interval: "weekly"
4549
commit-message:
4650
prefix:
51+
groups:
52+
docker-dependencies:
53+
patterns:
54+
- "*"
4755
labels:
4856
- "dependencies"
4957
- "docker"
@@ -54,26 +62,10 @@ updates:
5462
interval: "weekly"
5563
commit-message:
5664
prefix:
57-
labels:
58-
- "dependencies"
59-
- "docker"
60-
# Docker - workflow template: comment-pr
61-
- package-ecosystem: "docker"
62-
directory: "/.github/workflow_templates/comment-pr"
63-
schedule:
64-
interval: "weekly"
65-
commit-message:
66-
prefix:
67-
labels:
68-
- "dependencies"
69-
- "docker"
70-
# Docker - workflow template: create-market-place-pr
71-
- package-ecosystem: "docker"
72-
directory: "/.github/workflow_templates/create-market-place-pr"
73-
schedule:
74-
interval: "weekly"
75-
commit-message:
76-
prefix:
65+
groups:
66+
docker-dependencies:
67+
patterns:
68+
- "*"
7769
labels:
7870
- "dependencies"
7971
- "docker"

.github/workflow_templates/comment-pr/Dockerfile

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

.github/workflow_templates/comment-pr/action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,20 @@ inputs:
1111
description: The message to be commented
1212
required: true
1313
runs:
14-
using: docker
15-
image: Dockerfile
14+
using: composite
15+
steps:
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.13'
19+
20+
- name: Install dependencies
21+
shell: bash
22+
run: pip install --no-cache-dir "pydantic==2.12.5" "pydantic-settings==2.9.1" "pygithub==2.6.0"
23+
24+
- name: Comment on PR
25+
shell: bash
26+
env:
27+
INPUT_TOKEN: ${{ inputs.token }}
28+
INPUT_PR_NUMBER: ${{ inputs.pr_number }}
29+
INPUT_MESSAGE: ${{ inputs.message }}
30+
run: python ${{ github.action_path }}/main.py

.github/workflow_templates/create-market-place-pr/Dockerfile

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

.github/workflow_templates/create-market-place-pr/action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,20 @@ inputs:
1111
description: The user username of the fork to open PR from
1212
required: true
1313
runs:
14-
using: docker
15-
image: Dockerfile
14+
using: composite
15+
steps:
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.13'
19+
20+
- name: Install dependencies
21+
shell: bash
22+
run: pip install --no-cache-dir "pydantic==2.12.5" "pydantic-settings==2.9.1" "pygithub==2.6.0"
23+
24+
- name: Create marketplace PR
25+
shell: bash
26+
env:
27+
INPUT_TOKEN: ${{ inputs.token }}
28+
INPUT_VERSION: ${{ inputs.version }}
29+
INPUT_FORK_USER: ${{ inputs.fork_user }}
30+
run: python ${{ github.action_path }}/main.py

.github/workflows/cd.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
concurrency:
1212
group: cd-main
13+
cancel-in-progress: false
1314

1415
env:
1516
# TODO create bot account
@@ -27,6 +28,8 @@ jobs:
2728
steps:
2829
- name: Checkout code
2930
uses: actions/checkout@v4
31+
with:
32+
persist-credentials: false
3033

3134
- uses: dorny/paths-filter@v3
3235
id: changes
@@ -38,21 +41,26 @@ jobs:
3841
- 'pelorus-operator/**'
3942
4043
- uses: actions/upload-artifact@v4
44+
if: steps.changes.outputs.version_change == 'true'
4145
with:
4246
name: operator-code
4347
path: pelorus-operator/bundle
48+
retention-days: 1
4449

4550
- name: Store variables
4651
id: variables
52+
env:
53+
VERSION_CHANGE: ${{ steps.changes.outputs.version_change }}
54+
COMMIT_SHA: ${{ github.sha }}
4755
run: |
48-
echo "version_change=${{ steps.changes.outputs.version_change }}" >> "$GITHUB_OUTPUT"
49-
if [[ "${{ steps.changes.outputs.version_change }}" == "true" ]];then
56+
echo "version_change=$VERSION_CHANGE" >> "$GITHUB_OUTPUT"
57+
if [[ "$VERSION_CHANGE" == "true" ]];then
5058
export CURRENT_CHART_VERSION="$(grep '^version: ' pelorus-operator/helm-charts/pelorus/Chart.yaml | cut -c 10-)"
5159
if [[ $CURRENT_CHART_VERSION == *"rc"* ]];then
52-
echo "tags=$(echo latest,${{ github.sha }},v$CURRENT_CHART_VERSION)" >> "$GITHUB_OUTPUT"
60+
echo "tags=$(echo latest,$COMMIT_SHA,v$CURRENT_CHART_VERSION)" >> "$GITHUB_OUTPUT"
5361
echo "is_release=false" >> "$GITHUB_OUTPUT"
5462
else
55-
echo "tags=$(echo stable,latest,${{ github.sha }},v$CURRENT_CHART_VERSION)" >> "$GITHUB_OUTPUT"
63+
echo "tags=$(echo stable,latest,$COMMIT_SHA,v$CURRENT_CHART_VERSION)" >> "$GITHUB_OUTPUT"
5664
echo "is_release=true" >> "$GITHUB_OUTPUT"
5765
export CURRENT_OPERATOR_VERSION="$(grep "^VERSION ?= " pelorus-operator/Makefile | cut -c 12-)"
5866
echo "version=$CURRENT_OPERATOR_VERSION" >> "$GITHUB_OUTPUT"
@@ -91,6 +99,8 @@ jobs:
9199
steps:
92100
- name: Checkout
93101
uses: actions/checkout@v4
102+
with:
103+
persist-credentials: false
94104

95105
- name: Build and push ${{ matrix.image }}
96106
uses: "./.github/workflow_templates/build_push_exporters"
@@ -146,7 +156,7 @@ jobs:
146156
git remote add upstream https://github.com/redhat-openshift-ecosystem/community-operators-prod.git
147157
git fetch upstream
148158
git rebase upstream/main
149-
git push origin main
159+
git push --force-with-lease origin main
150160
151161
- name: Create branch
152162
run: |
@@ -163,7 +173,7 @@ jobs:
163173
run: |
164174
git config user.name 'github-actions[bot]'
165175
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
166-
git add -A
176+
git add operators/pelorus-operator/${{ needs.setup.outputs.version }}
167177
git commit --signoff -m "operator pelorus-operator (${{ needs.setup.outputs.version }})"
168178
git push origin pelorus-operator-${{ needs.setup.outputs.version }}
169179

.github/workflows/check-python-dependencies.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ permissions:
44
contents: read
55

66
on:
7+
workflow_dispatch:
8+
push:
9+
branches: [ main ]
10+
paths:
11+
- 'pyproject.toml'
12+
- 'uv.lock'
713
pull_request:
814
branches: [ main ]
915
paths:

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ permissions:
44
contents: read
55

66
on:
7+
workflow_dispatch:
78
pull_request:
89
branches: [ main ]
910
paths:

.github/workflows/conftest.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ jobs:
4343
pyproject.toml
4444
4545
- name: Install dependencies
46-
run: |
47-
make dev-env
46+
run: make dev-env
4847

4948
- name: Run conf-tests
50-
run: |
51-
make conf-tests
49+
run: make conf-tests

.github/workflows/doc-check.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ permissions:
44
contents: read
55

66
on:
7+
workflow_dispatch:
8+
push:
9+
branches: [ main ]
10+
paths:
11+
- 'docs/**'
12+
- '.github/workflows/doc-check.yml'
13+
- 'mkdocs.yml'
14+
- 'Makefile'
715
pull_request:
816
branches: [ main ]
917
paths:

0 commit comments

Comments
 (0)