Provide fmw_source contextual variable #140
No reviewers
Labels
No labels
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
easyfix
enhancement
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/fedora_openqa!140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "report_flathub_mediawriter"
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?
Previously, we would use the
VERSIONvariable tocreate a header string, such as Fedora 44, that would
refer to a column in the test matrices. However,
how the variable was provided made us unable to
report to a column such as Flathub.
This adds a different mechanism that provides
a correct string based on the environment where
the test is running, be it Fedora XX or Flathub, to
the report.py and modifies the tests in test_report.py
to cover this change.
Fixes: quality/os-autoinst-distri-fedora#529
202a340974101a685048101a6850484bf6b758824bf6b75882b6ac282ef3b6ac282ef36c0c2edac3AI Code Review
📋 MR Summary
This MR adds a new
media_writer_flatpaktest suite and updates the reporting logic to useFlathubas the environment source for this specific suite, while falling back toFedora <VERSION>for the default media writer test.gnome_initial_setup(empty) andmedia_writer_flatpaktoTESTSUITESinconf_test_suites.py.Fedora $VERSION$with$FMW_SOURCE$forQA:Testcase_USB_fmwinconf_test_suites.py._uniqueres_replacementsinreport.pyto substitute$FMW_SOURCE$with either 'Flathub' (if test ismedia_writer_flatpak) or 'Fedora '.media_writer_flatpakand defaultmedia_writerFMW source replacement logic.Detailed Code Review
The implementation correctly separates the environment reporting string based on the test type for media writer test cases. The changes are straightforward and well-tested. One minor issue is a typo in the documentation string for
test_uniqueres_replacements_media_writer_default.📂 File Reviews
📄 `tests/test_report.py` - Added tests for the new FMW source replacement logic.
test_uniqueres_replacements_media_writer_defaultincorrectly statesmedia_writer_flatpakinstead ofmedia_writer.media_writertest suite.✅ Summary
tests/test_report.py.🤖 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.
Not squashed yet.
(WIP) Add Silverblue related tests to reportingto Add Silverblue related tests to reporting@ -73,0 +74,4 @@# to report to the Flathub column (which does not have version in it).# For Flatpak media_writer test, take "Flathub" instead of version.fmw_source = f"Fedora {version}"if job["test"] == "media_writer_flatpak":if we just change this to checking the
CANNEDvariable, we don't need to duplicate the test in o-a-d-f at all.Oh, so now I see you more or less did this the way I suggested - but then we don't need to duplicate the test under a different name at all, with one simple tweak...
@adamwill wrote in #140 (comment):
Just to be sure. My solution here could stay if I look for CANNED instead of job['test']? And I will return the templates to its original state. Or do you want me to do it exactly like in your suggestion?
@ -133,6 +133,44 @@ def test_uniqueres_replacements(jobdict01):ret = fosreport._uniqueres_replacements(jobdict01, basedict)assert ret['base_section'] == 'RPM-based non-blocking environments (x86_64)'def test_uniqueres_replacements_media_writer_flatpak():I would prefer you just add the tests to the big existing
test_uniqueres_replacementstest, following the existing patterns, than add another 40 lines just to test two things.Your version is fine, the name of the substitution can be whatever so long as it's understandable. Aside from the comment above, I think this is fine, if we adjust it to just use the existing test case name, and drop the g-i-s commit as I already merged that.
97ad3657399b8de879409b8de87940b5150f0331b5150f033185964499ac85964499ace77a5ced0dLGTM now, thanks.
Add Silverblue related tests to reportingto Provide fmw_source contextual variablee77a5ced0dbd0b1eeb95AI Code Review
Detailed Code Review
The implementation correctly introduces the
fmw_sourcecontextual variable, replacing the hardcoded$VERSION$string. It appropriately evaluates theCANNEDenvironment flag to determine if the target is Flathub, as discussed in previous reviews. The integration of the tests into the existingtest_uniqueres_replacementsfunction adheres perfectly to the project's testing guidelines and prevents unnecessary code duplication. No logical errors, performance bottlenecks, or security vulnerabilities were identified during the review.✅ Summary
src/fedora_openqa/conf_test_suites.pyat line 683 to maintain clean file formatting.🤖 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.
bd0b1eeb95b71c8c4277Blank line fixed.