What happened? What is the problem?
Not when using things, but when I was looking at the code base, I noticed the MRTarget.__eq__() implementation in packit_service/config.py appears to contain a typo (copy/paste issue?) that causes the branch comparison to always evaluate as true.
The current implementation is:
return self.repo == other.repo and self.branch == self.branch
The second comparison should presumably compare against other.branch (or be removed since it's always true).
Either tests of:
def test_mr_target_equality():
target = MRTarget("packit-service/src/.+", "rawhide")
assert target == MRTarget("packit-service/src/.+", "rawhide")
assert target != MRTarget("packit-service/src/.+", "c9s")
assert target != MRTarget("other/src/.+", "rawhide")
or by augmenting the existing tests to add something like:
assert MRTarget("packit-service/src/.+", "not-c9s") not in config.gitlab_mr_targets_handled
I think both would fail with the current broken implementation and pass after the fix.
What did you expect to happen?
No response
Example URL(s)
No response
Steps to reproduce
What is the impacted category (job)?
General
Workaround
Participation
What happened? What is the problem?
Not when using things, but when I was looking at the code base, I noticed the
MRTarget.__eq__()implementation inpackit_service/config.pyappears to contain a typo (copy/paste issue?) that causes the branch comparison to always evaluate as true.The current implementation is:
The second comparison should presumably compare against
other.branch(or be removed since it's alwaystrue).Either tests of:
or by augmenting the existing tests to add something like:
I think both would fail with the current broken implementation and pass after the fix.
What did you expect to happen?
No response
Example URL(s)
No response
Steps to reproduce
What is the impacted category (job)?
General
Workaround
Participation