-
-
Notifications
You must be signed in to change notification settings - Fork 224
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: Re-introduce stricter checks for subtree en/disabling and tagging #5357
BUGFIX: Re-introduce stricter checks for subtree en/disabling and tagging #5357
Conversation
…ging Previously, when trying to disable an already disabled node, we just ignored that fact and did not produce any events. That leads to a potentially opaque behavior: ``` User A: log into backend User B: log into backend User A: Hide Node X User B: Hide Node X User B: Publish User A: Rebase User B: Unhide Node X User B: Publish User A: Rebase <--- now Node X is re-enabled even though User A had explicitly disabled it ``` With this change, the sequence is: ``` User A: log into backend User B: log into backend User A: Hide Node X User B: Hide Node X User B: Publish User A: Rebase <--- this leads to a conflict because both users disabled the same node. And User A can now explicitly decide to ignore that fact ``` Note: This mostly reverts #4284 that was introduced because we did not have a conflict resolution in place Related: #4284
Current, intransparent behavior: 5357_screenrecording_bug.movAnd with the fix applied: 5357_screenrecording_fix.mov |
Thanks, does that mean that |
Right, that's why I removed it :) |
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.
i thought already if there are other places publishing 0 events, and yes there are: Now this introduces a regression and throws in the event publishing
Options to fix this: |
meh.. E: Prevent |
E would mean that the |
Right, but i think that would be fine in this case. It is already nullable in |
Sounds fine to me, I am considering in my head if we would ever need to make a difference between no initial properties and empty initial properties, but I don't quite see it yet. (I could construct a case were you want to avoid defaultValues and eg. we make it so that empty initial fills the defaults while null initial will not, which we would block this way, buuuut that seems far fetched.) So it seems like a relatively safe choice, even if nullable is annoying of course. |
I still think this is a mistake and we should allow empty event sets 🤷 Instead of trying to fix it at the source (which might not even know without expensive checks if an event would result) |
Hmm with the followup in #5396 which leverages heavily phpstan to ensure no empty evens are ever published, im positive that we can go down this road and i do like the new strictness and it definitely makes sense that each command results in at least one event also in light that we want to prevent noops for publish and rebase on the lover level: #5337 |
I think it's weird to expect the command issuers to effectively know if something would result in an event or not.... But yeah lets go with this for now, we can always get more loose again. |
Previously, when trying to disable an already disabled node, we just ignored that fact and did not produce any events. That leads to a potentially opaque behavior:
With this change, the sequence is:
Basically reverts #4284 again because we have conflict resolution