-
-
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: High level Neos site import site:importAll
#5307
Conversation
Resolves: #4448
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 decided to remove those low-level services for now.
It is quite easy to create them if needed (and more configurable then) but for Neos we'll need something more "highlevel" anyways
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 know, "context" is not the best pattern, but in this case it really makes sense IMO:
It's a common object that is passed through all processors allowing them a shared access to the (virtual) filesystem and to dispatch "events"
(needs doc comments)
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.
Just a plain (for now) collection object for processors that allows us to pass them around
In #5306 we just moved cr:prune to the CrCommandController into the Neos.Neos->CrCommandController Package that gets deleted here. |
And don't rely on the `ContentRepositoryServiceFactoryInterface`
and centralize common behat features into Trait
Neos.Neos/Classes/Domain/Import/LiveWorkspaceIsEmptyProcessor.php
Outdated
Show resolved
Hide resolved
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.
Looking great already, thanks for taking over. Just a few remarks
Neos.ContentRepository.Export/src/Event/ValueObject/ExportedEvent.php
Outdated
Show resolved
Hide resolved
…d `site:exportAll` to be in line with current behavior
…ll referenced site records
- centralize pathDetermination and closure generationIn site command controller - use catch-up instead of replayall after import - remove workspace name from exported events
Wonder about "Make LegacyMigrationService use high-level import" ... this would make the legacy migration depend on Neos.Neos ... technically there is no non Neos way to get an old Neos CR but it seems not that elegant anyways. |
…te ProjectionCatchUpProcessor and ProjectionReplayProcessor.
…tLegacyData` alongside `cr:migrateLegacyData`
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.
Giving this +.5 already ;) will need to test that again with the Neos ui e2e tests (as they use the export as well) but for now it looks really good. We also have to adjust the flow setup
to guide to these new commands :)
As written here #5307 (comment) im really questioning if migrateLegacyData
should be a one step. We alreay require that people migrate to the Neos.Neos:Site
homepage nodetype and their dimension config either way.
One more - good imo - step in between would just allow more flexibility and "come back later" to work on the migration.
…w_identity_neos_neos_domain_model_domain` Instead, we will now gracefully handle this case: Domain "onedimension.localhost" already exists. Adding it to site "Neos Test Site".
In our case we want to skip the creation of a domain if it exists based on the host name (see c1d64ba) but now we always skip sub domains, if the main domain is created first.
…ta`) replaced with ``` ./flow site:exportLegacyDataCommand --path ./migratedContent ./flow site:importAll --path ./migratedContent ```
previously `primary` was always true if there is only one domain
previously we didnt use the value that was in the export format.
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.
Okay i spend a lotta time testing this extensively now and fixing bugs and edgecases.
I tested doing a exportLegacyData
with my local Neos 8 demo + domain and another site i use for Neos UI tests.
Then i imported that one again into Neos 9 testet the result via ui.
And to make it a full circle i exported that result again via exportAll
and diffed the folders as we expect the same result - which it now finally is.
Following fixed bugs:
- imported sites are not active
- primary domain export was not correct
- having the same domain already was not a noop but crashed due to constraints
- fail early if
--path
is not a directory - respect
copyrightNotice
of serialised assets during import
Now im at the state to say we can merge :D
Thanks a lot for putting so much effort into this one, everybody! |
As per martin from slack
:D lets merge! |
site:importAll
UI tests are now updated. |
Lol i just found an early draft in our git history eaf246c the export thing was now reworked also three times 😅 :D |
Add commands
site:importall
,site:exportall
andsite:pruneall
to import export and prune all sites of the given content repository. This will export events files and sites into a package (Resources/Private/Content) or any other specified target directory.Further changes:
cr:import
,cr:export
andcr:prune
because those did not take the site nodes into account.Todos
site:export
commandsites.json
to exportworkspaceName
andcontentStreamId
fromevents.jsonl
Re-add lowlevel import/export service (to make review easier)I re-added the tests and test-tools for now, I would like to skip the services and cli commands for now (until the rest is "safe")LegacyMigrationService
use high-level import\Neos\ContentRepository\LegacyNodeMigration\NodeDataToEventsProcessor
(now\Neos\ContentRepository\LegacyNodeMigration\Processors\EventExportProcessor
) has to work with workspaceName instead of contentStreamId -> solvedResolves: #4448