-
Couldn't load subscription status.
- Fork 2.3k
Set git attributes to union changes in the CHANGELOG to reduce merge conflicts #18474
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
Conversation
…conflicts Signed-off-by: Craig Perkins <cwperx@amazon.com>
|
❌ Gradle check result for 9ec0df0: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Thanks @cwperks this really helps, just curious to see the behavior do you have sample PR from fork repo? |
|
@prudhvigodithi I do not, but I could merge this into security repo first and demonstrate it working. Essentially, by specifying |
|
@cwperks Indeed, this will make life so much better. Is it a possibility to avoid gradle checks when changes are made to this file? as this coupling makes it even worse. |
@rishabhmaurya It is possible, but I haven't scoped out what would be required for that. On the k-NN repo they use If the PR contains changes on any of those paths then it triggers the GHA. I'm wondering if that can be inverted to exclude running GHAs if changes are only in documentation files like |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18474 +/- ##
============================================
- Coverage 72.66% 72.60% -0.06%
- Complexity 67858 67868 +10
============================================
Files 5521 5521
Lines 312541 312541
Branches 45364 45364
============================================
- Hits 227113 226935 -178
- Misses 66903 67089 +186
+ Partials 18525 18517 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
+1 |
|
I'm only concerned about users, who might change the ordering of entries, where merge union may end up with duplicate entries. |
|
This is pretty cool - I think there is some logic for excluding via paths-ignore (https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) |
I'm not sure how it would look from a reviewers perspective, but something like that should be flagged during review.
Nice, that would work well for the core repo where the list of files/file extensions to exclude is smaller then the list to include. |
|
@cwperks Thanks for this suggestion, it sounds good in theory, lets see how it works in practice by merging this change :D |
|
@rishabhmaurya We have logic that skips the gradle check depending on which files are changed, and that does include CHANGELOG.md because of the OpenSearch/.github/workflows/gradle-check.yml Lines 19 to 32 in dd61c5d
|
…conflicts (opensearch-project#18474) Signed-off-by: Craig Perkins <cwperx@amazon.com>Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
…conflicts (opensearch-project#18474) Signed-off-by: Craig Perkins <cwperx@amazon.com>
…conflicts (opensearch-project#18474) Signed-off-by: Craig Perkins <cwperx@amazon.com>
Description
This is a quality of life PR to drastically reduce the number of merge conflicts and prevent maintainers from having to constantly resolve conflicts only in the CHANGELOG file.
By setting the gitattribute
merge=union, this tells git to automatically take the union of both sides of the conflicts without maintainers having to manually determine how to perform the merge.Related Issues
Resolves #18475
Related to https://about.gitlab.com/blog/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.