gerrit hooks aren't working after gerrit.ovirt.org upgrade

Description

It seems like gerrit hooks aren't working now.
Patches that solve bugs with Bug-URL that submitted aren't causing the bug
to move to POST state.
For example - https://gerrit.ovirt.org/#/c/ovirt-engine/+/112416/

Can you please have a look?

 


Regards,
Eyal Shenitzky

Activity

Show:
Anton Marchukov
January 20, 2021, 9:38 AM
Edited

Ugly hack is applied on gerrit.ovirt.org (basically setting draft=False always). I tried to re-run hooks on https://gerrit.ovirt.org/c/ovirt-engine/+/112145 and both “Set POST” and “Update Tracker” are now being run. This should provide some relive while I am working on changing the drafts handling.

Anton Marchukov
January 19, 2021, 10:23 AM

This is related to gerrit changes. The old data structures are no longer valid since there is no longer a draft concept in gerrit. The code will have to be changed to accommodate that. I am going to apply a quick patch on production gerrit. Just make it threat all change as non-draft for now, not ideal, but at least it should start working for most of the patches.

Anton Marchukov
January 13, 2021, 10:02 AM

The same behaviour is found in other projects, e.g. vdsm patch https://gerrit.ovirt.org/c/vdsm/+/112937 suffers from the same problem. So it is not specific to ovirt-engine.

Anton Marchukov
January 13, 2021, 10:00 AM

While carefully studying the logs the following has been found that all hooks are enabled, detected and executed for ovirt-engine, but the ones in question give the following stack traces (for example for creation of https://gerrit.ovirt.org/c/ovirt-engine/+/112854 change):

patchset-created.bz.98.set_post:

Traceback (most recent call last):
File "/home/gerrit2/review_site/git/ovirt-engine.git/hooks/patchset-created.bz.98.set_post", line 409, in <module>
main()
File "/home/gerrit2/review_site/git/ovirt-engine.git/hooks/patchset-created.bz.98.set_post", line 399, in main
draft=ast.literal_eval(args.is_draft.capitalize()),
AttributeError: 'NoneType' object has no attribute 'capitalize'

the execution then stops.

Anton Marchukov
January 11, 2021, 12:52 PM

Thanks for clarification. Comparing to other projects, e.g. “vdsm” I see for “vdsm” [1] the following hooks are triggered:

  • Set POST::IGNORE, no bug url/s found

  • Update Tracker::IGNORE, no bug url/s found

that does not happen for ovirt-engine during patch set creation for some reason.

[1] https://gerrit.ovirt.org/c/vdsm/+/112512

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Anton Marchukov

Reporter

Anton Marchukov