<< Back to previous view

[QB-3247] Trigger step is running twice (or at least it behaves like that)
Created: 03/Sep/18  Updated: 21/Jan/19

Status: Closed
Project: QuickBuild
Component/s: None
Affects Version/s: 8.0.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: AlSt Assigned To: Robin Shen
Resolution: Cannot Reproduce Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
Sometimes the trigger build step is triggering two builds instead of just one. The step log output is as follows:

16:35:49,030 INFO - Checking step execute condition...
16:35:49,030 INFO - Step execute condition satisfied, executing...
16:35:49,070 INFO - Checking step execute condition...
16:35:49,075 INFO - Step execute condition satisfied, executing...
16:35:49,156 INFO - Executing pre-execute action...
16:35:49,156 INFO - Running step...
16:35:49,213 INFO - Executing pre-execute action...
16:35:49,213 INFO - Running step...
16:36:33,276 INFO - Executing post-execute action...

So here you can see that the executecondition, the pre step action and the execution is done twice. Only the post-execute action is just called once. This lead to 2 builds being requested almost simultaneously which already lead to bad timing issues.

Wait for start and waitfor finished are set to YES in our case.

Do not know if anybody else already experienced such problems.
But at least it would be great to have the step log some more information like
"Requested build of configuration <configpath> (id: <requestid>)"
"Build <version> (id: <buildid>) has started" (in case wait for start is YES)
"Build <version> (id: <buildid>) has finished" (in case wait for finished is YES)

Currently it is pretty hard to find out what's wrong.
Or maybe you have an idea why this could happen?

 Comments   
Comment by Robin Shen [ 03/Sep/18 10:41 PM ]
Some possible reasons:
1. Used in a container repeating executing its child steps
2. Some parallel step executing its children simultaneously and it turns calls the trigger build step multiple times
3. The step failure retry condition is satisfied and the step is repeated

If step pre-execute action executes twice, and step post-execute condition only executes once, it means that a step pre-execute action is failed.
Comment by AlSt [ 09/Oct/18 09:00 AM ]
As I said it is pretty hard to analyze this problem.
We ruled out the above mentioned reasons. But we might have analyzed it wrong.

So some more info logging what happens in the trigger build step would ease the analysis of this strange problem.
Comment by Robin Shen [ 09/Oct/18 11:45 PM ]
Adding additional information of triggered build information does not help I think. As the root cause is that the trigger build step is being fired twice. Is this happening randomly across different configurations, or for a specific configuration? Also please check the agent log running the step to see if there are any exceptions there.
Comment by AlSt [ 18/Oct/18 02:52 PM ]
On configurations where it happened we also disabled the retry feature and it also got triggered twice. In my opinion some logging won't hurt but would help in seeing what exactly got triggered. It just makes it easier to check everything instead of just guessing what could be the reason for this.
Comment by Robin Shen [ 18/Oct/18 11:15 PM ]
Can you please send me [robin AT pmease DOT com] your database backup (taken via QB administration menu, with builds/audits/measurements/passwords excluded) and let me know which configuration and step has this issue last time? Also please send me the full build log.
Generated at Fri Apr 19 04:03:08 UTC 2024 using JIRA 189.