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

TASK: Remove obsolete OUTDATED_CONFLICT state leftovers #5143

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private function whenWorkspaceWasRebased(WorkspaceWasRebased $event): void

private function whenWorkspaceRebaseFailed(WorkspaceRebaseFailed $event): void
{
$this->markWorkspaceAsOutdatedConflict($event->workspaceName);
$this->markWorkspaceAsOutdated($event->workspaceName);
}

private function whenWorkspaceWasRemoved(WorkspaceWasRemoved $event): void
Expand Down Expand Up @@ -373,18 +373,4 @@ private function markWorkspaceAsOutdated(WorkspaceName $workspaceName): void
'workspaceName' => $workspaceName->value
]);
}

private function markWorkspaceAsOutdatedConflict(WorkspaceName $workspaceName): void
{
$this->dbal->executeUpdate('
UPDATE ' . $this->tableName . '
SET
status = :outdatedConflict
WHERE
workspacename = :workspaceName
', [
'outdatedConflict' => WorkspaceStatus::OUTDATED_CONFLICT->value,
'workspaceName' => $workspaceName->value
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ enum WorkspaceStatus: string implements \JsonSerializable
*/
case OUTDATED = 'OUTDATED';

/**
* CONFLICT Example:
*
* CONFLICT is a special case of OUTDATED, but then an error happens during the rebasing.
*
* Workspace Review <----------------------------------- Workspace User-Foo
* | . |
* Content Stream A2 (current) <-- Content Stream B2 (rebasing) |
* Content Stream B1
*/
case OUTDATED_CONFLICT = 'OUTDATED_CONFLICT';

public function equals(self $other): bool
{
return $this->value === $other->value;
Expand Down
Loading