-
-
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
!!! FEATURE: Improve escr cli commands #4864
Conversation
1865dd5
to
73e43d0
Compare
* @param string $contentRepository Identifier of the Content Repository instance to operate on | ||
* @param bool $quiet If set only fatal errors are rendered to the output | ||
*/ | ||
public function resetAllCommand(string $contentRepository = 'default', bool $quiet = false): void |
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.
maybe for people not reading the comments it might be misleading to have cr:prune
and cr:resetAll
in the same namespace.
Maybe we should add the Projection
suffix?
cr:resetAllProjections
cr:replayAllProjections
cr:replayProjection
or we add another command controller:
projection:resetAll
projection:replayAll
projection:replay
?
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 agree here. Actually I struggle to understand what reset
really means. What does it do? Why and when should someone use this command?
TBH I would have expected a better description in the PR for that as it will get into the changelog.
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.
Yes this pr is not to be merged as is :)
my proposed new command will reset all the projections. This is implicit the first step of replayAll.
The reasoning to include is are: that we have a command to prune everything cr:prune
and as the cr api allows to throw away all projections (like a cache flush) we should also allow this.
That command will most likely only be used when cr:setup
fails because there is data in the projections. Basically for a super clean setup. Which hopefully is never need in 9.0 stable but was for example for #4791.
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.
Then we probably should include this change in some way and update the PR description of #4791 afterwards 😉. As of now the description is misleading.
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.
the real hopefully not that present usecase past 9.0 would be cr:setup --reset-projections
.
Maybe that would be the way to go?
But i also prefer those commands:
cr:resetAllProjections
cr:replayAllProjections
cr:replayProjection
instead of the implicit cr:replayAll
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.
cr:projectionReplayAll
cr:projectionReplay
prefer cr:setup --reset-projections
over cr:projectionResetAll
Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php
Outdated
Show resolved
Hide resolved
And i noticed one other thing.
|
e6bd941
to
9b0147b
Compare
and improve code of `cr:prune` by using `resetAllProjections` instead of `replayAll` as this was done before only implicit.
as suggested and discussed by christian
as a relay all will just to that at first, but then there is no event to catch up to. Reset is more obvious that way.
* adds `ContentRepositoryStatus::isOk` for simplicity
9b0147b
to
fc87012
Compare
Resolves: #4772
As discussed in the last weekly the following changes were made.
cr:replayAll
was renamed tocr:projectionReplayAll
cr:replay
was renamed tocr:projectionReplay
cr:projectionReplay
andcr:projectionReplayAll
now both warn before continue and have a--force
flag.cr:prune
has a--force
flag.cr:setup
has a--reset-projections
flag.Additionally
cr:projectionReplayAll
has a simple progress indicator.Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions