-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
BUGFIX: Asset usage prevent orphaned asset usage entries in case of a rebase with conflicts #5406
base: 9.0
Are you sure you want to change the base?
Conversation
if ($eventInstance instanceof WorkspaceWasRebased && $eventInstance->hadConflicts) { | ||
// because we don't know which changes were discarded in a conflict, we discard all changes and will build up the index on succeeding calls (with the kept reapplied events) | ||
$this->discardWorkspace($eventInstance->getWorkspaceName()); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also go into the match below.
What happens to the remaining events if the workspace was rebased sucessfully? Aren't they re-applied too? So do we really need to distinguish here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, question was answered in weekly.
But still this can go into the match below.
public function getWorkspaceName(): WorkspaceName | ||
{ | ||
return $this->sourceWorkspaceName; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh,... hmm. This seems to be dangerous. In your case "workspaceName" is "sourceWorkspaceName" but in other cases its "targetWorkspaceName". That's why we didn't implelemt the interface here earlier.
Also, is that needed at any point?
/** | ||
* Indicates if failing changes were discarded during a forced rebase {@see RebaseErrorHandlingStrategy::STRATEGY_FORCE} or if all events in the workspace were kept. | ||
*/ | ||
public bool $hadConflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed in the daily we want to rename this to hasSkippedEvents
Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions