bitbucket-branch-source-plugin icon indicating copy to clipboard operation
bitbucket-branch-source-plugin copied to clipboard

feature/324 | skip non PR notifications

Open sams-gleb opened this issue 3 years ago • 4 comments

Adding a checkbox to avoid overwriting of PR status by the branch build status. Should fix #324 . We had similar problems in our pipelines where branch build can be finished in the middle of running PR build thus allowing to merge un-tested changes into master

Your checklist for this pull request

  • [x ] Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • [ x] Ensure that the pull request title represents the desired changelog entry
  • [x ] Please describe what you did
  • [x ] Link to relevant issues in GitHub or in Jenkins JIRA
  • [x ] Link to relevant pull requests, esp. upstream and downstream changes
  • [ ] Did you provide a test-case? That demonstrates feature works or fixes the issue.

sams-gleb avatar May 25 '21 12:05 sams-gleb

Overall though, I feel the better fix would be to (1) abort the branch build as soon as Jenkins finds that there is a PR from that branch as well and (2) delete the INPROGRESS build status from Bitbucket when the build is aborted that way.

KalleOlaviNiemitalo avatar Nov 25 '21 22:11 KalleOlaviNiemitalo

Overall though, I feel the better fix would be to (1) abort the branch build as soon as Jenkins finds that there is a PR from that branch as well and (2) delete the INPROGRESS build status from Bitbucket when the build is aborted that way.

Thanks for the review! Makes sense, I will look when I have time and mb will close this PR

sams-gleb avatar Nov 29 '21 09:11 sams-gleb

Overall though, I feel the better fix would be to (1) abort the branch build as soon as Jenkins finds that there is a PR from that branch as well and (2) delete the INPROGRESS build status from Bitbucket when the build is aborted that way.

I took another quick look.. The main use case here is when we create a PR and still having a running branch pipeline which could overwrite PR status thus non-tested changes could be merged. Branches and PRs do share key so it might be not so simple to delete only in progress branch status, in many cases it might be already in progress status of PR

sams-gleb avatar Nov 29 '21 15:11 sams-gleb

Those failing builds are not legit. It appears that the filename has gotten too long due to the length of the git commit hash when checking out inside of windows.

That being said, I am not sure this feature is all that useful @sams-gleb because what about things like main/versioned branches that you do want to know build status on?

To me instead of a checkbox that ignores anything but PR build status, I think it should be a regex which would let you ignore status notifications from anything not-desired. To me that is a more useful feature and also you will most likely have to add a test before this gets approved and merged in. Because this is something super useful to me I am going to try and help make some code changes to see if I can get it working

alexanderrtaylor avatar Jan 27 '23 13:01 alexanderrtaylor