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

Report list of files from merge conflicts #307

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

ziegenberg
Copy link
Contributor

When we experience merge conflicts in the CiBot Precheck it would be nice to have more information than just: "does not apply clean", e.g. https://integration.moodle.org/job/Precheck%20remote%20branch/160991/artifact/work/errors.txt/*view*/

This adds the output from git diff --name-only --diff-filter=U, which provides the list of files not merged because of a conflict.

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 32.99%. Comparing base (25c1908) to head (15599a4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #307      +/-   ##
==========================================
+ Coverage   32.90%   32.99%   +0.08%     
==========================================
  Files          71       71              
  Lines        3218     3222       +4     
==========================================
+ Hits         1059     1063       +4     
  Misses       2159     2159              
Flag Coverage Δ
check_upgrade_savepoints 0.46% <0.00%> (-0.01%) ⬇️
checkstyle_manipulations 0.00% <0.00%> (ø)
compare_databases 2.38% <0.00%> (-0.01%) ⬇️
continuous_manage_queues_validation 0.71% <0.00%> (-0.01%) ⬇️
define_excluded 1.11% <0.00%> (-0.01%) ⬇️
detect_conflicts 1.48% <0.00%> (-0.01%) ⬇️
diff_extract_changes 0.00% <0.00%> (ø)
git_sync_two_branches 2.04% <0.00%> (-0.01%) ⬇️
grunt_process 3.01% <0.00%> (-0.01%) ⬇️
illegal_whitespace 2.63% <0.00%> (-0.01%) ⬇️
list_valid_components 0.00% <0.00%> (ø)
mustache_lint 2.82% <0.00%> (-0.01%) ⬇️
mustache_lint_plugins 1.30% <0.00%> (-0.01%) ⬇️
php_lint 1.21% <0.00%> (-0.01%) ⬇️
prepare_npm_stuff 1.52% <0.00%> (-0.01%) ⬇️
remote_branch_checker 17.38% <100.00%> (+0.10%) ⬆️
remote_branch_reporter 0.00% <0.00%> (ø)
setup 0.00% <0.00%> (ø)
thirdparty_check 1.45% <0.00%> (-0.01%) ⬇️
travis-branch-checker 0.00% <0.00%> (ø)
upgrade_external_backup 1.61% <0.00%> (-0.01%) ⬇️
verifications 0.00% <0.00%> (ø)
verify_commit_messages 2.63% <0.00%> (-0.01%) ⬇️
verify_phpunit_xml 1.24% <0.00%> (-0.01%) ⬇️
versions_check_set 5.02% <0.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@stronk7 stronk7 left a comment

Choose a reason for hiding this comment

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

Good one @ziegenberg . Only an issue that I can imagine (as commented in the patch), towards ensuring that the list of conflicting files is reported.

@ziegenberg
Copy link
Contributor Author

ziegenberg commented Jul 22, 2024

Regarding test coverage, I wasn't able come up with any non-stupid test to reasonably test this scenario. Any ideas?

@stronk7
Copy link
Member

stronk7 commented Jul 22, 2024

Regarding test coverage, I wasn't able come up with any non-stupid test to reasonably test this scenario. Any ideas?

Let me check that (tomorrow). I think we have some other test checking for merge conflicts and it's based on existing branch elsewhere. Sure we can reuse it to get this patch covered. Will share once available.

@stronk7
Copy link
Member

stronk7 commented Jul 23, 2024

Hi @ziegenberg ,

as promised, I've sent one extra commit to your branch that covers the patch with unit tests. It's passing here.

So, I'd suggest to just squash your 2 commits, prepare the final branch and I think this nice addition can safely land.

Ciao :-)

@ziegenberg ziegenberg force-pushed the report-merge-conflicts-details branch from 487cc61 to 15599a4 Compare July 23, 2024 11:31
@ziegenberg
Copy link
Contributor Author

Hi @stronk7,

thank you for the extra unit test. I squashed and force-pushed. It's ready for merging.

@ziegenberg ziegenberg requested a review from stronk7 July 23, 2024 11:33
@ziegenberg
Copy link
Contributor Author

Hi @stronk7, what's up with this funky gherkin unit test? I'm pretty sure I did not touch anything there...

@stronk7
Copy link
Member

stronk7 commented Jul 23, 2024

Hi @stronk7, what's up with this funky gherkin unit test? I'm pretty sure I did not touch anything there...

Yeah, don't worry. There are a few random failures here and there (connectivity problems, ...). I simply reran the failed tests and now they passed.

Ciao :-)

@stronk7 stronk7 merged commit dc590a5 into moodlehq:main Jul 23, 2024
51 checks passed
@ziegenberg ziegenberg deleted the report-merge-conflicts-details branch February 6, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants