CI Documentation for "except" makes incorrect claim

According to documentation found at

https://docs.gitlab.com/ee/ci/yaml/#onlyexcept-advanced

except is implemented as a negation of this complete expression:

NOT((any of refs) AND (any of variables) AND (any of changes) AND (if Kubernetes is active))

This means the keys are treated as if joined by an OR. This relationship could be described as:

(any of refs) OR (any of variables) OR (any of changes) OR (if Kubernetes is active)

But that isn’t correct. NOT+AND is not the the same as OR:

0 || 0 || 0 = 0
1 || 0 || 0 = 1
0 || 0 || 1 = 1
1 || 1 || 1 = 1

vs

!(0 && 0 && 0) = 1
!(1 && 0 && 0) = 1
!(0 && 0 && 1) = 1
!(1 && 1 && 1) = 0

See, it’s not the same. NOT+NOT_AND is the same as OR:

!(!0 && !0 && !0) = 0
!(!1 && !0 && !0) = 1
!(!0 && !0 && !1) = 1
!(!1 && !1 && !1) = 1

So this should be fixed as it will confuse any real developer out there.

Hi @TGOS, welcome to the GitLab Community Forum! :tada:

Thanks for bringing this up. I understand how this is confusing.

Can you please create a new issue to clarify this point?

If you’re be willing to fix this yourself, please free to edit the page and submit a merge request to improve this documentation.

Okay, I created an issue. As I’m not sure what the real behavior actually is (that’s why I was looking at the docs to begin with), I prefer to not edit the docs myself as in the end I may not have understood them correctly.

Thanks for the contribution, @TGOS! :tada:

Can you link the issue you’ve created?
I’d like to add labels, help triage, and make sure your contribution gets attention from our team.

Thanks again!