Open majamassarini opened 1 month ago
I don't think this has anything to do with multiple commits being pushed. That's not something that rarely happens, quite the opposite.
The code in Pagure does nothing else but git diff --name-status $old_commit $end_commit
, so I don't understand how this is possible.
I must be blind :man_facepalming: It finally hit me:
...
changed_files = pagure.lib.git.get_changed_files(
revs[-1],
oldrev,
repodir,
)
revs.reverse()
print("* Publishing information for %i commits" % len(revs))
topic = "git.receive"
msg = dict(
total_commits=len(revs),
start_commit=revs[0],
end_commit=revs[-1],
old_commit=oldrev,
...
The list of pushed revs is :grey_exclamation:reversed:grey_exclamation: before sending the event, so revs[-1]
passed to get_changed_files()
becomes revs[0]
and the command called is effectively git diff --name-status $old_commit $start_commit
.
The fix is trivial, but I want to adjust the unit tests to cover this case, but unfortunately running the Pagure test suite eats all memory on my laptop and dies :sweat_smile: I have to find a way to work that around.
@nforro thanks a lot for fixing that!
We've just discussed with @majamassarini that we might want to do something until this gets to Pagure production (what can take some time) and agreed on the following:
Marking as blocked as this issue is waiting on the Pagure PR to be merged and the fix deployed in production.
This is a Pagure bug and probably we should fix it in Pagure (I don't figure out a way to workaround it in Packit).
I had two commits in rawhide:
The above commits were fast forwarded in f39, f40 and f41:
The
pagure.git.receive
messages generated by the PRs merges are shown below. Forrawhide
thepackit.spec
file change contained in commitfe01a99843805bf2eed16146ae91e3e87333f52d
is listed (since it is the only commit contained in the PR). For all thebranched branches
is listed only thepackit.yaml
file change contained in commit44742d731eb4a74e5abf0c3a113b0609ccd0b745
even though the PRs contain two commits. The changes for commitfe01a99843805bf2eed16146ae91e3e87333f52d
are not listed in the attributechanged_files
.We filter the events out for all branched branches because Pagure tell us there are no changes in the specfile.
It works retriggering it with a comment.
datagrepper link