Short-Lived branch VS Long-Lived Branch Vs MAIN branch

540 views
Skip to first unread message

Nikhil Jain

unread,
Mar 5, 2018, 4:13:26 AM3/5/18
to SonarQube

Hello,

 

I read the difference between short lived and long lived branch from Branch plugin Doc.

However, I still have some questions:

 

* What if I make all the branches as Long-lived? (By giving * in the regex). Is it suggested?

* Will there be any side effects of this like Performance, Server Stability, DB size?

* What should be the MAIN branch? Master or develop ... ?

* Is MAIN branch same like long-lived branch from DB perspective apart from its the first branch analyzed and if you don't provide -Dsonar.branch.target while analyzing, by default it will be MAIN branch.

  

Thanks in advance for the reply.

 

Regards,

Nikhil

G. Ann Campbell

unread,
Mar 7, 2018, 3:14:37 PM3/7/18
to SonarQube
Hi Nikhil


On Monday, 5 March 2018 04:13:26 UTC-5, Nikhil Jain wrote:

Hello,

 

I read the difference between short lived and long lived branch from Branch plugin Doc.

However, I still have some questions:

 

* What if I make all the branches as Long-lived? (By giving * in the regex). Is it suggested?


You'll have to manage these branches manually (short-lived branches are cleaned out automatically when they've gone unanalyzed for a certain number of days). Additionally, the interface for short-lived branches (and soon PRs!) is designed to focus, and help you focus, on only what has changed in this feature branch. If you make every branch a long-lived branch, you'll have to sort that out for yourself.

 

* Will there be any side effects of this like Performance, Server Stability, DB size?


That depends on how stringently you manage the retention of all these long-lived branches(^).
 

* What should be the MAIN branch? Master or develop ... ?


That's kind of a "should I get a tatoo" question; other people can't answer it for you (particularly since the distinction you make between Master and Develop isn't clear :-D). Probably ideally you want the branch you release from as your master. 
 

* Is MAIN branch same like long-lived branch from DB perspective apart from its the first branch analyzed and if you don't provide -Dsonar.branch.target while analyzing, by default it will be MAIN branch.


The big difference here is really that the Main branch is the default. It too, though, is a long-lived branch.


Ann 

Nikhil Jain

unread,
Mar 7, 2018, 11:48:30 PM3/7/18
to SonarQube
Hi Ann,

Thanks a lot your answer.
However, regarding this :

"Additionally, the interface for short-lived branches (and soon PRs!) is designed to focus, and help you focus, on only what has changed in this feature branch"

What happens to the PR to feature branch? Let's say all the feature branches are short lived as per the regex, then will it be possible to analyze (maybe later) the PR to these branches. 

Regards,
Nikhil

G. Ann Campbell

unread,
Mar 8, 2018, 10:21:09 AM3/8/18
to Nikhil Jain, SonarQube
Hi,

We don't currently support targeting PRs to short-lived branches. This is actually something we ran into internally recently. Currently it's a known limitation. 


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/fhSC8wwGVho/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/682900f9-8176-4e54-b9c5-6a90eef86e9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nikhil Jain

unread,
Mar 9, 2018, 1:15:39 AM3/9/18
to SonarQube
Thanks G.Ann for the confirmation.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages