Skip to content

Commit e7f9e30

Browse files
committed
fix: review follow-ups — version bump, Slack alert setup, DRY helper
- Bump version 0.3.1 → 0.3.2 (pyproject.toml, plugin.json, marketplace.json) - Add Slack alert setup section to release-branch-config.md (channel creation, incoming webhook, Vault secret configuration) - Add Slack setup step to commission-release.md workflow - Standardize placeholder casing to {version} in release-branch-config.md - Clarify releases.latest.release field description - Extract _first_versions() helper in analyze_coverage.py to DRY up the repeated api_data.get('data', [])[0] pattern - Clarify decommission-release.md: generated jobs removed by make update - Decommission workflow now runs make update — the previous 'Do NOT run make update' guidance was incorrect; make update correctly removes generated job files for deleted configs, matching commission behavior Assisted-by: OpenCode
1 parent ff9f9b8 commit e7f9e30

8 files changed

Lines changed: 197 additions & 173 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
},
66
"metadata": {
77
"description": "Orchestrator skill for RHDH plugin development - onboard, update, and maintain plugins in the Extensions Catalog",
8-
"version": "0.3.1"
8+
"version": "0.3.2"
99
},
1010
"plugins": [
1111
{
1212
"name": "rhdh",
1313
"source": "./",
1414
"description": "Skills for RHDH plugin lifecycle management",
15-
"version": "0.3.1",
15+
"version": "0.3.2",
1616
"strict": true
1717
}
1818
]

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rhdh",
33
"description": "All-in-one toolkit for Red Hat Developer Hub (RHDH). Covers plugin development, overlay management, environment setup, version compatibility, CI/CD, and RHDH ecosystem navigation.",
4-
"version": "0.3.1",
4+
"version": "0.3.2",
55
"author": {
66
"name": "RHDH Store Manager"
77
},

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "rhdh-skill"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
description = "Claude Code skill for RHDH plugin development"
55
readme = "README.md"
66
license = "Apache-2.0"

skills/prow/references/release-branch-config.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ Shared definitions for commissioning and decommissioning RHDH release branch CI
44

55
## File Paths
66

7-
For a given release version `{VERSION}` (e.g. `1.10`):
7+
For a given release version `{version}` (e.g. `1.10`):
88

99
| File | Path |
1010
|------|------|
11-
| **CI config** | `ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-{VERSION}.yaml` |
12-
| **Generated jobs** | `ci-operator/jobs/redhat-developer/rhdh/redhat-developer-rhdh-release-{VERSION}-*.yaml` |
11+
| **CI config** | `ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-{version}.yaml` |
12+
| **Generated jobs** | `ci-operator/jobs/redhat-developer/rhdh/redhat-developer-rhdh-release-{version}-*.yaml` |
1313
| **Branch protection** | `core-services/prow/02_config/redhat-developer/rhdh/_prowconfig.yaml` |
1414

1515
## Branch Protection
@@ -18,7 +18,7 @@ Each release branch has an entry under `branch-protection.orgs.redhat-developer.
1818

1919
When commissioning, **read the latest existing release branch entry** from `_prowconfig.yaml` and copy its structure (keys, contexts, settings). Do not hardcode the block — the required status check contexts and protection settings change over time.
2020

21-
When decommissioning, remove the entire `release-{VERSION}:` block, preserving indentation and formatting of surrounding entries.
21+
When decommissioning, remove the entire `release-{version}:` block, preserving indentation and formatting of surrounding entries.
2222

2323
## Release Branch vs Main Differences
2424

@@ -30,7 +30,7 @@ When creating a release branch config from `main` or another release branch, **r
3030
| **Cron schedule** | Read the latest release branch config to see the current schedule pattern. Release branches use a different schedule than `main` to spread load |
3131
| **Cleanup jobs** | Compare `main` with the latest release branch. Jobs present in `main` but absent from all release branches are main-only — remove them |
3232
| **Presubmit tests** | Compare `main` with the latest release branch. Note differences in `always_run`, `max_concurrency`, and other settings — apply the release branch pattern |
33-
| **`zz_generated_metadata.branch`** | Set to `release-{VERSION}` |
33+
| **`zz_generated_metadata.branch`** | Set to `release-{version}` |
3434

3535
Version-specific settings to verify with the user:
3636

@@ -39,9 +39,24 @@ Version-specific settings to verify with the user:
3939
| **OCP versions** | Read the source config's `e2e-ocp-v4-*-helm-nightly` entries. Ask the user which OCP versions to include for the new branch |
4040
| **K8s version** (`MAPT_KUBERNETES_VERSION`) | Read from the source config. Ask the user if it should change |
4141
| **OSD version** | Read from the source config. Ask the user if it should change |
42-
| **`releases.latest.release`** | Compare `channel` and `version` between main and release branches |
42+
| **`releases.latest.release`** | OCP release payload used by ci-operator (`channel` + `version`). Compare main and release branches — typically the same, but may differ if the release branch targets an older OCP |
4343
| **`build_root` tag** | Read from the source config. Ask the user if it should change |
4444

45+
## Slack Alert Setup
46+
47+
Each release branch needs its own Slack channel and webhook for E2E alert notifications. There are two alert mechanisms:
48+
49+
1. **Prow `reporter_config`** — configured per-test in the CI config YAML (`reporter_config.channel`). Set to `#rhdh-e2e-alerts-{X}-{Y}` (dots replaced with hyphens). This fires on infrastructure-level errors.
50+
51+
2. **`rhdh-send-alert` step** — uses a Slack incoming webhook URL from the Vault secret `rhdh-send-alert` (namespace `test-credentials`). The script auto-detects the release version from `JOB_NAME` and looks for a versioned key `SLACK_ALERTS_WEBHOOK_URL_{X}_{Y}` (dots replaced with underscores), falling back to the default `SLACK_ALERTS_WEBHOOK_URL`.
52+
53+
### Setup steps
54+
55+
1. **Create Slack channel** `#rhdh-e2e-alerts-{X}-{Y}` in the [Nightly Test Alerts Slack app](https://api.slack.com/apps/A08U4AP1YTY/incoming-webhooks)
56+
2. **Create incoming webhook** for the new channel in the same Slack app
57+
3. **Add webhook URL to Vault** secret `rhdh-send-alert` as key `SLACK_ALERTS_WEBHOOK_URL_{X}_{Y}`
58+
4. **Set `reporter_config.channel`** to `#rhdh-e2e-alerts-{X}-{Y}` on every nightly test entry in the CI config
59+
4560
## Post-Change Step
4661

4762
After modifying any CI config files, always run:

skills/prow/scripts/analyze_coverage.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ def _fetch_lifecycle_json(script_name):
5656
return None
5757

5858

59+
def _first_versions(api_data):
60+
"""Extract versions list from the first entry of API response data."""
61+
data = api_data.get("data", [])
62+
return data[0].get("versions", []) if data else []
63+
64+
5965
def _fetch_api(product_name):
6066
"""Fetch lifecycle data directly from the Red Hat API (fallback)."""
6167
url = f"{LIFECYCLE_API_URL}?name={urllib.parse.quote_plus(product_name)}"
@@ -81,8 +87,7 @@ def _get_rhdh_lifecycle():
8187
api_data = _fetch_api("Red Hat Developer Hub")
8288
if not api_data:
8389
return []
84-
data = api_data.get("data", [])
85-
versions_raw = data[0].get("versions", []) if data else []
90+
versions_raw = _first_versions(api_data)
8691
results = []
8792
for ver in versions_raw:
8893
ocp_compat = ver.get("openshift_compatibility", "")
@@ -119,8 +124,7 @@ def _is_date(val):
119124
def _to_date(val):
120125
return val[:10] if _is_date(val) else None
121126

122-
data = api_data.get("data", [])
123-
versions = data[0].get("versions", []) if data else []
127+
versions = _first_versions(api_data)
124128
versions = [v for v in versions if re.match(r"^\d+\.\d+$", v.get("name", ""))]
125129
versions = [v for v in versions if int(v["name"].split(".")[0]) >= 4]
126130

@@ -153,7 +157,7 @@ def _to_date(val):
153157
if end and end >= today:
154158
current_phase = pname
155159
break
156-
elif not _is_date(end_raw) and end_raw not in ("N/A", "", None):
160+
elif end is None or (not _is_date(end_raw) and end_raw not in ("N/A", "")):
157161
current_phase = pname
158162
break
159163
if current_phase != "End of life":

skills/prow/workflows/commission-release.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Read `../references/release-branch-config.md` for file paths, templates, and rel
1818
3. **Copy and adjust the CI config**:
1919
- Copy the source file to `redhat-developer-rhdh-release-{version}.yaml`
2020
- Read both the `main` config and the latest existing release branch config to understand the current patterns
21-
- Apply all structural adjustments described in `references/release-branch-config.md` — compare main vs release branch to determine what to change (Slack channel, cron schedule, cleanup jobs, presubmit settings)
21+
- Apply all structural adjustments described in `../references/release-branch-config.md` — compare main vs release branch to determine what to change (Slack channel, cron schedule, cleanup jobs, presubmit settings)
2222
- Set `zz_generated_metadata.branch` to `release-{version}`
2323

2424
4. **Confirm version-specific settings** with the user:
@@ -28,14 +28,19 @@ Read `../references/release-branch-config.md` for file paths, templates, and rel
2828
- `build_root` tag
2929
- If copying from the latest release branch, these are often unchanged
3030

31-
5. **Add branch protection** to `_prowconfig.yaml`:
31+
5. **Set up Slack alerts** (see `../references/release-branch-config.md` > Slack Alert Setup):
32+
- Create Slack channel `#rhdh-e2e-alerts-{X}-{Y}` and incoming webhook
33+
- Add webhook URL to Vault secret `rhdh-send-alert` as key `SLACK_ALERTS_WEBHOOK_URL_{X}_{Y}`
34+
- Set `reporter_config.channel` to `#rhdh-e2e-alerts-{X}-{Y}` on every nightly test entry in the CI config
35+
36+
6. **Add branch protection** to `_prowconfig.yaml`:
3237
- Read the latest existing release branch entry from `_prowconfig.yaml` to get the current structure and contexts
3338
- Add a `release-{version}:` entry under `branch-protection.orgs.redhat-developer.repos.rhdh.branches`, copying the structure from the latest release branch
3439
- Place the new entry in version order among existing entries
3540

36-
6. **Run `make update`** to regenerate Prow job configs
41+
7. **Run `make update`** to regenerate Prow job configs
3742

38-
7. **Verify and summarize**:
43+
8. **Verify and summarize**:
3944
- Confirm generated job files exist: `ls ci-operator/jobs/redhat-developer/rhdh/redhat-developer-rhdh-release-{version}-*.yaml`
4045
- Show a summary of what was created
4146

skills/prow/workflows/decommission-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Read `../references/release-branch-config.md` for file paths and templates.
1111

1212
2. **Verify files to be removed** (show the user and ask for confirmation):
1313
- **CI config**: `ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-{version}.yaml`
14-
- **Generated jobs**: `ci-operator/jobs/redhat-developer/rhdh/redhat-developer-rhdh-release-{version}-*.yaml`
14+
- **Generated jobs** (removed by `make update`): `ci-operator/jobs/redhat-developer/rhdh/redhat-developer-rhdh-release-{version}-*.yaml`
1515
- **Branch protection**: `release-{version}:` block in `core-services/prow/02_config/redhat-developer/rhdh/_prowconfig.yaml`
1616

1717
3. **Delete the CI config file**

0 commit comments

Comments
 (0)