Bug 1601410

Summary: Misleading warning for missing flags when a Flag Group uses a regular expression
Product: [Community] Bugzilla Reporter: Tomas Borcin <tborcin>
Component: ExtensionsAssignee: Jeff Fearn 🐞 <jfearn>
Extensions sub component: RuleEngine QA Contact: tools-bugs <tools-bugs>
Status: CLOSED WORKSFORME Docs Contact:
Severity: unspecified    
Priority: low CC: khong, qgong, tborcin, yulwang
Version: 4.4   
Target Milestone: 5.0-RH10   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-07 00:55:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Error message
none
Flag group
none
Flag group 2
none
Rule step 2
none
Rule step 3 none

Description Tomas Borcin 2018-07-16 11:23:50 UTC
Description of problem:

I was about to change devtools_approve rule in BRE so

in 'When' branch it checks whether any of 'devtools flags' flag group are '?'

and in 'Then' branch it:
Changes the 'devtools-2018.3' flag to '+' if it is currently '?' (ignored if not present)
Changes the 'devtools-2018.4' flag to '+' if it is currently '?' (ignored if not present)
Changes the 'devtools-2019.1' flag to '+' if it is currently '?' (ignored if not present)

BRE has shown me an error saying I can't change those flags (devtools-2018.3, devtools-2018.4 and devtools-2019.1), because I didn't check them earlier. In flag group there was regular expression matching flags (^devtools-) and also devtools-1.0.0 flag checked from the list at the same time. Everything works fine after I unchecked this flag from the list.


I think that single devtools-1.0.0 flag overrode the whole regular expression and 'devtools flags' thus contained only devtools-1.0.0 flag.

Comment 1 Jeff Fearn 🐞 2018-07-17 00:42:08 UTC
I think I know the error you are hitting, but it doesn't match your description, so I'm misunderstanding either you or the error :} Please attach the actual error text.

Comment 2 Tomas Borcin 2018-07-17 12:20:40 UTC
Created attachment 1459422 [details]
Error message

Comment 3 Tomas Borcin 2018-07-17 12:21:15 UTC
Created attachment 1459423 [details]
Flag group

Comment 4 Tomas Borcin 2018-07-17 12:21:32 UTC
Created attachment 1459424 [details]
Flag group 2

Comment 5 Tomas Borcin 2018-07-17 12:22:14 UTC
Created attachment 1459426 [details]
Rule step 2

Comment 6 Tomas Borcin 2018-07-17 12:22:46 UTC
Created attachment 1459427 [details]
Rule step 3

Comment 7 Tomas Borcin 2018-07-17 12:27:21 UTC
I have attached requested error message as well as what do I see in 'devtools flags' Flag Group and how do I change 'devtools_approve' rule. Notice in second step I added new condition: 'devtools flags flag group any ?' and removed condition for 'devtools-2018.3' flag. In third step I try to set all 'devtools-*' flags to + if ? and ignore if not present.

Comment 8 Jeff Fearn 🐞 2018-07-17 22:17:34 UTC
hmm this is interesting. The purpose of the check is to prevent a rule from running twice on the same set of bugs, there are 7 active flags that can be in that group, but only 6 of them are being set in the rule.

I tested adding devtools‑2018.2 to the rule and it got to step 4 without a warning.

The error here is that there is only one warning message so the user gets mislead, it should say you are missing active flags.

Perhaps it should let you use the group in step 3, so when flags get created/deactivated you don't have to change the rule.

Comment 9 Jeff Fearn 🐞 2020-01-28 05:21:32 UTC
Hi Tomas, I can't reproduce this warning any more, do you think anything needs to be done for this?

Comment 10 Jeff Fearn 🐞 2020-02-07 00:55:50 UTC
Still can't replicate this, feel free to reopen if you have a reproducer.