Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(git): Use local git for conflict detection #12575

Merged

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Nov 9, 2021

Changes:

  • Remove isConflicted field from platform and worker code
  • Call git.isBranchConflicted() instead of using isConflicted

Context:

Closes #3866

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@zharinov
Copy link
Collaborator Author

zharinov commented Nov 9, 2021

Unfortunately, this PR can't be split to separate smaller chunks

lib/util/git/index.ts Outdated Show resolved Hide resolved
lib/util/git/index.ts Outdated Show resolved Hide resolved
lib/workers/branch/reuse.ts Outdated Show resolved Hide resolved
lib/util/git/index.ts Show resolved Hide resolved
Sergei Zharinov and others added 2 commits November 9, 2021 13:22
Co-authored-by: Rhys Arkins <rhys@arkins.net>
JamieMagee
JamieMagee previously approved these changes Nov 10, 2021
@zharinov
Copy link
Collaborator Author

Ready for review

lib/util/git/index.ts Outdated Show resolved Hide resolved
lib/platform/types.ts Show resolved Hide resolved
lib/util/git/index.ts Outdated Show resolved Hide resolved
lib/util/git/index.ts Outdated Show resolved Hide resolved
@rarkins
Copy link
Collaborator

rarkins commented Nov 16, 2021

Maybe as a first step we do it without caching?

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the branch reuse refactoring be separated to a different PR?

rarkins
rarkins previously approved these changes Jan 22, 2022
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this LGTM, although it's a pretty big change so we need to keep our eyes open for performance or functional problems afterwards

@zharinov
Copy link
Collaborator Author

Stay tuned, I'll double check this locally with all platforms

@zharinov
Copy link
Collaborator Author

Stay tuned, I'll double check this locally with all platforms

Well, I can confirm everything worked with Azure, GitLab and GitHub. Most probaby it's okay for other platforms as well :shipit:

@viceice
Copy link
Member

viceice commented Jan 22, 2022

Ok, will review tomorrow

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add caching very soon after this.

lib/platform/bitbucket/index.ts Show resolved Hide resolved
lib/util/git/index.spec.ts Outdated Show resolved Hide resolved
@zharinov
Copy link
Collaborator Author

We should add caching very soon after this.

Already working on this

@rarkins rarkins enabled auto-merge (squash) January 24, 2022 09:20
@rarkins rarkins merged commit 5ca701c into renovatebot:main Jan 24, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 31.50.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

ademar59 pushed a commit to ademar59/renovate that referenced this pull request Jan 24, 2022
ademar59 pushed a commit to ademar59/renovate that referenced this pull request Jan 24, 2022
ademar59 pushed a commit to ademar59/renovate that referenced this pull request Jan 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor: Use git for branch merge compatibility
5 participants