FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge conflict handling for etc-merge by Johan-Liebert1 · Pull Request #2286 · bootc-dev/bootc · GitHub

Merge conflict handling for etc-merge - #2286

Open
Johan-Liebert1 wants to merge 5 commits into
bootc-dev:mainfrom
Johan-Liebert1:etc-merge-bugfix
Open

Merge conflict handling for etc-merge#2286
Johan-Liebert1 wants to merge 5 commits into
bootc-dev:mainfrom
Johan-Liebert1:etc-merge-bugfix

Conversation

Copy link
Copy Markdown
Collaborator

See #2285 for the implementation details

Closes: #2285

We would have unmergable paths if a modified file was changed to a
directory in the new etc or vice-versa. One of the major issues was that
we were erroring out during "merge" which is not ideal. A new vector now
keeps track of all unmergable paths and the reason they're not mergable.

Ref: composefs/composefs-rs/issues/335

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Currently we have a hard error whenever we find a merge conflict in etc.
Introduce MergeStrategy enum with Fail, Skip and Replace variants which
fail, skip copying and replace file/directory in the new etc
respectively upon encountering a merge conflict.

The deafult, while finalizing, is to still fail; next step would be
making this configurable

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Before we write the staged deployment file at `/run/composefs` we now
compute the etc diff in advance to check whethere we will face any merge
conflicts while finalizing the deployment.

We accept the merge strategy either from the Cli or from config file at
`/usr/lib/bootc/finalize.toml`. If we find conflicts and merge strategy
is to Fail, we fail early on upgrade/switch and not while finalizing the
deployment.

Write the merge strategy to the staged file to use during finalization

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
The test was largely AI generated

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Johan-Liebert1 requested a review from cgwalters July 7, 2026 09:41
Johan-Liebert1 added the ci/tier-1 Run CI for tier-1 OS (centos-10) only label Jul 7, 2026
github-actions Bot added the area/documentation Updates to the documentation label Jul 7, 2026
bootc-bot Bot requested a review from gursewak1997 July 7, 2026 09:42

cgwalters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Marking as requested changes per discussion in the issue

Copy link
Copy Markdown
Collaborator Author

Opened #2301 splitting out "Compute etc diff before staging" commit

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation ci/tier-1 Run CI for tier-1 OS (centos-10) only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolving conflicts for etc merge

2 participants


Back | FazBrowse Home | New Git URL