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

BUGFIX: Asset usage prevent orphaned asset usage entries in case of a rebase with conflicts #5406

Open
wants to merge 4 commits into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

Comment on lines +77 to +81
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;
}
Copy link
Contributor

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?

Copy link
Contributor

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.

Comment on lines +62 to +66
public function getWorkspaceName(): WorkspaceName
{
return $this->sourceWorkspaceName;
}

Copy link
Contributor

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
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Under Review 👀
Development

Successfully merging this pull request may close these issues.

2 participants