neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

BUGFIX: Partial publish breaks uri and change Projection

Open kitsunet opened this issue 1 year ago • 6 comments

A partial publish results in events annotated for "live" workspace yet are not in the "live" content stream.

This is due to a fork of the live content stream being created with the partially published events in, which is then published to the actual live content stream. This leaves behind duplicate events both containing "workspaceName: live" yet only one of them is in the live content stream. A catchup or replay will fail however due to duplicate database entries for the projections relying on anything with "workspaceName: live" being actually in the live content stream.

The provided test fails showing the behavior.

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

kitsunet avatar Oct 16 '24 18:10 kitsunet

WIP DO NOT MERGE, it's just a test showing the behavior.

kitsunet avatar Oct 16 '24 18:10 kitsunet

The latest commit fixes the issue at least for new events, but we still need a solution for existing events.

kitsunet avatar Oct 16 '24 20:10 kitsunet

The fix is more of a proof-of-concept. I will work on virtual workspaces now and adjust the fix to that once it's done.

kitsunet avatar Oct 18 '24 07:10 kitsunet

Fyi this was my virtual workspace name draft: https://github.com/neos/neos-development-collection/pull/5167

mhsdesign avatar Oct 18 '24 07:10 mhsdesign

also this can then be fixed with catchup hooks https://github.com/neos/neos-development-collection/blob/b11026d6bed5dee1cbfb514dfea3a90039b47100/Neos.Neos/Classes/AssetUsage/CatchUpHook/AssetUsageCatchUpHook.php#L51-L60

mhsdesign avatar Oct 18 '24 08:10 mhsdesign

I have no clue why these Behat tests are failing, they are fine on my machine and I can't see the relation between the test and what I changed in this.

kitsunet avatar Oct 20 '24 08:10 kitsunet

i cherry picked the test to our big pr and also documented why we are not going that way in https://github.com/neos/neos-development-collection/issues/5327 so that why we can close this

mhsdesign avatar Oct 27 '24 19:10 mhsdesign