-
Notifications
You must be signed in to change notification settings - Fork 203
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
EZP-30729: Added a possibility to exclude Content Types when running CleanupVersionsCommand #2691
Conversation
…g versions of User ContentType
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.
Issues:
I don't really follow the change of how verbosity behaves from the default way (see the diff comments), for me it would be rather unexpected.- I'm having trouble running it with the default value of
--keep
. AFAICS neitheroptions.default_version_archive_limit
nordefault_version_archive_limit
is mapped to dynamic settings configuration. It's just a repository option (there's RepositoryConfigurationProvider AFAIR for that). But maybe I'm missing something? I tried to run it w/o any parameters and got:
[eZ\Publish\Core\MVC\Exception\ParameterNotFoundException]
Parameter 'options.default_version_archive_limit' with namespace '' could not be found.
I see an issue with processing the new parameter (see the diff comments).
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
In That said, including and excluding content types seems like a very good improvement on the command regardlessly. So comment above is only about setting user as default as opposed to better understanding what goes wrong on version deletion of users (users have extra tables, maybe that is part of the issue here, ...). |
I still have a question about:
Is it just me? :) |
Unfortunately, not only you. I'm looking into that 😉 |
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php
Outdated
Show resolved
Hide resolved
Co-Authored-By: André R. <andre.romcke@gmail.com>
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.
QA Approved on eZ Platform v1.7.9.
Testing other versions will be possible after merge / second PR is rebased.
@kmadejski could you merge up? |
6.7
/6.13
/7.5
/master
This PR adds a possibility to exclude particular ContentTypes of which versions should not be removed. This option always includes content objects of default
User
ContentType (ID:4
, unfortunately, there is noconst
anywhere to use it instead of hardcoding it).Moreover, I've added a ProgressBar which indicates the progress. In some cases, it takes some time to clean up a huge number of versions so the user might have a wrong impression that nothing is going on.
A second PR, introducing the usage of
$status
inContentService::loadVersions
method (introduced in: #2652) will be done soon, against7.5
only.TODO:
$ composer fix-cs
).