> While readability is subjective, I don't see why should we prevent multiple [applicable|submittable|overrid]If values. The evaluation is simple: they are just all
> combined with the OR operator.
+1
Luca.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/DE43AA73-0E98-4440-8142-8ED0AA1B94AC%40gmail.com.
On Tue, Aug 18, 2026 at 3:06 AM Luca Milanesio <luca.mi...@gmail.com> wrote:
> On 17 Aug 2026, at 02:18, Saša Živkov <ziv...@gmail.com> wrote:
>
> Since [1] Gerrit rejects multivalued applicableIf, submittableIf, overrideIf for a submit requirement.
I believe it was done mainly for avoiding accidental mistakes: if you were defining more than once, the last one would override all the others.
> IMHO, this wasn't the right decision. It would be better if those options are allowed as multi-valued and if all values are combined with the OR operator. This would also be consistent with other parts of Gerri like label.[name].branch which is allowed to be multivalued.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/CAKSZd3TpzCKi6tpeYdU7f62hKffztvykVPwSTGmM4MQad6oFBw%40mail.gmail.com.
On Tue, Aug 18, 2026 at 2:04 AM Matthias Sohn <matthi...@gmail.com> wrote:On Tue, Aug 18, 2026 at 3:06 AM Luca Milanesio <luca.mi...@gmail.com> wrote:
> On 17 Aug 2026, at 02:18, Saša Živkov <ziv...@gmail.com> wrote:
>
> Since [1] Gerrit rejects multivalued applicableIf, submittableIf, overrideIf for a submit requirement.
I believe it was done mainly for avoiding accidental mistakes: if you were defining more than once, the last one would override all the others.
> IMHO, this wasn't the right decision. It would be better if those options are allowed as multi-valued and if all values are combined with the OR operator. This would also be consistent with other parts of Gerri like label.[name].branch which is allowed to be multivalued.My only concern is that combining with an AND operator would be equally valid and thus could confuse users/admins. It seems very likely if you consider `submittableIf` where the operators are typically combined with AND. For example, `submittableIf = label:Code-Review=MAX&user=non_uploader AND -label:Code-Review=MIN` (from the docs) becomes:submittableIf = label:Code-Review=MAX&user=non_uploadersubmittableIf = -label:Code-Review=MIN
On Tue, Aug 18, 2026 at 11:04 PM Nasser Grainawi <nasser....@oss.qualcomm.com> wrote:On Tue, Aug 18, 2026 at 2:04 AM Matthias Sohn <matthi...@gmail.com> wrote:On Tue, Aug 18, 2026 at 3:06 AM Luca Milanesio <luca.mi...@gmail.com> wrote:
> On 17 Aug 2026, at 02:18, Saša Živkov <ziv...@gmail.com> wrote:
>
> Since [1] Gerrit rejects multivalued applicableIf, submittableIf, overrideIf for a submit requirement.
I believe it was done mainly for avoiding accidental mistakes: if you were defining more than once, the last one would override all the others.
> IMHO, this wasn't the right decision. It would be better if those options are allowed as multi-valued and if all values are combined with the OR operator. This would also be consistent with other parts of Gerri like label.[name].branch which is allowed to be multivalued.My only concern is that combining with an AND operator would be equally valid and thus could confuse users/admins. It seems very likely if you consider `submittableIf` where the operators are typically combined with AND. For example, `submittableIf = label:Code-Review=MAX&user=non_uploader AND -label:Code-Review=MIN` (from the docs) becomes:submittableIf = label:Code-Review=MAX&user=non_uploadersubmittableIf = -label:Code-Review=MINI would not write that example as you provided it here. This naturally fits into one submittableIf expression:submittableIf = label:Code-Review=MAX&user=non_uploader -label:Code-Review=MIN
Now imagine that there is another way to make change submittable: the commit message contains Emergency-Fix footer. So we add another submittableIf:
submittableIf = label:Code-Review=MAX&user=non_uploader -label:Code-Review=MINsubmittableIf = hasfooter:EmergencyFix
On Wed, Aug 19, 2026 at 9:04 AM Saša Živkov <ziv...@gmail.com> wrote:On Tue, Aug 18, 2026 at 11:04 PM Nasser Grainawi <nasser....@oss.qualcomm.com> wrote:On Tue, Aug 18, 2026 at 2:04 AM Matthias Sohn <matthi...@gmail.com> wrote:On Tue, Aug 18, 2026 at 3:06 AM Luca Milanesio <luca.mi...@gmail.com> wrote:
> On 17 Aug 2026, at 02:18, Saša Živkov <ziv...@gmail.com> wrote:
>
> Since [1] Gerrit rejects multivalued applicableIf, submittableIf, overrideIf for a submit requirement.
I believe it was done mainly for avoiding accidental mistakes: if you were defining more than once, the last one would override all the others.
> IMHO, this wasn't the right decision. It would be better if those options are allowed as multi-valued and if all values are combined with the OR operator. This would also be consistent with other parts of Gerri like label.[name].branch which is allowed to be multivalued.My only concern is that combining with an AND operator would be equally valid and thus could confuse users/admins. It seems very likely if you consider `submittableIf` where the operators are typically combined with AND. For example, `submittableIf = label:Code-Review=MAX&user=non_uploader AND -label:Code-Review=MIN` (from the docs) becomes:submittableIf = label:Code-Review=MAX&user=non_uploadersubmittableIf = -label:Code-Review=MINI would not write that example as you provided it here. This naturally fits into one submittableIf expression:submittableIf = label:Code-Review=MAX&user=non_uploader -label:Code-Review=MINAgreed. But that expression also goes somewhat towards my point, in the absence of an explicit AND or OR operator, we always use AND in our query syntax. Some other Gerrit multi-valued keys have a simple concatenation behavior (for example, container.javaOptions) which here would imply ANDing each value. Obviously, there are also cases like label...branch where multiple values implies OR. I'm not claiming multi-valued should always mean one or the other; I'm just pointing out the high chance for confusion and users getting it wrong.
Now imagine that there is another way to make change submittable: the commit message contains Emergency-Fix footer. So we add another submittableIf:
submittableIf = label:Code-Review=MAX&user=non_uploader -label:Code-Review=MINsubmittableIf = hasfooter:EmergencyFixSure, but you wouldn't write it like that, you'd use `overrideIf = hasfooter:EmergencyFix` for that scenario.
I understand your original motivation comes from label.[name].branch, but we also have label.[name].copyCondition whose value is a query string and is not allowed to be multi-valued. Would you expect that key to have the same multi-valued ORing behavior?
On Wed, Aug 19, 2026 at 7:43 PM Nasser Grainawi <nasser....@oss.qualcomm.com> wrote:On Wed, Aug 19, 2026 at 9:04 AM Saša Živkov <ziv...@gmail.com> wrote:On Tue, Aug 18, 2026 at 11:04 PM Nasser Grainawi <nasser....@oss.qualcomm.com> wrote:On Tue, Aug 18, 2026 at 2:04 AM Matthias Sohn <matthi...@gmail.com> wrote:On Tue, Aug 18, 2026 at 3:06 AM Luca Milanesio <luca.mi...@gmail.com> wrote:
> On 17 Aug 2026, at 02:18, Saša Živkov <ziv...@gmail.com> wrote:
>
> Since [1] Gerrit rejects multivalued applicableIf, submittableIf, overrideIf for a submit requirement.
I believe it was done mainly for avoiding accidental mistakes: if you were defining more than once, the last one would override all the others.
> IMHO, this wasn't the right decision. It would be better if those options are allowed as multi-valued and if all values are combined with the OR operator. This would also be consistent with other parts of Gerri like label.[name].branch which is allowed to be multivalued.My only concern is that combining with an AND operator would be equally valid and thus could confuse users/admins. It seems very likely if you consider `submittableIf` where the operators are typically combined with AND. For example, `submittableIf = label:Code-Review=MAX&user=non_uploader AND -label:Code-Review=MIN` (from the docs) becomes:submittableIf = label:Code-Review=MAX&user=non_uploadersubmittableIf = -label:Code-Review=MINI would not write that example as you provided it here. This naturally fits into one submittableIf expression:submittableIf = label:Code-Review=MAX&user=non_uploader -label:Code-Review=MINAgreed. But that expression also goes somewhat towards my point, in the absence of an explicit AND or OR operator, we always use AND in our query syntax. Some other Gerrit multi-valued keys have a simple concatenation behavior (for example, container.javaOptions) which here would imply ANDing each value. Obviously, there are also cases like label...branch where multiple values implies OR. I'm not claiming multi-valued should always mean one or the other; I'm just pointing out the high chance for confusion and users getting it wrong.Yes, this is why it needs to be clearly documented. On the other hand, I don't believe in artificial restrictions which promise to eliminate (or restrict) user errors.Users also must understand what they are doing.