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

feat(backups/cleanVm): can fully merge VHD chains #6184

Merged
merged 14 commits into from
May 13, 2022
Merged

Conversation

fbeauchamp
Copy link
Collaborator

@fbeauchamp fbeauchamp commented Apr 11, 2022

Before this change, cleanVm only knew how to merge a single VHD, now, with the help of VhdSynthetic, it can merge the whole chain in a single pass.

Check list

Check if done, if not relevant leave unchecked.

  • PR reference the relevant issue (e.g. Fixes #007 or See xoa-support#42)
  • if UI changes, a screenshot has been added to the PR
  • documentation updated
  • CHANGELOG.unreleased.md:
    • enhancement/bug fix entry added
    • list of packages to release updated (${name} v${new version})
  • I have tested added/updated features (and impacted code)

Process

  1. create a PR as soon as possible
  2. mark it as WiP: (Work in Progress) if not ready to be merged
  3. when you want a review, add a reviewer (and only one)
  4. if necessary, update your PR, and re- add a reviewer

From the Four Agreements:

  1. Be impeccable with your word.
  2. Don't take anything personally.
  3. Don't make assumptions.
  4. Always do your best.

@fbeauchamp fbeauchamp force-pushed the feat_merge_multiple branch 2 times, most recently from ab93b3f to 510ab8a Compare April 13, 2022 07:32
@fbeauchamp fbeauchamp requested a review from ByScripts April 13, 2022 07:57
@fbeauchamp fbeauchamp force-pushed the feat_merge_multiple branch 3 times, most recently from d5e85cf to cf21d07 Compare April 21, 2022 07:31
@fbeauchamp fbeauchamp requested a review from ByScripts April 21, 2022 12:55
@ByScripts ByScripts requested a review from julien-f April 21, 2022 14:36
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
packages/vhd-lib/openVhd.js Outdated Show resolved Hide resolved
packages/vhd-lib/merge.js Outdated Show resolved Hide resolved
packages/vhd-lib/merge.js Outdated Show resolved Hide resolved
@fbeauchamp fbeauchamp force-pushed the feat_merge_multiple branch 3 times, most recently from d373be3 to 55b60be Compare May 9, 2022 14:23
@fbeauchamp fbeauchamp requested a review from julien-f May 9, 2022 14:32
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
packages/vhd-lib/merge.js Outdated Show resolved Hide resolved
packages/vhd-lib/merge.js Outdated Show resolved Hide resolved
@fbeauchamp fbeauchamp force-pushed the feat_merge_multiple branch from 55b60be to 79e6883 Compare May 10, 2022 07:26
@fbeauchamp fbeauchamp force-pushed the feat_merge_multiple branch from 79e6883 to d029a4c Compare May 10, 2022 07:30
@fbeauchamp fbeauchamp requested a review from julien-f May 13, 2022 07:37
@@ -56,16 +57,19 @@ module.exports = limitConcurrency(2)(async function merge(
flags: 'r+',
checkSecondFooter: mergeState === undefined,
})
const childVhd = yield openVhd(childHandler, childPath)
const childVhd = yield VhdSynthetic.open(childHandler, childPath)
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment above the function:

// childPath can be array to create a synthetic VHD from multiple VHDs
Suggested change
const childVhd = yield VhdSynthetic.open(childHandler, childPath)
const childVhd = yield Array.isArray(childPath) ? VhdSynthetic.open(childHandler, childPath) : openVhd(childHandler, childPath)

@julien-f julien-f changed the title feat(Backup): merge multiple feat(backups/cleanVm): can fully merge VHD chains May 13, 2022
@julien-f julien-f merged commit a1bcd35 into master May 13, 2022
@julien-f julien-f deleted the feat_merge_multiple branch May 13, 2022 14:46
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