Closed kitsunet closed 4 months ago
Ok legacy migration tests fail, I guess changes are needed there, I had done the obvious code adaptions, but probably that's not enough
@kitsunet Thanks so much for putting a tremendous amount of time into this. I think it looks great already. I just left some mostly nitpicky comments after a first quick pass mostly to dump my thoughts – no need to fix those (now).
One more important architectural choice is the stateful
ContentGraphFinder
. If I get it right, it now needs agetInstances()
method such that we can access (and reset the state of) all previously created CG instances in order to enable or disable their inMemory cache. And then we need areset()
method to reset the instances for tests.This is quite a lot of "burden" to an interface (and custom implementations) for some really low-level goals. Maybe together we can come up with a slightly different mechanism to work with those runtime caches. But this is certainly no reason to block this one, we could always tweak it in a follow-up.
Great work!
<3 Thank you!
Yes lets definitely have a look at those low level things, they were really an afterthought since I realized that definitely the tests do not like having the instances around. We could completely skip the cache, but then any cache within the CG or subgraph wouldn't be much use either because you get a fresh instance every time.
@kitsunet I took the freedom to push our changes from yesterday (24cfa06d01200ca7f19d7243b4fab59cb6ebca0a) to this PR. I don't know if tests are still green because there is a conflict that I wasn't able to resolve
FYI we have a MAJOR conflict with #5018 see https://github.com/neos/neos-development-collection/pull/5018#issuecomment-2102199661
Oooof, again :(
I mean before operating the query changes out I rather fix the conflicts I guess, IDK
Oooof, again :(
half as bad i just checked with Bernhard and he said this pr can go first and he will solve the conflicts, which are not thaaat bad ;)
Documented all followups here ;) https://github.com/neos/neos-development-collection/issues/5038
Hah, net minus lines, nice!
UI Adjustments: https://github.com/neos/neos-ui/pull/3775
Note for later: Interesting that removal of the "doesNotExistYet" check did not lead any test to fail. Might be worth adding a test that checks that handling a command that tries to create an already existing ContentStream actually fails with the (re-added) exception.
Wow now its finally done. Thx for the plenty adjustments and your motivation.
@bwaidelich do you want to +1 as well?
@mhsdesign being trigger-happy again without even waiting for the checks to pass :)
Haha lol idk this was automerge? 😂
The ContentGraph is now always bound to a
WorkspaceName
andContentStreamId
combination. The internal! ProjectionState of the ContentGraph is now theContentGraphFinder
which allows you to get an instance of theContentGraph
bound to a combination (usually by giving only theWorkspaceName
).The userland way to access the content graph is to ask the content repository:
ContentRepository::getContentGraph(WorkspaceName)
Upgrade instructions
The
WorkspaceName
must be passed along to get a subgraph instead of the internalContentStreamId
:This pr presents an in between step. Its for example currently not easily possible to get the WorkspaceName of a
Node
, but that will be solved in a following pr see also https://github.com/neos/neos-development-collection/issues/4564. In this intermediate step, one must ask the workspace finder first to resolve a workspace for content stream which then can be passed togetContentGraph
(see howContentRepositoryRegistry::subgraphForNode
handles it internally)Review instructions
Followups: https://github.com/neos/neos-development-collection/issues/5038 Neos Ui adjustments: https://github.com/neos/neos-ui/pull/3775