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

POC drop changes during publish inside deleted parts #5462

Draft
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Feb 6, 2025

Attempts to fix #4997 by silently dropping unapplicable changes where its assumed their parent has been deleted.

Now this is not a trivial task and might be after all a bad choice with unexpected behaviour.

As we don't want to expensively find out which published remove nodes overshadowed changes in the tree we simply make the assumption that any unapplicable change because their target node id cannot be found can be drooped. Almost.

Now there are exceptions to the rule. For example #5364 shows that moving a node out of a tree which is later deleted and published first is certainly an expected behaviour. Here this change must not be dropped.

So a more solid solution could do the following when a remaining change fails to apply:

  • check if the target node id doesnt exist at the current time, which means indeed the change was overshadowed and is not applicable because of this reason
  • check if the change is a change we like to ignore like create node, set properties etc.

One more note: Because of dimensions dropping changes is not trivial at all. For example a remove node is allowed to target only STRATEGY_ALL_SPECIALIZATIONS while an overshadowed creation or variant creations could affect other dimensions where the change should still prevail.

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

@github-actions github-actions bot added the 9.0 label Feb 6, 2025
@mhsdesign mhsdesign changed the title WIP drop-changes-during-publish-inside-tree-if-deleted POC drop changes during publish inside deleted parts Feb 7, 2025
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.

BUG: Publishing individual nodes is impossible when contents were created on a deleted document
1 participant