jenkinsci / jenkinsci/gerrit-trigger-plugin

[JENKINS-70539] Jobs are not aborted if initial build was triggered and afterwards triggered again with topic assigned

Open
#968 1 comment 0 reactions 0 assignees View on GitHub
component:gerrit-trigger-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
226
Forks
289
PR merge metrics
No merged PRs in 30d

Description

When the following options are enabled:

Build Current Patches Only

Abort new patch sets

Abort manual patch sets

Abort patch sets with same topic

 

Plus within the job configurations "Topic Asscociation" builds triggered by the Topic Association option are not beeing aborted in the following scenario.

1.) Patch set 1 on repository "test-a" is created

2.) Patch set 1 on  repository "test-b" is created

3.) Patch set 1 triggers the Jenkins job "verify-a" (Build #1). This job contains the build information Patch set 1 "test-a" and topic: null. Same applies to "verify-b" (Build #1) is being triggered based on the patchset created event on "test-b" repository. Both jobs have Topic Association enabled, nothing triggered so far since no Gerrit topic is assigned.

4.) Both patch sets are modified and a Gerrit topic is added to patch set 1 "test-a" and patch set 1 "test-b" e.g. Topic: "foobar".

4.) Via patch set 1 on "test-a" a new Gerrit event is fired towards Jenkins

5.) The previous job on patch set 1 "test-a" repo is aborted, but the already running Build #1 of Patchset 1 on "test-b" keeps running and based on the new event a new build is triggered. This time the build contains the information about (Patchset 1 & Topic: "foobar"). Since with "Abort patch set with same topic" only one build is beeing executed the other build running triggered by the inital upload on "test-b" is still being executed.

Expectation is with

Build Current Patches Only

Abort new patchsets

Abort patch sets with same topic

and 

Topic Association (within job configuration)

the running build "verify-b" with Patchset 1 information and Topic: null should be aborted as well since the new fired build contains all information about the patches based on the Gerrit topic.

---
Originally reported by ckreisl, imported from: Jobs are not aborted if initial build was triggered and afterwards triggered again with topic assigned


  • assignee: ckreisl
  • status: Open
  • priority: Major
  • component(s): gerrit-trigger-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-07

Raw content of original issue

When the following options are enabled:

Build Current Patches Only
Abort new patch sets
Abort manual patch sets
Abort patch sets with same topic

 

Plus within the job configurations "Topic Asscociation" builds triggered by the Topic Association option are not beeing aborted in the following scenario.

1.) Patch set 1 on repository "test-a" is created
2.) Patch set 1 on  repository "test-b" is created
3.) Patch set 1 triggers the Jenkins job "verify-a" (Build #1). This job contains the build information Patch set 1 "test-a" and topic: null. Same applies to "verify-b" (Build #1) is being triggered based on the patchset created event on "test-b" repository. Both jobs have Topic Association enabled, nothing triggered so far since no Gerrit topic is assigned.
4.) Both patch sets are modified and a Gerrit topic is added to patch set 1 "test-a" and patch set 1 "test-b" e.g. Topic: "foobar".
4.) Via patch set 1 on "test-a" a new Gerrit event is fired towards Jenkins
5.) The previous job on patch set 1 "test-a" repo is aborted, but the already running Build #1 of Patchset 1 on "test-b" keeps running and based on the new event a new build is triggered. This time the build contains the information about (Patchset 1 & Topic: "foobar"). Since with "Abort patch set with same topic" only one build is beeing executed the other build running triggered by the inital upload on "test-b" is still being executed.

Expectation is with
Build Current Patches Only
Abort new patchsets
Abort patch sets with same topic

and 

Topic Association (within job configuration)

the running build "verify-b" with Patchset 1 information and Topic: null should be aborted as well since the new fired build contains all information about the patches based on the Gerrit topic.

environment

```
Jenkins 2.346.3

Gerrit 3.7.0

Gerrit Trigger Plugin 2.38.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.