jenkinsci / jenkinsci/gerrit-trigger-plugin
[JENKINS-72085] Requests to gerrit server are made for file path configuration regardless of triggering condition being satisfied or not
- Dominant language
- Java
- Stars
- 226
- Forks
- 289
- PR merge metrics
- No merged PRs in 30d
Description
Having a job that is configured to be triggerd only in case some files have been modified like in the screenshot:

the plugin creates some gerrit request to check if the specified files have been modified or not.
If the condition for the trigger is not matched then the requests to check if the specified files are made anyways even though they are not needed in this case.

for instance if I comment "foo" it will not match regex "some_regex" and job will not be triggered, therefore it makes no sense to send requests to gerrit server to check for file paths. This doubles the number of gerrit request for any comment in the CI
---
Originally reported by mihaiborsu, imported from: Requests to gerrit server are made for file path configuration regardless of triggering condition being satisfied or not
rsandell
Raw content of original issue
Having a job that is configured to be triggerd only in case some files have been modified like in the screenshot:
the plugin creates some gerrit request to check if the specified files have been modified or not.
If the condition for the trigger is not matched then the requests to check if the specified files are made anyways even though they are not needed in this case.
for instance if I comment "foo" it will not match regex "some_regex" and job will not be triggered, therefore it makes no sense to send requests to gerrit server to check for file paths. This doubles the number of gerrit request for any comment in the CI
3 attachments
- [image-2023-09-27-16-27-58-894.png](https://issues.jenkins.io/secure/attachment/61212/image-2023-09-27-16-27-58-894.png)
> 
- [image-2023-09-27-16-30-20-571.png](https://issues.jenkins.io/secure/attachment/61211/image-2023-09-27-16-30-20-571.png)
> 
- [image-2023-09-27-16-39-39-829.png](https://issues.jenkins.io/secure/attachment/61213/image-2023-09-27-16-39-39-829.png)
> 
Contributor guide
Research direction
The issue identifies the gerrit-trigger-plugin component but names no source file, test, or entry point. Start by reproducing the regex-mismatch case described in the issue and observe the Gerrit requests; done means file-path checks are not sent when the triggering condition fails, while matching conditions continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100