Skip to content

pre-commit: add hook check-merge-conflict#7883

Merged
DaanHoogland merged 1 commit into
apache:mainfrom
jbampton:pre-commit-merge-conflict
Oct 10, 2023
Merged

pre-commit: add hook check-merge-conflict#7883
DaanHoogland merged 1 commit into
apache:mainfrom
jbampton:pre-commit-merge-conflict

Conversation

@jbampton

Copy link
Copy Markdown
Member

Check for files that contain merge conflict strings.

https://github.com/pre-commit/pre-commit-hooks#check-merge-conflict

Another check or test we can have that can run automatically locally with git commit.

Description

This PR adds another pre-commit hook expanding our framework and coverage.

The new hook check-merge-conflict is from the official pre-commit repos.

We do already have a GitHub Action that checks for merge conflicts but this new hook is better
since it runs both locally and on CI with pre-commit.

If the check or test can run locally then there is faster feedback to the developer before opening a pr.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Just run the new hook:

pre-commit run check-merge-conflict --all-files

Run all hooks:

pre-commit run --all-files

@codecov

codecov Bot commented Aug 20, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7883 (7a5ee72) into main (4eb110a) will increase coverage by 7.70%.
Report is 46 commits behind head on main.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #7883      +/-   ##
============================================
+ Coverage     22.09%   29.79%   +7.70%     
- Complexity    21577    31119    +9542     
============================================
  Files          4966     5100     +134     
  Lines        336379   367598   +31219     
  Branches      48340    56289    +7949     
============================================
+ Hits          74328   109542   +35214     
+ Misses       251209   243170    -8039     
- Partials      10842    14886    +4044     
Flag Coverage Δ
simulator-marvin-tests 25.72% <ø> (+2.20%) ⬆️
uitests 4.86% <ø> (-0.01%) ⬇️
unit-tests 14.64% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1383 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jbampton

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@jbampton a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6837

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7045

Check for files that contain merge conflict strings.

https://github.com/pre-commit/pre-commit-hooks#check-merge-conflict

Another check or test we can have that can run automatically locally with `git commit`.
@DaanHoogland DaanHoogland force-pushed the pre-commit-merge-conflict branch from a451919 to 7a5ee72 Compare September 18, 2023 12:02
@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7048

@DaanHoogland

Copy link
Copy Markdown
Contributor

the UI build fails, not sure if this is with this PR alone.

@DaanHoogland DaanHoogland reopened this Sep 29, 2023
@DaanHoogland DaanHoogland added this to the 4.19.0.0 milestone Sep 29, 2023

@vishesh92 vishesh92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@DaanHoogland DaanHoogland merged commit 7e998f9 into apache:main Oct 10, 2023
@jbampton jbampton deleted the pre-commit-merge-conflict branch October 10, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants