History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3294
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Robin Shen
Reporter: Norbert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Problem with bitbucket server repository

Created: 15/Nov/18 08:22 AM   Updated: 17/Jan/19 03:01 PM
Component/s: None
Affects Version/s: 7.0.28
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. Screenshot 2018-11-21 10.17.51.png
(434 kb)
Environment: Linux 4.4.0-116-generic, amd64


 Description  « Hide
I have pipeline configured with git repository and one of my step is triggering other builds. Everything is working fine, but I want to use bitbucket integration. When I change my repository to bitbucket server (and this is my only change) I've got error on executing external pipeline step: Build is too old to be requested.
Builds are triggered and finished successfully, however this error is causing entire pipeline fail, and in BitBucket I also see build as failed. What can be a problem?

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [17/Jan/19 03:01 PM]
Split this issue into QB-3322 and QB-3323

Robin Shen [29/Nov/18 12:07 AM]
Yes I can reproduce this issue if triggered build also builds against pull requests. Also if pull request is created between two different repositories, it will build target branch of target repository. We will investigate and try to fix these two issues in QB9.

PS: the bitbucket server plugin is contributed by other customers, and it may lack some features...

Norbert [28/Nov/18 02:02 PM]
Robin,
I think I found problem: I have checkout (the same) repository in all builds that are triggered and inherited repository setup. So simple configuration to reproduce my problem is:

1. Create a test configuration "root/test", with two children "root/test/child1" and "root/test/child2"
2. Define a BitBucket server repository in "root/test" with build open pull request option enabled (make sure it is inherited by children)
3. Create checkout step in ALL configs ( "root/test", "root/test/child1", "root/test/child2")
4. Create Parallel step to run external builds in parallel.
5. Create trigger other builds and execute "root/test/child1" and "root/test/child2"

If I disable build open pull request option on children, it works fine. Is this correct behaviour?

However I have one more additional question regards BitBucket integration:
If I make fork of my repository, make change on it and then create Pull Request back to my repository, QB can see it (build is triggered) but it is building master branch on my repository (without my changes). Is this correct behaviour?

Robin Shen [28/Nov/18 12:16 AM]
I am trying to reproduce your scenario, and it works fine. Here is what I am doing:
1. Create a test configuration "root/test", with two children "root/test/child1" and "root/test/child2"
2. Define a BitBucket server repository in "root/test" with build open pull request option enabled
3. Create a checkout step in "root/test" to checkout the repository
4. Add a step of type "trigger other builds" in "root/test" with "configuration path" specified as ${params.get("child")}, and define a repeat param with name "child", and value "root/test/child1, root/test/child2"
5. Edit master step of "root/test/child1" and "root/test/child2" to do simple things such as echo a message

Now if I run the "root/test" configuration, all open pull requests are built and the child configurations are triggered fine. Do you have any specific logic in your build definition?

Norbert [27/Nov/18 12:21 PM]
Hello Robin.
I tested it on other builds and here is what I noticed:
- If I have option "Build Open Pull Requests" ENABLED - it fails
- If I have option "Build Open Pull Requests" DISABLED - it is working fine (external builds are triggered)
- If I won't trigger external build it works fine (with "Build Open Pull Requests" ENABLED)


Robin Shen [21/Nov/18 11:54 PM]
Are you able to reproduce this issue with a sample setup?

Norbert [21/Nov/18 09:26 AM]
Not really - I am not deleting anything there...

Robin Shen [16/Nov/18 11:29 PM]
Do you have logic deleting the triggered/triggering build? This normally happens when a build is deleted soon after it is triggered.

Norbert [16/Nov/18 02:11 PM]
Hello Robin,
Yes, i've tried to re-run my pipeline and it fails in exactly same way. After few minutes, when steps that should trigger other builds is started, it is failing with exactly same error.

Robin Shen [15/Nov/18 11:57 PM]
The first build after changing the repository type might fail. How about triggering the build again? Is it failing all the time?