gerrit hooks aren't working after upgrade


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 -

Can you please have a look?


Eyal Shenitzky


Anton Marchukov
January 20, 2021, 9:38 AM

Ugly hack is applied on (basically setting draft=False always). I tried to re-run hooks on 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 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 change):

Traceback (most recent call last):
File "/home/gerrit2/review_site/git/ovirt-engine.git/hooks/", line 409, in <module>
File "/home/gerrit2/review_site/git/ovirt-engine.git/hooks/", line 399, in main
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.


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


Anton Marchukov


Anton Marchukov