Additional metadata in PR

Share with


Transcript

Hey, everyone. It's Tom here, one of the onboarding managers here at Gearset, and I just wanted to run through a brief video with you to explain one of the more common questions we get about pipelines and just running through how to resolve this. So what I'm gonna do first of all is share my screen.

Now the question that we see come up quite often is when a feature branch gets created and you make that initial commit of some metadata to that feature branch, in the pull request, you see additional commits, additional metadata items, included on that feature branch, and, obviously, creates a a little bit of confusion as to as to why that's the case.

What I'm doing here is I'm just making a deployment sorry, a a merging of a pull request from my from my feature branch to my main branch, which will obviously then do the deployment to the production org.

What will then happen is when a new feature branch gets created, so I use this already. So I'll use this sandbox as an example.

I will create a new feature branch. Now, obviously, this is going to come from main branch. So, obviously, it has the main branch's, commit history. So let me just call it yes. Call it.

I can't spell today. Let's go to feature branch, additional items.

What I'm gonna do, I'm gonna start the comparison.

Now, obviously, this is where you as the users would run through the compare and deploy and make that initial commit to the feature branch. For the purpose of time, what I'm gonna do is actually cancel this. I'm not gonna make any commit to that feature branch, but I'm gonna go back into the pipeline, and you'll see what I mean. When I go back into that developer sandbox environment, we are already seeing a commit and, obviously, some metadata items on this feature branch. Now, obviously, I didn't do those myself.

The confusion in in the pipeline operation and the question that we sometimes get is, what's going on? Why is this happening?

So the first thing to to mention really is that the the why of this happening is that it's based on on git behavior. Essentially, what's happening is that the commit history of this branch here, the inter branch, and the main branch aren't in alignment.

And, essentially, when a pull request is made, and, again, we've got a document that goes into this in more detail, when a pull request is made, one of the things it looks at is the common ancestor, between the two branches, and it's that, essentially, which is out of alignment.

So, essentially, what you're seeing here in this feature branch is the merge commit sorry, the merge pull request of really the, item and its related items that I just committed, to the main branch and and therefore deployed to production.

Now the thing to note firstly is that this is only noise in this feature branch and this pull request. It's not pulling in items from outside the pipeline. These are items that already exist within the scope of the pipeline. So it's not going to break the pipeline, these being here, but we do understand it. It is a bit of a confusing experience, especially for for those of you who are used to the to the pipeline.

So what we're gonna do to resolve this, as I say, because it's a mismatch of the common ancestor between the main and the, at the inter branch, we're gonna go into the integration environment here and actually create a new sync PR. Now, obviously, what this is doing, it's creating a pull request to sync the inter branch with main.

And, essentially, what we're then doing is I created the feature branch from main, which means that, obviously, now has main's commit history.

The mismatch that you're seeing is between the feature branch and the int branch. So what we're doing is we're essentially gonna update the int branch with main's commit history. And what you'll see is that when these two branches are in alignment, the additional commit will then vanish from the future branch. So this will just take a minute or so to run through.

And I'm just going to go ahead. So you can see, obviously, we we are saying sync, the integration branch with main. It's a pull request like any other. I'm just gonna go ahead and promote those changes quickly.

And just to confirm, we have selected this button up here on this environment, and you would do it once this pull request goes through, you you'd do it for the next environment to the next environment because, essentially, each of these branches are out of line with that commit history from from main. So just to to mention that. Obviously, just because I've created it, I can't create another one. This one is is running through.

And as I say, I I want this video to be very much a case of a brief overview as to the why, but more so here's the behavior that you're seeing in pipelines, and here's how you can resolve it. We do have documentation that goes into a lot more detail as to the specifics of the Git behavior that you're seeing.

And I would suggest that if you're interested in digging more into that, that you head off to our documentation, and and, and dig into that in more detail.

So what we see here is, obviously, the the merge is is still in progress. Obviously, we're just validating this.

What should happen already so, obviously, this is turned blue because we're now doing the deployment. So in theory, the merging of the, of the pull request into the, enterprise should have happened. So if I go back into my, feature branch, my dev sandbox and the feature branch I just created, where you saw that, that initial commit and those metadata items is now no longer there. Now what you would see in your case, if you had gone through the compare and deploy, committed some metadata to the feature branch, is that this feature branch would now just contain the metadata that you've selected.

So, yeah, hope this has been helpful. As I say, this is one of the more common questions we get about the pipeline usage. It doesn't break your pipeline experience. You can remote that pull request with those additional commits in there.

It won't break the pipeline, but as I say, it is a it is a potentially confusing experience for for some pipeline users. So I really just wanted to run through showing you the behavior that you're seeing and showing how to resolve it, in the pipeline UI. So I hope this has been helpful. Thank you very much for joining me.

If you have any additional questions, please reach out to our support chat using the the in app chat here. But other than that, have a fantastic day. Thank you very much.