-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
FEATURE: Introduce Workspace::hasPublishableChanges
#5332
FEATURE: Introduce Workspace::hasPublishableChanges
#5332
Conversation
One note regarding count vs flag: |
Neos.ContentGraph.DoctrineDbalAdapter/src/Domain/Projection/Feature/ContentStream.php
Outdated
Show resolved
Hide resolved
c775b11
to
82daa7c
Compare
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.
This looks great, thanks!
Except for the implicit no-ops for invalid publish/discards, but you wanted to change that in a follow-up IIRC
publishableEvents
count on content streamWorkspace::hasPublishableChanges
... because it would lead to hard to debug code and is not expected to fail
... and dont `updateContentStreamVersion` for it https://neos-project.slack.com/archives/C04PYL8H3/p1730292774760689
82daa7c
to
489db4c
Compare
Removed the unrelated rabbit hole changes into a new pr: #5333 |
we discussed in the weekly today that we want name the column |
interesting test failure because the test doesn#t say anytghing about no changes.... |
you know what, not following my own advice here. This has not too much to do with this change, I will revert my changes and merge this. WE can throw later... (as these changes are now gone here, I added throws for the no ops) |
110020d
to
2e5eb47
Compare
jup thanks for attempting the change though... ill continue it in #5337 for beta16 :) |
Introduces
Workspace::hasPublishableChanges
which will be used for following cases:Discard
a noop (instead of looking into the event stream)ChangeBaseWorkspace
fail if the workspace has changes (instead of looking into the event stream)DeleteWorkspace
fail if the workspace has changes (future pr)Also its good to have some rudimentary changes concept already low level which will hopefully improved at somepoint in Neos X by diffing two content graphs or something.
Note also that the
hasPublishableChanges
will also return true for the case a NodeMigration was run on the workspace and created events likeDimensionShineThroughWasAdded
which are in fact publish able (which is NOT detected via the change projection !!!).Implementation:
We decided for a simple
hasChanges
boolean flag on the content stream for now which will be set if there is at least one event that is considered a change:PublishableToWorkspaceInterface
.Technically an increment to count the events that are
PublishableToWorkspaceInterface
could also work but as there is no grouping of events per node aggregate id it would be hard to reason about the number and its meaning (it would be completely different to the change projections count)We leverage the
PublishableToWorkspaceInterface
to ignore events like forking, closing and reopening, as they are not published to another stream.Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions