[Feature flag] Rollout of `ci_if_parenthesis_enabled`
What
Remove the :ci_if_parenthesis_enabled
feature flag ...
Owners
- Team: CI
- Most appropriate slack channel to reach out to:
#g_ci
- Best individual to reach out to: @ayufan
Expectations
What are we expecting to happen?
Feature works.
What might happen if this goes wrong?
There's small risk associated with that change, as we fixed the operator precedence handling. It was broken before. This feature flag fixes it as well: !37574 (comment 385057724)
I also discovered that we have a bug today in the current implementation of if:
and variables:
. This:
$VAR1 == "a" || $VAR2 == "b" && $VAR3 == "c" || $VAR4 == "d" && $VAR5 == "e"
Is evaluated as (right associativity of the operator):
$VAR1 == "a" || ($VAR2 == "b" && ($VAR3 == "c" || ($VAR4 == "d" && $VAR5 == "e")))
Where it should be as:
$VAR1 == "a" || (($VAR2 == "b" && $VAR3 == "c") || ($VAR4 == "d" && $VAR5 == "e"))
I will fix this ~bug as part of this MR, but it does mean that this also will be breaking change.
Example 2
When we have this:
$EXAMPLE_PARAM == 'test1' && $CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'schedule'
Prior to this change it will be wrongly evaluated as (not in the way how operator precedence is defined):
$EXAMPLE_PARAM == 'test1' && ($CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'schedule')
Where the properly it should be:
($EXAMPLE_PARAM == 'test1' && $CI_PIPELINE_SOURCE == 'web') || $CI_PIPELINE_SOURCE == 'schedule'
Beta groups/projects
This feature can be enabled globally only.
Roll Out Steps
-
Enable on staging -
Test on staging -
Ensure that documentation has been updated -
Enable on GitLab.com by running chatops command in #production
-
Cross post chatops slack command to #support_gitlab-com
(more guidance when this is necessary in the dev docs) and in your team channel -
Announce on the issue that the flag has been enabled -
Remove feature flag and add changelog entry -
After the flag removal is deployed, clean up the feature flag by running chatops command in #production
channel
Edited by Kamil Trzciński