Skip to content
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

[update:execute] run trailing post updates if there is no updates #3996

Merged
merged 5 commits into from Apr 23, 2019

Conversation

Projects
None yet
2 participants
@lalop
Copy link
Contributor

commented Jan 13, 2019

We can have trailing postUpdates to run or entities update without having any module update.
This pr try to fix that

@lalop

This comment has been minimized.

Copy link
Contributor Author

commented Feb 20, 2019

do you think this can be merged ?

@lalop lalop force-pushed the lalop:fix-upex-postupdate branch from dc62373 to 94cb713 Feb 20, 2019

@@ -41,7 +41,7 @@
"composer/installers": "~1.0",
"doctrine/annotations": "^1.2",
"doctrine/collections": "^1.3",
"drupal/console-core": "1.8.0",

This comment has been minimized.

Copy link
@LOBsTerr

LOBsTerr Apr 6, 2019

Member

Can you revert this changes ? The version should be fixed

This comment has been minimized.

Copy link
@lalop

lalop Apr 7, 2019

Author Contributor

done

if (!$this->getUpdates()) {
$postUpdates = $this->postUpdateRegistry->getPendingUpdateInformation();
if(!empty($postUpdates)) {

This comment has been minimized.

Copy link
@LOBsTerr

LOBsTerr Apr 6, 2019

Member

Space is missing

This comment has been minimized.

Copy link
@lalop

lalop Apr 7, 2019

Author Contributor

fixed

if (!$this->getUpdates()) {
$postUpdates = $this->postUpdateRegistry->getPendingUpdateInformation();

This comment has been minimized.

Copy link
@LOBsTerr

LOBsTerr Apr 6, 2019

Member

It looks like you set maintenance mode, but it will be reverted only when where are $postUpdates. In other case the website will stay in maintenance mode.
Actually, there is better mechanism for maintenance mode in the Console core, it is merged, but it is not tagged yet. I asked to create a new tag.

This comment has been minimized.

Copy link
@LOBsTerr

LOBsTerr Apr 6, 2019

Member

Check the way we will activate maintenance mode

protected function configure()
    {
        $this
            ->setName('update:entities')
            ->setDescription($this->trans('commands.update.entities.description'))
            ->enableMaintenance()
            ->setAliases(['upe']);
    }

This comment has been minimized.

Copy link
@lalop

lalop Apr 7, 2019

Author Contributor

it looks much better with this new helper.
I had updated the code, do you want me to rebase the pr ?

@@ -271,9 +281,8 @@ private function runUpdates(
/**
* @return bool
*/
private function runPostUpdates()
private function runPostUpdates($postUpdates)

This comment has been minimized.

Copy link
@LOBsTerr

LOBsTerr Apr 6, 2019

Member

Based on the comment above, we can keep it as it was

@LOBsTerr

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

@lalop Thank you for your work, no need to rebase. I will merge as soon as we set a new tag on the Drupal console core

@lalop

This comment has been minimized.

Copy link
Contributor Author

commented Apr 17, 2019

@LOBsTerr do you have any idea of when does drupal console core will be tagged ?

@LOBsTerr LOBsTerr merged commit 7f914f7 into hechoendrupal:master Apr 23, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@LOBsTerr

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

I have merged it will be tagged soon.

@LOBsTerr LOBsTerr added this to the 1.9.0 milestone Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.