On Wed, Feb 6, 2019 at 5:53 PM Nir Soffer <nsof...@redhat.com> wrote:
>
> On Wed, Feb 6, 2019 at 5:33 PM Greg Sheremeta <gsher...@redhat.com> wrote:
>>
>> On Wed, Feb 6, 2019 at 10:18 AM Anton Marchukov <amarc...@redhat.com> wrote:
>>>
>>> Hello All.
>>>
>>> Also. Based on the comments I am going to do the exact match, thus it will 
>>> require the following:
>>>
>>> 1. "Bug-Url:" should be at the beginning of the new line with no spaces 
>>> allowed in between.
>>> 2. No space is allowed between "Bug-Url" and ":".
>>> 3. I will allow space characters (or tab characters) between ":" and the 
>>> bug URL. Thought I can make even more strict and e.g. allow only one space.
>>
>>
>> +1 to all the above. Seems harmless to allow [\t ]+ between : and URL. 
>> Although I've never used tab.
>>
>>>
>>>
>>> I am just not sure how far the agreement and expectation was for this 
>>> keyword, so feel free to comment and let me know.
>
>
> Thanks for fixing this.
>
> Do we have some documentation for these requirements?
> Is it linked from our contributions guidelines?

Now searched [1] and found [2]. Not extremely detailed.

I personally use for many years a git hook originally written by
Alon Bar Lev, that checks that the Bug-Url: is reachable. Attached.
AFAIK this is the most "official statement" about Bug-Url syntax -
I am pretty certain that at least all of my own patches follow
its syntax wrt syntax. It's not that strict either - the relevant
line is:

cat "${COMMIT}" | grep 'Bug-Url:' | sed 's/.*Bug-Url:[ \t]*\([^
\t]*\).*/\1/' | while read URL; do

At the time, Alon shared it with other developers, so it's likely
still in use by others as well. It might make sense to add it to
some official oVirt repo and document how to use it, probably by
simply adding it to the existing hook [3]. The only downside for
using it is that it slows down each commit, by having to query
bugzilla. I admit that this is so annoying (takes 1-2 seconds)
that I sometimes defer adding Bug-Url: to later stages of
development, so that the initial drafts are faster to commit...

Best regards,

[1] 
https://www.google.com/search?q=site%3Awww.ovirt.org+%22bug-url%22&ie=utf-8&oe=utf-8&client=firefox-b-ab
[2] https://www.ovirt.org/develop/dev-process/devprocess.html
[3] 
https://www.ovirt.org/develop/dev-process/working-with-gerrit.html#installing-the-change-id-hook

>
>>>
>>> On Wed, Feb 6, 2019 at 3:01 PM Anton Marchukov <amarc...@redhat.com> wrote:
>>>>
>>>> Thanks for comments. Yeah, I think since it does not produce extra side 
>>>> effect over the previous behaviour in dead case just something will stop 
>>>> working based on the old assumptions rather than it starts moving 
>>>> incorrect bugs around.
>>>>
>>>> I have prepared a change [1], will give it some test on staging gerrit 
>>>> first and then merge and deploy to production gerrit.
>>>>
>>>> [1] https://gerrit.ovirt.org/#/c/97605/
>>>>
>>>> On Wed, Feb 6, 2019 at 11:41 AM Yedidyah Bar David <d...@redhat.com> wrote:
>>>>>
>>>>> On Wed, Feb 6, 2019 at 12:36 PM Anton Marchukov <amarc...@redhat.com> 
>>>>> wrote:
>>>>> >
>>>>> > Hello All.
>>>>> >
>>>>> > I have checked the hooks code. And it indeed just extracts all the 
>>>>> > links pointing to bugzilla. This is not correct and fails when somebody 
>>>>> > just mentions a bug in commit message.
>>>>> >
>>>>> > We are about to fix this and adjust the regexp used to explicitly check 
>>>>> > for "Bug-Url" keyword. I think this is the expected behavior for 
>>>>> > everybody.
>>>>>
>>>>> +1
>>>>>
>>>>> >
>>>>> > But just in case I am sending this pre-announcement about the change. 
>>>>> > Let me know if you anticipate any problems.
>>>>>
>>>>> I think we'll have enough time to fix such problems. It will only affect
>>>>> new patches, history would remain as-is. So main risk is if people had
>>>>> tools/hooks/habits to link to BZs without 'Bug-Url' and expected that to
>>>>> work, and it will now be ignored. Small risk, imo.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> >
>>>>> > Thanks.
>>>>> >
>>>>> > On Tue, Feb 5, 2019 at 10:16 AM Nir Soffer <nsof...@redhat.com> wrote:
>>>>> >>
>>>>> >> If a commit message mention another bug, the CI script try to add the 
>>>>> >> patch
>>>>> >> to the bug in the commit message, and change the bug to POST.
>>>>> >>
>>>>> >> Mentioning another bug in a commit message is good practice, making it
>>>>> >> easier to follow, and avoiding unclear forms like "bug 1000000" or 
>>>>> >> "BZ#1000000",
>>>>> >> or even worse shortened urls like https://goo.gl/bPuFGo.
>>>>> >>
>>>>> >> Does it make sense that we cannot link to Red Hat bugzilla like god
>>>>> >> intended?
>>>>> >>
>>>>> >> Here is a proof:
>>>>> >> https://gerrit.ovirt.org/c/97568/
>>>>> >>
>>>>> >>     gerrit-hooks
>>>>> >>     Patch Set 1:
>>>>> >>
>>>>> >>     Check Bug-Url::10000000::WARN, failed to get bug info (private bug 
>>>>> >> or bug doesn't exist
>>>>> >>     Check Product::IGNORE, not relevant for branch: master
>>>>> >>     Check TM::IGNORE, not relevant for branch: master
>>>>> >>     Check Backport::IGNORE, not relevant for branch: master
>>>>> >>     Set POST::#10000000::WARN, failed to get bug info (private bug or 
>>>>> >> bug doesn't exist)
>>>>> >>     Update Tracker::#10000000::WARN, failed to get bug info (private 
>>>>> >> bug or bug doesn't exist)
>>>>> >>     CI scripts should process urls only inside Bug-Url: tag.
>>>>> >>
>>>>> >> Expected behavior:
>>>>> >> Extract bug urls *only* from Bug-Url: label.
>>>>> >>
>>>>> >> The same issue exists with Related-To: label.
>>>>> >>
>>>>> >> This is not a new bug. I reported it few years ago but for some reason 
>>>>> >> the issue
>>>>> >> was not understood.
>>>>> >>
>>>>> >> Nir
>>>>> >> _______________________________________________
>>>>> >> Infra mailing list -- in...@ovirt.org
>>>>> >> To unsubscribe send an email to infra-le...@ovirt.org
>>>>> >> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>>>>> >> oVirt Code of Conduct: 
>>>>> >> https://www.ovirt.org/community/about/community-guidelines/
>>>>> >> List Archives: 
>>>>> >> https://lists.ovirt.org/archives/list/in...@ovirt.org/message/YZKHQTISCF6W3GNXOTWWO3IE4T24SZQQ/
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Anton Marchukov
>>>>> > Team Lead - Release Management - RHV DevOps - Red Hat
>>>>> >
>>>>> > _______________________________________________
>>>>> > Devel mailing list -- devel@ovirt.org
>>>>> > To unsubscribe send an email to devel-le...@ovirt.org
>>>>> > Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>>>>> > oVirt Code of Conduct: 
>>>>> > https://www.ovirt.org/community/about/community-guidelines/
>>>>> > List Archives: 
>>>>> > https://lists.ovirt.org/archives/list/devel@ovirt.org/message/MFPBLV2MJEG7QNONFOU3KMV2DAUWP5SM/
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Didi
>>>>
>>>>
>>>>
>>>> --
>>>> Anton Marchukov
>>>> Team Lead - Release Management - RHV DevOps - Red Hat
>>>>
>>>
>>>
>>> --
>>> Anton Marchukov
>>> Team Lead - Release Management - RHV DevOps - Red Hat
>>>
>>> _______________________________________________
>>> Devel mailing list -- devel@ovirt.org
>>> To unsubscribe send an email to devel-le...@ovirt.org
>>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>>> oVirt Code of Conduct: 
>>> https://www.ovirt.org/community/about/community-guidelines/
>>> List Archives: 
>>> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/J2KZA3FCBHP3UD6EI6V6YEYDEQUJTHAL/
>>
>>
>>
>> --
>>
>> GREG SHEREMETA
>>
>> SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX
>>
>> Red Hat NA
>>
>> gsher...@redhat.com    IRC: gshereme
>>
>> _______________________________________________
>> Devel mailing list -- devel@ovirt.org
>> To unsubscribe send an email to devel-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> oVirt Code of Conduct: 
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives: 
>> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/YL677JJF23VB3X7MDXRFRBXV7XQ7ZZDW/
>
> _______________________________________________
> Devel mailing list -- devel@ovirt.org
> To unsubscribe send an email to devel-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/JOM3FMJJJZTSNUFWUYLR7ZJ2LAO255SP/



-- 
Didi

Attachment: commit-msg-bugzilla-private
Description: Binary data

_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/LAEMPIZADMA65ISOOMYVNL7MOYCEKCR3/

Reply via email to