Skip to content

feat: auto-resolve for common business rule case #577

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

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

isc-tleavitt
Copy link
Collaborator

@isc-tleavitt isc-tleavitt commented Oct 24, 2024

Fun / motivating example with a production and business rule with multiple conflicting commits:

Syncing local repository...

Fetch done
Pulling from branch: issue-526-test1
From [https://scm.dev.isccloud.io/appservices/appservices](https://scm.dev.isccloud.io/appservices/appservices%3Cbr%3E)
 * branch            issue-526-test1 -> FETCH_HEAD

Already up to date.


Nothing to compile.

From [https://scm.dev.isccloud.io/appservices/appservices](https://scm.dev.isccloud.io/appservices/appservices%3Cbr%3E)
 * branch            issue-526-test1 -> FETCH_HEAD

Pull ran with return code: 0
Everything up-to-date

From [https://scm.dev.isccloud.io/appservices/appservices](https://scm.dev.isccloud.io/appservices/appservices%3Cbr%3E)
   49193ab..6dc35c6  development -> development

Rebasing (1/4)
error: could not apply 9439ab3... modified src/HCC/Connect/Production.cls
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 9439ab3... modified src/HCC/Connect/Production.cls

Auto-merging src/HCC/Connect/Production.cls
CONFLICT (content): Merge conflict in src/HCC/Connect/Production.cls

Attempting to resolve differences in production definition...
Attempting intelligent auto-merge for: src/HCC/Connect/Production.cls
HCC.Connect.Production.CLS has been imported from /data/db/mgr/repo/TLEAVITT/src/HCC/Connect/Production.cls
Compilation started on 10/24/2024 17:12:05 with qualifiers 'ck'
Compiling class HCC.Connect.Production
Compiling routine HCC.Connect.Production.1
Compilation finished successfully in 0.032s.

Rebasing (2/4)
Rebasing (3/4)
error: could not apply 2d8d4d5... modified src/HCC/Connect/Production.cls, modified src/HCC/Foo/FooRoutingRule.cls
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2d8d4d5... modified src/HCC/Connect/Production.cls, modified src/HCC/Foo/FooRoutingRule.cls

Auto-merging src/HCC/Connect/Production.cls
CONFLICT (content): Merge conflict in src/HCC/Connect/Production.cls
Auto-merging src/HCC/Foo/FooRoutingRule.cls
CONFLICT (content): Merge conflict in src/HCC/Foo/FooRoutingRule.cls

Attempting intelligent auto-merge for: src/HCC/Connect/Production.cls
HCC.Connect.Production.CLS has been imported from /data/db/mgr/repo/TLEAVITT/src/HCC/Connect/Production.cls
Compilation started on 10/24/2024 17:12:05 with qualifiers 'ck'
Compiling class HCC.Connect.Production
Compiling routine HCC.Connect.Production.1
Compilation finished successfully in 0.032s.

Attempting intelligent auto-merge for: src/HCC/Foo/FooRoutingRule.cls
HCC.Foo.FooRoutingRule.CLS has been imported from /data/db/mgr/repo/TLEAVITT/src/HCC/Foo/FooRoutingRule.cls
Compilation started on 10/24/2024 17:12:05 with qualifiers 'ck'
Compiling class HCC.Foo.FooRoutingRule
Compiling routine HCC.Foo.FooRoutingRule.1
Compilation finished successfully in 0.013s.

Rebasing (4/4)

�[KSuccessfully rebased and updated refs/heads/issue-526-test1.
 success!
    M    HCC.Connect.Production.CLS    src/HCC/Connect/Production.cls
    M    HCC.Foo.FooRoutingRule.CLS    src/HCC/Foo/FooRoutingRule.cls
HCC.Connect.Production.CLS has been imported from /data/db/mgr/repo/TLEAVITT/src/HCC/Connect/Production.cls
HCC.Foo.FooRoutingRule.CLS has been imported from /data/db/mgr/repo/TLEAVITT/src/HCC/Foo/FooRoutingRule.cls
Compilation started on 10/24/2024 17:12:05 with qualifiers 'ck'
Compiling 2 classes
Compiling class HCC.Foo.FooRoutingRule
Compiling class HCC.Connect.Production
Compiling routine HCC.Foo.FooRoutingRule.1
Compiling routine HCC.Connect.Production.1
Compilation finished successfully in 0.039s.

Updating production... done.
remote: 
remote: View merge request for issue-526-test1:        
remote:   https://scm.dev.isccloud.io/appservices/appservices/-/merge_requests/35        
remote: 
To [https://scm.dev.isccloud.io/appservices/appservices.git](https://scm.dev.isccloud.io/appservices/appservices.git%3Cbr%3E)
 + 25cc0e3...4d420fe issue-526-test1 -> issue-526-test1 (forced update)

Fixes #391

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 23.75000% with 61 lines in your changes missing coverage. Please review.

Project coverage is 25.78%. Comparing base (390bfd3) to head (f39b2ff).

Files with missing lines Patch % Lines
cls/SourceControl/Git/Util/ResolutionManager.cls 0.00% 57 Missing ⚠️
cls/SourceControl/Git/Util/XMLConflictResolver.cls 86.36% 3 Missing ⚠️
cls/SourceControl/Git/Utils.cls 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #577      +/-   ##
==========================================
- Coverage   25.84%   25.78%   -0.06%     
==========================================
  Files          18       19       +1     
  Lines        2724     2730       +6     
==========================================
  Hits          704      704              
- Misses       2020     2026       +6     

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

@isc-tleavitt
Copy link
Collaborator Author

@isc-pbarton I'd like your review on this too because it's a big change

@isc-tleavitt isc-tleavitt merged commit 81e6f6a into main Oct 24, 2024
2 checks passed
@isc-tleavitt isc-tleavitt deleted the resolution-improvements branch October 24, 2024 19:13
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.

Expand automatic resolution of XML conflicts to cover business rules
4 participants