From ff938dee0cacb76f8d081213bc6b32cf7251f37b Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 22 Jan 2025 21:54:59 +0100 Subject: [PATCH] BUGFIX: Avoid rebasing workspace after discard all solution during conflict resolution Otherwise, the now up-to-date workspace is synced leading to a no-op exception: > Skipped rebase workspace "admin-admington" because it is not outdated. --- .../Fixtures/1Dimension/syncing.e2e.js | 2 -- packages/neos-ui-sagas/src/Sync/index.ts | 14 ++++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js b/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js index bdc760cf2f..f3ba975d77 100644 --- a/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js +++ b/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js @@ -21,7 +21,6 @@ test('Syncing: Create a conflict state between two editors and choose "Discard a await prepareContentElementConflictBetweenAdminAndEditor(t); await chooseDiscardAllAsResolutionStrategy(t); await confirmAndPerformDiscardAll(t); - await finishSynchronization(t); await assertThatWeAreOnPage(t, 'Home'); await assertThatWeCannotSeePageInTree(t, 'Sync Demo #1'); @@ -62,7 +61,6 @@ test('Syncing: Create a conflict state between two editors and choose "Drop conf await cancelDropConflictingChanges(t); await chooseDiscardAllAsResolutionStrategy(t); await confirmAndPerformDiscardAll(t); - await finishSynchronization(t); await assertThatWeAreOnPage(t, 'Home'); await assertThatWeCannotSeePageInTree(t, 'Sync Demo #1'); diff --git a/packages/neos-ui-sagas/src/Sync/index.ts b/packages/neos-ui-sagas/src/Sync/index.ts index a6f2fca4ab..4bac01877c 100644 --- a/packages/neos-ui-sagas/src/Sync/index.ts +++ b/packages/neos-ui-sagas/src/Sync/index.ts @@ -92,7 +92,7 @@ export const makeSyncPersonalWorkspace = (deps: { export const makeResolveConflicts = (deps: { syncPersonalWorkspace: ReturnType }) => { - const discardAll = makeDiscardAll(deps); + const discardAll = makeDiscardAll(); function * resolveConflicts(conflicts: Conflict[]): any { while (true) { @@ -155,16 +155,14 @@ function * waitForRetry() { return Boolean(retried); } -const makeDiscardAll = (deps: { - syncPersonalWorkspace: ReturnType; -}) => { +const makeDiscardAll = () => { function * discardAll() { yield put(actions.CR.Publishing.start( PublishingMode.DISCARD, PublishingScope.ALL )); - const {cancelled, failed}: { + const {cancelled}: { cancelled: null | ReturnType; failed: null | ReturnType; finished: null | ReturnType; @@ -176,12 +174,8 @@ const makeDiscardAll = (deps: { if (cancelled) { yield put(actions.CR.Syncing.cancelResolution()); - } else if (failed) { - yield put(actions.CR.Syncing.finish()); - } else { - yield put(actions.CR.Syncing.confirmResolution()); - yield * deps.syncPersonalWorkspace(false); } + yield put(actions.CR.Syncing.finish()); } return discardAll;