Skip to content

Fix modules handling [RHELDST-49263] - #392

Merged
rbikar merged 2 commits into
release-engineering:masterfrom
rbikar:modules-handling-fix
Dec 2, 2026
Merged

rbikar merged 2 commits into
release-engineering:masterfrom
rbikar:modules-handling-fix

Conversation

@rbikar

@rbikar rbikar commented Dec 2, 2026

Copy link
Copy Markdown
Member
  • query modulemd_defaults only by name, on realistic deplyoment the stream field can be missing completely and queries return empty data, resulting in broken repository
  • fixed deduplication of modulemd_defaults in export() call
  • added/update and fixed tests related for modular depsolver

* query modulemd_defaults only by name, on realistic deplyoment
  the stream field can be missing completely and queries return empty
  data, resulting in broken repository
* fixed deduplication of modulemd_defaults in `export()` call
* added/update and fixed tests related for modular depsolver
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Module default matching now correctly identifies defaults by module name, including modules without a stream.
    • Exported module defaults are deduplicated by module name and stream, preventing duplicate entries when modules share a dependency.
    • Resolved exports continue to preserve RPM dependencies and leave unrelated repositories unchanged.

Modulemd dependency solving now searches defaults by module name. Export deduplicates defaults using a consistent name:stream key. Tests cover criteria construction, duplicate defaults, RPM dependencies, and repository counts.

Changes: Modulemd defaults handling

Layer / File(s) Summary
Search module defaults
ubi_manifest/worker/utils.py, ubi_manifest/worker/tasks/depsolver/modulemd_depsolver.py, tests/test_utils.py
A new helper builds OR criteria on module names. The dependency solver uses it to search for ModulemdDefaults. Tests cover default criteria and module criteria.
Deduplicate exported defaults
ubi_manifest/worker/tasks/depsolver/modulemd_depsolver.py, tests/test_modulemd_depsolver.py
Export checks and records defaults by the same name:stream key. Tests cover duplicate removal, RPM dependencies, and repository module counts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: jm-wk, drepelov

Merge Risk: Minimal · up to 87b71

The change makes module dependency solving find module defaults by name and removes duplicate defaults on export. No concrete defect was found in the reviewed changes, and tests cover the new behavior. Merge risk is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'Fix modules handling [RHELDST-49263]' names the area of change. The changeset fixes module handling: modulemd_defaults queries now use name only, get_criteria_for_modulemd_defaults is added…
Description check Passed The description states that modulemd_defaults queries now use only the name, because the stream field can be missing in real deployments. It also states that export() deduplication is fixed and that t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title 'Fix modules handling [RHELDST-49263]' names the area of change. The changeset fixes module handling: modulemd_defaults queries now use name only, get_criteria_for_modulemd_defaults is added, and the export() deduplication is corrected. The title is somewhat broad and does not name the specific fixes, but it is related to the main change and is not misleading. It is not vague in the sense of 'misc updates'.

Full details: Description check

Explanation

The description states that modulemd_defaults queries now use only the name, because the stream field can be missing in real deployments. It also states that export() deduplication is fixed and that the modular depsolver tests are updated. These statements match the file changes in the raw summary.

Warning

Some tools did not complete. Review the errors below.

Pylint (4.1.3)

Pylint used default settings because repository settings are unavailable in automated reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f67aab4-ff90-4572-8e5b-1334f91507bd
Commits

Reviewing files that changed from the base of the PR and between 37020fd and 87b7110.

Files selected for processing: 4

  • tests/test_modulemd_depsolver.py
  • tests/test_utils.py
  • ubi_manifest/worker/tasks/depsolver/modulemd_depsolver.py
  • ubi_manifest/worker/utils.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (37020fd) to head (87b7110).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #392   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         1372      1378    +6     
=========================================
+ Hits          1372      1378    +6     
Flag Coverage Δ
unit-tests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rbikar
rbikar marked this pull request as ready for review December 2, 2026 12:16
@rbikar
rbikar requested a review from drepelov as a code owner December 2, 2026 12:16
@rbikar
rbikar merged commit 3ae9df6 into release-engineering:master Dec 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants