Tweak FMW env special handling to return real column names #15
No reviewers
Labels
No labels
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/python-wikitcms!15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fixup-fmw-handling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The placeholder names aren't good enough - we have to substitute
with the real names, as best we can (we'll use fedfind.helpers
for this, which should pretty much always be in sync with
the CurrentFedoraVersion template; we can't easily use the
template here because Past Adam foolishly didn't put the wiki
object in this function's scope).
This substitution is actually rarely used anyway; it'll only be
used if you instantiate Template:Installation test matrix rather
than an actual result page, and the only thing that does that is
the fedora_openqa
checkwikiscript (for...reasons). Added anote explaining this.
Signed-off-by: Adam Williamson awilliam@redhat.com
AI Code Review
📋 MR Summary
This MR updates the Fedora Media Writer environment special handling to return actual column names (e.g., "Fedora 43") rather than placeholders.
fedfind.helpersinsrc/wikitcms/result.py.find_resultrowsto dynamically fetch the current release and compute related release names.fedfind.helpers.get_current_releaseintests/test_result.pyto test the new column name resolution logic.Detailed Code Review
The implementation correctly updates the placeholder handling to dynamically calculate Fedora release version names. The code properly manages the calculation of offsets (
- 1and+ 1) relative to the current version. The newly introduced functionality is adequately covered by updated unit tests using themocklibrary. One small observation: depending on the type returned byfedfind.helpers.get_current_release(), calling.split()on the resulting string could potentially trigger an unhandled exception ifcurris None or an unexpected type, although the subsequentsplit("|")logic appears well guarded in its surroundingtry...exceptcontext. Overall, it's a solid, low-risk improvement.📂 File Reviews
📄 `src/wikitcms/result.py` - Modified the special handling for media writer column headers to use actual release numbers based on `fedfind.helpers.get_current_release()`.
fedfind.helpers.get_current_release()returnsNone(for example, due to an API failure or unexpected state),curr - 1orcurr + 1will raise aTypeError.curris an integer before attempting arithmetic operations.✅ Summary
fedfind.helpers.get_current_release()to protect against potentialTypeError.🤖 AI Code Review | Generated with ai-code-review | Model:
gemini-3.1-pro-preview⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.
No need.
get_current_releaseis expected to always return an integer. (I should really add type hints around here, one day...)