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: Aggregate changes must know their affected origin dimension space points #5395

Draft
wants to merge 14 commits into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

ideas to reintroduce partial publishing show here #5386 that it could be non breaking but one thing is bad: The change node type and change node name dont know their affected dsp. This makes the change projection even more hacky (see

public const AGGREGATE_DIMENSIONSPACEPOINT_HASH_PLACEHOLDER = 'AGGREGATE';
) and also interpretation of the changes harder: https://github.com/neos/neos-ui/blob/f8c9527320cf133705920c54496bbb22400868b8/Classes/ContentRepository/Service/WorkspaceService.php#L88-L91 adding the missing infos here later might not be trivial! Especially in light if we want to change that node type change can be done per dimension. Even root node creations contains all dsp because it is correct:
/** Root nodes by definition cover *all* dimension space points; so we need to include the full list here. */
public DimensionSpacePointSet $coveredDimensionSpacePoints,

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

the logic is carried out inside `RebaseableCommands::commandMatchesAtLeastOneNode`

The reasoning behind this is that asking the commands which node aggregate id is affected _does_ work but the capabilities stop if we want to ask which dimensions are affected.

For that we must use the event instead - at least in the future if we want to reintroduce dimension based publishing again. The matching list from commands to node id will also be simplified once we use the `EmbedsNodeAggregateId` interface instead and operate on events.
…stead of `NodeIdsToPublishOrDiscard`

... as a 3rd option the followup commit will just flush the full asset usage workspace!
…arded in the events (for now)

Introduced with neos@f2c66e0 - its not important for the graph projection and only used by the asset usage catchup hook which can be adjusted.

If we want to re-introduce `$publishedNodes` to the event should be also careful that we calculate them from the _actual_ events so we can know for sure there is no gibberish in the event.
Previously for example discarding a non-existing node or a node in a not valid DSP would just save that directly into the event, which is not correct as that did not happen like that. It was merely a bad intention.
Instead of fine granular updating only the usage references on the nodes that were discarded, well throw away everything and then rely on the reapplied events what is kept.

This is more consistent to how other parts react to publishing like the graph just forks a new content stream and doesnt care about the old data, the change projection behaves similar to the graph.
And for the content cache flusher we had the discussion to use `discardedNodes` but opted against it and do a full flush there as well: neos#5175 (comment)

This change allows us to get rid of the `discardedNodes` property (with dimensions) in the `WorkspaceWasPartiallyDiscarded` event.
reasoning:

- the `publishedNodeIds` were removed on the event, as we dont need it, and it would rise a discussion if we need to keep dimension space points there too or not: see neos#5386 how i archived it.

- instead of now trying to make `WorkspaceWasPartiallyPublished` contain all the information we dont use or need, the idea is to make it dumb. Now its basically just a `WorkspaceWasPublished` and then the other remaining events are applied as if they were carried out by a user.
If we need to add more metadata to the partial publish at some point, that would need a new event id say as we woouldnt be able to mess with the `WorkspaceWasPartiallyPublished` once released.
So by just combining them into one we have the option open to create a `WorkspaceWasPartiallyPublished` again but differently which wil be breaking too but differently. Its just a new event then, no need to migrate data.
…teTypeWasChanged` (and rename)

This information is required for the change projection and in the future to select changes for one dimension to publish
@mhsdesign mhsdesign changed the title !!! BUGFIX: Aggregate changes with affected origin dimension space points !!! BUGFIX: Aggregate changes must know their affected origin dimension space points Dec 5, 2024
@github-actions github-actions bot added the 9.0 label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant