Remove rhel 11 and centos 11 tests - #431
Conversation
Main purpose is to enable easy distgenification of the base and core containers.
📝 WalkthroughWalkthroughThe workflow removes CentOS Stream 11 and RHEL 11 Testing Farm targets and selection branches. ChangesTesting Farm target selection
Fedora distgen configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pull Request validationFailed🔴 Failed or pending statuses:
🔴 Review - Missing review from a member (1 required) Triggered by Workflow Run |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/container-tests.yml (1)
52-53: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winRestore the missing
fistatements.The nested
ifopened around the RHEL selector is still open when the finalficloses the outer selector. Add onefibefore theelsefor the RHEL block and another after that block so the embedded Bash is syntactically terminated and the workflow can run.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/container-tests.yml around lines 52 - 53, In the workflow’s nested OS-selection shell logic, add the missing fi that closes the RHEL8 conditional before its else branch, and add the corresponding fi after the RHEL block before the outer selector is closed. Keep the existing branching behavior unchanged while ensuring all nested if statements are syntactically balanced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@generator.py`:
- Around line 100-104: Update the relevant docstring and the RuntimeError
message in the suffix-handling logic to include the newly supported .fXX format
alongside .rhelXX, .cXs, and .fedora. Keep the existing suffix behavior
unchanged.
- Around line 100-101: Update the Fedora branch in the config-selection function
to verify the constructed fedora-<version>-x86_64.yaml value exists in mapping
before returning it; return the contractually required empty string when the
version is unsupported, while preserving the existing config for mapped
versions.
---
Outside diff comments:
In @.github/workflows/container-tests.yml:
- Around line 52-53: In the workflow’s nested OS-selection shell logic, add the
missing fi that closes the RHEL8 conditional before its else branch, and add the
corresponding fi after the RHEL block before the outer selector is closed. Keep
the existing branching behavior unchanged while ensuring all nested if
statements are syntactically balanced.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 5d1bb3ad-f7df-4a98-af89-a7dd1febdf07
📒 Files selected for processing (2)
.github/workflows/container-tests.ymlgenerator.py
| elif fedora_match: # just for base and core images | ||
| config = f"fedora-{fedora_match.group(1)}-x86_64.yaml" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Validate the Fedora config against mapping before returning it.
This branch always returns a non-empty config, even when fedora-<digits>-x86_64.yaml is not available for the requested version. main() then invokes run_distgen() with an unsupported configuration, contradicting the function contract that missing combinations return an empty string.
Proposed fix
elif fedora_match: # just for base and core images
config = f"fedora-{fedora_match.group(1)}-x86_64.yaml"
+ if config not in mapping.get(version, []):
+ config = ""📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| elif fedora_match: # just for base and core images | |
| config = f"fedora-{fedora_match.group(1)}-x86_64.yaml" | |
| elif fedora_match: # just for base and core images | |
| config = f"fedora-{fedora_match.group(1)}-x86_64.yaml" | |
| if config not in mapping.get(version, []): | |
| config = "" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@generator.py` around lines 100 - 101, Update the Fedora branch in the
config-selection function to verify the constructed fedora-<version>-x86_64.yaml
value exists in mapping before returning it; return the contractually required
empty string when the version is unsupported, while preserving the existing
config for mapped versions.
| elif fedora_match: # just for base and core images | ||
| config = f"fedora-{fedora_match.group(1)}-x86_64.yaml" | ||
| else: | ||
| raise RuntimeError( | ||
| f"File {filename} does not match any of the known suffixes: .rhelXX, .cXs, or .fedora" |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Document the new .fXX suffix.
The docstring and unknown-suffix error still list only .rhelXX, .cXs, and .fedora, so the newly supported .fXX format is undocumented and omitted from the diagnostic message.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@generator.py` around lines 100 - 104, Update the relevant docstring and the
RuntimeError message in the suffix-handling logic to include the newly supported
.fXX format alongside .rhelXX, .cXs, and .fedora. Keep the existing suffix
behavior unchanged.
Summary by CodeRabbit