Skip to content

Update's meets_requirements_why doesn't enforce test case and bug feedback requirements #5955

@harshith1118

Description

@harshith1118

In bodhi/server/models.py, line 4011, there is a FIXME comment in the meets_requirements_why method that
states:

FIXME: we should probably wire up the test case and bug feedback requirements
that are shown in the UI but not currently enforced.

Problem:
The meets_requirements_why function currently only checks for:

  1. Test gating status
  2. Karma threshold (min_karma)
  3. Mandatory days in testing (mandatory_days_in_testing)

But it does NOT check the require_testcases and require_bugs fields that are part of the update model. These
boolean fields allow users to specify that:

  • require_testcases: All associated test cases must have positive feedback before the update can be pushed
    to stable
  • require_bugs: All associated bugs must have positive feedback before the update can be pushed to stable

Expected Behavior:
When require_testcases is True, the function should verify that all test cases associated with the update
have positive feedback (no negative karma).
When require_bugs is True, the function should verify that all bugs associated with the update have
positive feedback (no negative karma).

Impact:
Without this check, updates with require_testcases=True or require_bugs=True may be pushed to stable even
when the required positive feedback has not been received, which violates the intended policy.

Files to Modify:

  • bodhi/server/models.py - Update the meets_requirements_why method around line 4000

The function should return (False, "reason") when requirements are not met, similar to how other checks
are implemented in the same function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions