azure-devops Merge Issue for Test Branch - azure

we have azure devops repo setup with Master > TEST > Development
for last sprint we merged changes from Development to TEST and had merge conflicts
one of the developer created local TEST branch and Merged Development changes to resolve changes and committed changes using local TEST branch
After that pullrequest is created from local TEST branch to Remote TEST branch & completed pull request
Now if we create pullrequest from Development to remote TEST it shows remote TEST is having latest changes
Any help will be appreciated and what all options available to resolve this issue
Flow
Thank you
Dyanesh

Here is my reproduction of your question. Is the process you want to express as shown below?
First clone the remote repo to the local and merge from the local Development branch into the local Test branch. Then push the local Test branch to the remote Test branch.
Then when you create a pull request from the Development branch to the Test branch in azure devops, you get the following prompt.
If so, this is normal, because you have merged the changes from the development branch to the local Test branch locally, and then pushed the changes from the local Test branch to the remote Test branch. At this point, the remote development branch has been synchronized with the Test branch, so naturally there are no changes that need to be merged.
If I misunderstood the issue, please point it out. It would be much easier for people to understand and reply if you could attach screenshots of detailed steps.

Thank you for reply, just after some research i see
1) We merged remote local branch from remote development few times using pullrequest and completing it.
2) After that used same remote local branch to merge changes to remote development branch
3) Now even though remote DEV and TEST branch are in sync, when we do pullrequest from DEV to TEST (remote) it shows still some changes are pending.
how to solve this issue any help will help us resolve this. flow explained in this diagram
Flow

Related

pre commit hooks in python specific CI CD pipeline

We have lot of python code residing in local git repository. Having installed gitlab locally, need to implement CI/CD pipeline. Need is to ensure, that all code is sanitized before being pushed to remote git repository. pre commit hooks that come by default with git, should help in doing so. Question is will it help to integrate git hooks with CI / CD pipeline? How ?
That hook is a client-side hook.
While CI/CD is done on the server side. Which means the hook itself is not integrated, but the script/command used by that hook can be reused in a gateway pipeline (on a runner configured to run Python).
(See also those CICD pipelines examples)
you push your topic/feature branch
the gateway pipeline is triggered (by the push event)
if it passes, it merges in turn your code to an integration branch (like development)
if it does not pass, your code does not end up on the dev branch, forcing you to fix whatever issue was highlighted by the gateway pipeline execution.
You also have Code Quality reports, to analyze how your improvements are impacting your code’s quality.

git pull in Azure Data Factory

When working with the regular source code, (Java, C++, etc..) there are things like
git pull ..
git fetch ..
git push ..
to synch your remote git repo branch with your local branch.
What is the equivalent of such in the Azure Data Factory world ?
So, I am using azure data factory with the Azure git repo.
I am working in the particular feature branch - "fefature branch"
And my pipeline has a copy activity that hits a data set in its "Sink" stage.
Here is a screen shot but .. it's pretty simple and seems right
I see that my code for Data set definition (Json) in the remote Git repository is different from what I see in the Azure portal gui (being pointed to that same remote branch). ADF Gui in the Azure Portal is correct, the one in the git repo contains some stuff that I already deleted, but it does not gets deleted there (Why??)
So, when I 'Debug' pipeline I get errors which indicate this discrepancy as a problem. I want ty sync the environments and .. given that I do not understand how the discrepancies came about, I don't know how to fix an issue?. Any help is appreciated.
In the ADF world, we use publish and create a new pull request to merge the new changes from a feature branch to the main branch.
it seems like your git repository version is not up to date with the live ADF.
If there are any pending changes in your main branch, then you can click on Publish button to merge the changes
And if you are working on the feature branches, you can merge the changes using the new pull request.
If you have multiple feature branches, then you will need to manually compare the different versions to resolve these conflicts.

commit code over gitlab but my local code is not updated

I have checkout the code few days back (almost a month ago), now i have made same changes but my local copy of code (on my machine) is not updated with the latest code.
now i have to commit my code to team repository in a situation where my local code have some code changes as well as team repository also have some new code.
please help me in simple steps to resolve it.
Thanks !
When you make some changes in your code use the "commit" for updating your local repository, once you're ready to send those changes to the remote server you should "push" and your local commits will be added into the remote server.
Now you have your own version of the code different from the remote servers one so you should "merge" them. I recommend you creating a branch to clear the changes and then merge it with the master.
Using a tool like DiffMerge will make your life easier to merge code.

How to achieve gated check-in for GitLab Repository?

My requirement is whenever developer try to do check-in existing GitLab repository then before doing check-in in repository,build should trigger (Jenkins build) and Junit test case should run on new check-in and if passes then it should go forward and will allow developer to do check-in in main repository.
I am not sure but is pre-hook commit can achieve this requirement?
While you could achieve this with pre-commit hooks, it's more common to do so with post-commit hooks on the server-side.
You can achieve this by operating a branch based workflow, there are multiple to choose from - I would recommend reading through this guidance by Atlassian.
Developers will create branches from a 'main' branch (often master, but can be a 'dev' branch working towards a release for instance), then develop code on that branch. They will then push their branch and commits to the remote repository (GitLab). When ready to merge into the main branch, your developers can open a merge request onto the main branch.
On GitLab you can setup a webhook to trigger Jenkins builds when a push event occurs. I would recommend this guide to guide you through it.
In the GitLab project settings you can require a passing build before merge requests are allowed to merge.
Furthermore, your understanding of Git seems incorrect - check in is not a term used in Git. Please take a look at the Git documentation. In Git a developer creates commits against a local copy of the repository, then pushes these to a remote repository (GitLab/GitHub etc.). There is no direct equivalent of the 'check in' used in various centralised version control systems e.g. SVN.

How to trigger automatic build in gitlab CI on commit to non-default branch?

I have a project in GitLab that is integrated with Gitlab CI. Every push to master shedules a build of the project.
However, when a new branch is created and pushed into repository, build is not sheduled in gitlab CI. What are the settings for enabling build of other branches - alterativaly, how can i figure out what went wrong?
how can i figure out what went wrong?
Analyse .gitlab-ci.yml. Take a look at this, I would take a wild guess that you have limited your job execution with:
...
only:
- master
...

Resources