Long-lived branch and short-lived branch - Clarification

Hi, I would like to clarify that if any change is made in the long-lived branch, will it affect the short-lived branch?

Example: At the end of the sprint, I am cutting a release from the develop branch for deployments. After that, any changes made in the develop branch (long-lived) will affect the short-lived branch also, though I haven’t merged my code to the short-lived branch (release).

Please clarify. Thanks in advance.

I also referred to the below documents.

Hi,

Welcome to the community!

I’m not quite sure what you’re asking.

New code is detected at analysis time based on the SCM metadata available in the project workspace.

Changes to your long-lived branches won’t impact analyses that have already run.

 
HTH,
Ann

Please find the detailed steps we do:

  1. First, we cut a release branch from develop
  2. Then we run the pipeline from the release branch and deploy it in the test environment and Quality gate gets passed.
  3. After sometime few commits will happen in the develop branch.
  4. We ran the pipeline from the release branch again with the same commit ID (No commits or update in the release branch) and deployed it in the pre-production environment but the Quality gate failed.

Please find the below findings

  • No change in the Branch policy or configuration
  • No change in the SonarCloud and QG configuration
  • No new commits or merge in the release branch

So the question here is, have the changes/commits made in the develop branch affected the release branch even though there is no merge?

Hi,

Okay, so this is about the Quality Gate status of your long-lived branch, develop? Short-lived branches aren’t really relevant here?

Why would you do that? Especially when there have been new commits?

What is your New Code Definition? You can check below the ‘New Code’ label on the New Code tab if you’re not sure.

 
Ann

Okay got it.
Lets assume that no new codes/commits made to the release branch. Can you please answer if the changes/commits made to the develop branch will create any impact on the upcoming pipeline runs on the release branch even though there is no merge?

Hi,

You have changes to the develop branch that

  • haven’t been analyzed
  • haven’t been merged into your short-lived branches

?

I can’t see how that would impact release since release doesn’t know about the changes.

 
HTH,
Ann