Open fedora-copr-github-bot opened 1 year ago
Copy-pasting from #2631: Ken Dreyer commented at 2018-05-18 20:12:07:
Description of problem: It is easy to accidentally forget to click "Webhook rebuild" when setting up a new Copr.
Version-Release number of selected component (if applicable): copr-frontend-1.131-1
Steps to Reproduce:
Create a new Copr
Add a new package
Decide to enable webhooks for the Copr
Click around in "Settings", discover the "Webhooks" tab
Actual results: The "Webhooks" tab makes no mention of the fact that "Webhook rebuild" must be checked for each package in the Copr.
There is a sentence "Enable automatic rebuilds for the package." I failed to understand "automatic rebuilds" == "allow webhooks" in my case.
Expected results: Couple of suggestions, in order of difficulty :)
A) The Webhooks page should explain what "automatic rebuilds" means, whether that's Aynita or the "Webhook rebuild" checkbox.
B) The Webhooks page could dynamically display a warning to the user if there are zero packages with "Webhook rebuild" checked, because this means that nothing will happen even when we hit this copr's webhook API endpoints.
C) It would be great if the webhook API endpoint returned something other than HTTP 200 OK when accepting a webhook for a Copr with no packages enabled for automated rebuilds. This would make it easier to see that something is wrong when clicking around in GitHub's webhook console. (dunno how difficult it would be to provide this type of config validation when handling the incoming webhook requests)
Reopening the issue. Thanks to PR #3342 we now store some of the webhook data to our database but we don't display the webhook history table to users yet. That will be done in a separate PR.
Original issue: https://pagure.io/copr/copr/issue/304 Opened: 2018-05-30 08:06:16 Opened by: jkastner
when github sends request after master update, owner of github repo can see history, but if owner of copr is not also owner/admin of github repo, there is no chance to figure out what is going wrong (no new build launched). in this particular case - in @freecad/freecad copr first commit started build, but consequent two commits, following first one have not started new builds. as we are not admins/owners of github.com/freecad/freecad we can't see history of copr webhook requests and figure out where was problem
przemof commented at 2018-05-30 22:39:26:
I asked the admin of the FreeCAD github repo and looks like the delivery was OK, but I think there should be 2 deliveries not one. That's from the github: Request:
Payload:
Response:
przemof commented at 2018-05-31 11:06:24:
I have a test repo on github and as far as I can tell there is a problem on copr end. The builds are simply not triggered. The copr end has the last build executed 4 days ago. The github log shows there were 4 deliveries executed in the last 4 days. I can provide logs from both sides if it helps.
clime commented at 2018-06-11 09:55:02:
@przemof: hello, what's the copr and a package that should be rebuilt on a received webhook? Can you link those? You can also contact me on #fedora-buildsys for online solution to this problem.
przemof commented at 2018-06-11 10:59:34:
@clime : That's one [1] - it's linked with github main FreeCAD repo [2]. I don't have admin access to the main FreeCAD repo on github, so I made a test project [3] linked with my FreeCAD repo [4]. We should try to find why it doesn't work on [3] and [4] as I have full access on both sides.
[1] https://copr.fedorainfracloud.org/coprs/g/freecad/nightly/ [2] https://github.com/FreeCAD/FreeCAD [3] https://copr.fedorainfracloud.org/coprs/g/freecad/przemof-test-from-github/ [4] https://github.com/PrzemoF/FreeCAD
clime commented at 2018-06-11 15:41:41:
The problem for the coprs is that the
freecad
package in both cases hasWith this setting, only changes in the respective repo subdirectory will cause a rebuilt. Others are ignored. You probably want to leave Subdirectory empty and set
instead.
This is something that we should have documented but we don't have documentation describing it at the moment :(. Sorry for this.
clime commented at 2018-06-11 15:43:37:
Additional small note:
X-GitHub-Event: ping
do not cause a rebuild.przemof commented at 2018-06-11 18:10:54:
Thank you! I made the suggested change and it seems to be OK :-) I'll be sure after 2-3 pushes.
przemof commented at 2018-06-11 18:23:18:
The change triggers the builder, but I need to run rpkg in packages/fedora as there is located file rpkg.macros. Before the change:
Running: rpkg -C /etc/rpkg.conf srpm --outdir /var/lib/copr-rpmbuild/results/tmphvee9sd0 --spec /tmp/tmpmxxho7xx/FreeCAD/package/fedora/freecad.spec
cmd: ['rpkg', '-C', '/etc/rpkg.conf', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results/tmphvee9sd0', '--spec', '/tmp/tmpmxxho7xx/FreeCAD/package/fedora/freecad.spec'] cwd: /tmp/tmpmxxho7xx/FreeCAD/package/fedora
After the change: Running: rpkg -C /etc/rpkg.conf srpm --outdir /var/lib/copr-rpmbuild/results/tmp23_olfwx --spec /tmp/tmps4csgmib/FreeCAD/package/fedora/freecad.spec
cmd: ['rpkg', '-C', '/etc/rpkg.conf', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results/tmp23_olfwx', '--spec', '/tmp/tmps4csgmib/FreeCAD/package/fedora/freecad.spec'] cwd: /tmp/tmps4csgmib/FreeCAD
If you have any idea how to work around that, please let me know.
clime commented at 2018-06-11 18:55:04:
The only way to workaround it is to move rpkg.macros to the top-level or create a symlink from the top-level to the subdirectory.
The only other way that would tackle this issue (that I can think of currently) were package-specific webhooks in Copr that would always trigger a rebuild but that feature probably won't come any time soon :(.
You could also switch the building method to make-srpm and install, then invoke rpkg from there in the correct directory (package/fedora) but it's a little bit cumbersome solution compared to what you have now.
clime commented at 2018-07-06 23:47:39:
Opened: https://pagure.io/copr/copr/issue/335