Bug 1484203

Summary: webhook should not trigger duplicate build
Product: [Community] Copr Reporter: Marc Dequènes (Duck) <duck>
Component: backendAssignee: Copr Team <copr-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: brian, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-11 12:01:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marc Dequènes (Duck) 2017-08-23 02:41:13 UTC
Description of problem:
If I push changes with a tag on the HEAD, then two events are fired, which is ok, but Copr should detect a build of the same commit is already being run and save energy.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. configure webhooks as the doc says
2. commit a change and tag the HEAD
3. push changes and tags

Actual results:
One build is fired for the latest commit, another for the tag.

Expected results:
One build is fired for the latest commit, no build fired for the tag as it correspond to the same commit ID.

Additional info:
Triggering a new build is useful to rebuild an old version, but in this case the build is ongoing and nothing changed between the two events.

Comment 2 Pavel Raiskup 2020-12-11 12:01:52 UTC
We have to separate tag events from push events, and add a special
check box for them, this is tracked upstream:
https://pagure.io/copr/copr/issue/628