#2750 Missing fedmsg notification for edits through the web UI
Closed: Fixed 6 years ago Opened 6 years ago by ncoghlan.

We noticed https://pagure.io/modularity/c/ea70978da782f8d6862b8195c3559e19970c608b?branch=master didn't trigger a rebuild of the modularity docs at https://docs.pagure.org/modularity/development/building-modules.html

Checking with http get https://apps.fedoraproject.org/datagrepper/raw delta==900 user==ncoghlan we also noticed that https://pagure.io/modularity/fedmod/c/b70c314f38fed460a07d40eaaa25cb2bc4196431?branch=master didn't show up, but https://pagure.io/modularity/fedmod/c/733d82fbcef5971ddb01a5145a79cc78ab57748e?branch=master did.

The common factor with the two commits that were missing fedmsg events was that I submitted them directly through the web UI, rather than either editing them locally and then pushing them, or else creating them on a branch and then submitting a PR to be merged.


@nphilipp I think this may have been what was causing our docs build issues.

I've also noticed that start_commit and end_commit are the same:

nils@gibraltar:~> http get https://apps.fedoraproject.org/datagrepper/raw delta==2400 user==ncoghlan | jq '.raw_messages | .[] | select(.topic == "io.pagure.prod.pagure.git.receive") | .msg | .agent, .authors, .start_commit, .end_commit'
"ncoghlan"
[
  "Nick Coghlan"
]
"733d82fbcef5971ddb01a5145a79cc78ab57748e"
"733d82fbcef5971ddb01a5145a79cc78ab57748e"
nils@gibraltar:~>

Is this expected behavior? I'd assume that start_commit is the latest commit on the branch before pushing.

I have an idea of what could be causing the missing fedmsg notifs, I'll poke at this.

For the start_commit and end_commit it makes sense since it's a single commit that got pushed, if you push 3 commits, the start_commit will be the first commit and the end_commit be the 3rd one.
So that one is expected :)

Metadata Update from @pingou:
- Issue tagged with: bug

6 years ago

For the start_commit and end_commit it makes sense since it's a single commit that got pushed, if you push 3 commits, the start_commit will be the first commit and the end_commit be the 3rd one.
So that one is expected :)

It just feels unnatural because git labels ranges as <parent commit>..<end commit>. Would you be open for an RFE to add this? It would be less confusing and add valuable information.

@pingou Will that fix the issue for PR merges as well? Or should we file a new issue for that?

@ncoghlan, afaict, merging PR should already trigger the post-update hook: https://pagure.io/pagure/blob/f21b8c56554af4/f/pagure/lib/git.py#_1306-1308 and https://pagure.io/pagure/blob/f21b8c56554af4/f/pagure/lib/git.py#_1355-1357

Though, I'm suddenly wondering if we're triggering the right ones (ie fork vs main). I'll double-check.

Looks like you're right, pagure was running the hooks of the fork not of the main project.

I did not notice this as for most of my PR where I use the pagure hook features, the "fork" is the same as the main repo.

Login to comment on this ticket.

Metadata