-
Notifications
You must be signed in to change notification settings - Fork 526
AGENT-1488: Aggregate IRI status from MachineConfigNodes #5841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 5 commits into
openshift:main
from
bfournie:iri-status-aggregation
May 26, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
00c5a2c
AGENT-1488: Aggregate IRI status from MachineConfigNodes
bfournie 354b9a5
Use CA certificate for TLS validation in registry ping
bfournie b1d4753
add acceptance tests and skill
bfournie 286bd6c
additional unit tests/e2e test, simplified watcher methods
bfournie 3d844ad
fix iri test
bfournie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
pkg/controller/internalreleaseimage/.claude/skills/iri-controller/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| name: iri-controller | ||
| description: The InternalReleaseImage controller manages the IRI resource lifecycle, generates MachineConfigs for the IRI registry, updates status by aggregating from MachineConfigNodes, and handles deletion. Use when reviewing controller implementation or validating behaviors. | ||
| disable-model-invocation: true | ||
| allowed-tools: Read Grep | ||
| --- | ||
|
|
||
| # Verify InternalReleaseImage Controller Implementation | ||
|
|
||
| Verify that the InternalReleaseImage (IRI) controller implementation correctly handles all acceptance criteria defined in test scenarios. | ||
|
|
||
| ## IRI Aggregation Behavior | ||
|
|
||
| Verify that the IRI aggregation implementation correctly handles all acceptance criteria defined in the CSV test scenarios. | ||
|
|
||
| ### Scenarios to Verify | ||
|
|
||
| See [testdata/acceptance/README.md](../../testdata/acceptance/README.md) for complete scenario descriptions. | ||
|
|
||
| The skill verifies the implementation matches these acceptance criteria by checking code paths, status constants, condition handling, and message formatting. | ||
|
|
||
| ### Verification Steps | ||
|
|
||
| For each scenario: | ||
|
|
||
| 1. **Read the CSV file** to understand the expected behavior | ||
| 2. **Search aggregation.go** for the relevant code paths: | ||
| - `aggregateMCNIRIStatus()` - main aggregation function | ||
| - `checkAPIIntRegistryAvailability()` - api-int health check | ||
| - `processMCNReleases()` - MCN status processing | ||
| - `buildAggregatedReleases()` - final status construction | ||
| 3. **Verify status constants** match CSV expectations: | ||
| - `IRIStatusAllReleasesAvailable` | ||
| - `IRIStatusAPIIntNotAvailable` | ||
| - `IRIStatusSomeNodesNotAvailable` | ||
| - `IRIStatusSomeRegistriesUnavailable` | ||
| 4. **Check condition handling** in `updateDegradedCondition()` | ||
| 5. **Verify message formatting** includes node lists in brackets with commas | ||
|
|
||
| ### Code Locations to Check | ||
|
|
||
| Primary implementation: | ||
| - `pkg/controller/internalreleaseimage/aggregation.go` | ||
| - `pkg/controller/internalreleaseimage/internalreleaseimage_controller.go` | ||
|
|
||
| Event handlers that trigger aggregation: | ||
| - `updateMachineConfigNode()` - watches for MCN status changes | ||
| - `updateNode()` - watches for node Ready condition changes | ||
|
|
||
| ### Report Format | ||
|
|
||
| For each scenario, report: | ||
| - ✅ **PASS**: Code correctly implements the scenario | ||
| - ⚠️ **PARTIAL**: Code partially implements but missing details | ||
| - ❌ **FAIL**: Code does not match expected behavior | ||
| - 📝 **Notes**: Any observations or edge cases | ||
|
|
||
| Include: | ||
| - Which code section handles the scenario | ||
| - How the expected status/reason/message is generated | ||
| - Any gaps or improvements needed | ||
|
|
||
| ### Example Verification | ||
|
|
||
| For "happy-path.csv": | ||
| 1. Read the CSV expectations | ||
| 2. Verify `IRIStatusAllReleasesAvailable` is returned when: | ||
| - All MCNs have `InternalReleaseImageDegraded=False` | ||
| - api-int registry ping succeeds | ||
| - All nodes are ready | ||
| 3. Confirm message: "All the release images are available" | ||
| 4. Check that releases use api-int URL format | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.