-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn user when on-cel-expression
is used alongside on-target-branch
and on-event
#1974
Comments
@chmouel can you assign me this issue ? |
PuneetPunamiya
added a commit
to PuneetPunamiya/pipelines-as-code
that referenced
this issue
Mar 26, 2025
…and on-event This patch warns users in both the `user events namespaces` and `controller logs` when using `on-event` and `on-target-branch` annotations along side `on-cel-expression` Hence warning users would avoid further confusion Fixes: openshift-pipelines#1974 Signed-off-by: PuneetPunamiya <[email protected]>
4 tasks
PuneetPunamiya
added a commit
to PuneetPunamiya/pipelines-as-code
that referenced
this issue
Mar 26, 2025
This patch warns users in both the `user events namespaces` and `controller logs`when using `on-event` and `on-target-branch` annotations along side `on-cel-expression` Hence warning users would avoid further confusion Fixes: openshift-pipelines#1974 Signed-off-by: PuneetPunamiya <[email protected]>
PuneetPunamiya
added a commit
to PuneetPunamiya/pipelines-as-code
that referenced
this issue
Mar 26, 2025
This patch warns users in both the `user events namespaces` and `controller logs`when using `on-event` and `on-target-branch` annotations along side `on-cel-expression` Hence warning users would avoid further confusion Fixes: openshift-pipelines#1974 Signed-off-by: PuneetPunamiya <[email protected]>
PuneetPunamiya
added a commit
to PuneetPunamiya/pipelines-as-code
that referenced
this issue
Mar 26, 2025
This patch warns users in both the `user events namespaces` and `controller logs`when using `on-event` and `on-target-branch` annotations along side `on-cel-expression` Hence warning users would avoid further confusion Fixes: openshift-pipelines#1974 Signed-off-by: PuneetPunamiya <[email protected]>
PuneetPunamiya
added a commit
to PuneetPunamiya/pipelines-as-code
that referenced
this issue
Apr 3, 2025
This patch warns users in both the `user events namespaces` and `controller logs`when using `on-event` and `on-target-branch` annotations along side `on-cel-expression` Hence warning users would avoid further confusion Fixes: openshift-pipelines#1974 Signed-off-by: PuneetPunamiya <[email protected]>
PuneetPunamiya
added a commit
to PuneetPunamiya/pipelines-as-code
that referenced
this issue
Apr 4, 2025
This patch warns users in both the `user events namespaces` and `controller logs`when using `on-event` and `on-target-branch` annotations along side `on-cel-expression` Hence warning users would avoid further confusion Fixes: openshift-pipelines#1974 Signed-off-by: PuneetPunamiya <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
When using both
on-event
andon-target-branch
annotations, it's important to note that if anon-cel-expression
annotation is also present, theon-cel-expression
will take precedence. This means that the conditions specified inon-event
andon-target-branch
will be ignored.To avoid confusion, we should warn users in both the user events namespace and the controller logs when they define a PipelineRun that includes both
on-cel-expression
and eitheron-event
oron-target-branch
.Example Scenario:
In this example, even though
on-event
andon-target-branch
are specified, theon-cel-expression
will take precedence. The PipelineRun will only be triggered if the event is a pull request targeting themain
branch and the source branch isfeature
.Proposed Solution:
User Events Namespace Warning:
on-cel-expression
andon-event
/on-target-branch
, a warning event should be emitted in the user's namespace. This warning should clearly state thaton-cel-expression
will override the other annotations.Example warning message:
Controller Logs Warning:
Example log message:
Why This Matters:
on-cel-expression
overrides other annotations, leading to unexpected behavior in their CI pipelines. A clear warning in their namespace will help them understand why their PipelineRun is not being triggered as expected.Next Steps:
The text was updated successfully, but these errors were encountered: