Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

pull request still has link to a bad build of a build plan that does not exist anymore

guy moore September 21, 2015

There once was a build plan, and a build failed in it. (which was expected)

I destroyed that build plan, and created a new branch build plan under a different parent build plan.

That build was green.

But, the pull request in stash, will not enable the merge button cause it still has a link to a bad build.

(and a link to the new green successful build)

Is Stash saving bamboo build results? I would have thought that the Stash Pull request page would be grabbing Bamboo's build results on the fly.

How do I tell Stash, to get some fresh results from Bamboo?

 

3 answers

1 accepted

2 votes
Answer accepted
Roger Barnes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2015

Hi Guy,

Stash receives build results as they happen and they are grouped by a build-key (the latest result is taken to be the one applied for merge checks). It sounds like your new build plan has a different identifier.

There are a few options available:

0 votes
Ignacio Martin April 17, 2019

@Roger Barnes thanks. Sorry, just to understand, what do you mean with "send back status"? I have tried sending an API call to update the build only again to check if it gets refreshed, but seems like the PR still locked with the failed ones. Is it possible to use that add on or it is just for Atlassian team?

 

Thanks a lot!

0 votes
guy moore September 22, 2015

thanks Roger,
True, the new build plan has a wholly different build plan ID.
To work around this issue we've done what your 3rd bullet item suggest: manually merging locally, then pushing to the remote. Then the pull request magically disappears.


That link about using REST and JSON object looks interesting. I will try that the next time this situation comes up, which will be often.  Actually, I tried it last night as the problem occurred again. It worked. Very slick.


Thanks for the quick and accurate reply.

Ignacio Martin April 16, 2019

Hi!

@Roger Barnes 
Just saw this and I have a question, may be I am a bit confused.

I created a PR to merge my dev branch into master, we have a requirement that at minimum 1 build should be passed to be able to merge.
The thing is that we have 1 BUILD ONLY plan, just compiles the code and then we have different builds plan for each team.
The BUILD PLAN runs everytime you commit a new code, an usually is green (Unless some compilation is failing) but if a test failed, a team build failed and the bitbucket PR gets linked to that failed build.
Is there anyway to make the PR to look at the green build ?

The API just update the status of the build, but I do not want the failed build to be successful, cause we don't need that just to merge the code. I just need the PR to look at the Build Only plan.

I hope I explained it OK, thank you very much!


Roger Barnes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2019

@Ignacio Martin , I'm afraid my best suggestion would be to only send back build status for builds you are interested in the status for (ie the "build only"). One of our teams at Atlassian built an internal add-on that lets you indicate which specific builds you care about for merge checks, but it's unique to our build environment.

Ignacio Martin April 17, 2019

@Roger Barnes thanks. Sorry, just to understand, what do you mean with "send back status"? I have tried sending an API call to update the build only again to check if it gets refreshed, but seems like the PR still locked with the failed ones. Is it possible to use that add on or it is just for Atlassian team?

 

Thanks a lot!

Roger Barnes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2019

Hi Ignacio,

If I understand correctly, you've worked out how to update a build status by calling the API again with the same commit hash and the same key attribute.

https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/

Unfortunately, there's no way to ignore or delete failed builds, short of marking them as successful, using the above technique.

The internal add-on I mentioned is likely unsuitable for general use. It's specific to our internal build infrastructure. I semi-regularly nudge the developer about "productising" it, but we haven't otherwise prioritised it on our roadmap. I'll take your feedback here as another vote to reconsider that :)

Like Ignacio Martin likes this
Ignacio Martin April 22, 2019

@Roger Barnes Yes, you are right! Alright!!, thanks so much for your help and sorry to bother!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events