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

Migration aborted! Reason: Migration '20161012151407_xyz_content_type.yml' can not be ended as it is not executing #78

Closed
phalasz opened this issue Oct 14, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@phalasz
Copy link
Contributor

phalasz commented Oct 14, 2016

Not sure what is causing this, but sometimes a migration file fails with the error mentioned in the title.

I'm using v2.1.0 of the bundle.

@phalasz
Copy link
Contributor Author

phalasz commented Oct 14, 2016

A bit more information. It looks like it is trying to end the migration for a second time. Since it has already ended and has the correct end status it will fail.

The .yml definition had two instructions in there. One to create a folder and one to add the new content type.

Processing 20161012151407_xyz_content_type.yml
string(69) "Starting migration 20161012151407_xyz_content_type.yml"
string(85) "Migration started and added to DB. 20161012151407_xyz_content_type.yml"
string(67) "Ending Migration 20161012151407_xyz_content_type.yml"
array(6) {
  ["migration"]=>
  string(50) "20161012151407_xyz_content_type.yml"
  ["path"]=>
  string(87) "/app/src/AppBundle/MigrationVersions/20161012151407_xyz_content_type.yml"
  ["md5"]=>
  string(32) "4d1030968df48927ca35a1998a4cdd2a"
  ["execution_date"]=>
  string(10) "1476439712"
  ["status"]=>
  string(1) "1"
  ["execution_error"]=>
  NULL
}
string(67) "Migration ended. 20161012151407_xyz_content_type.yml"
string(67) "Ending Migration 20161012151407_xyz_content_type.yml"
array(6) {
  ["migration"]=>
  string(50) "20161012151407_xyz_content_type.yml"
  ["path"]=>
  string(87) "/app/src/AppBundle/MigrationVersions/20161012151407_xyz_content_type.yml"
  ["md5"]=>
  string(32) "4d1030968df48927ca35a1998a4cdd2a"
  ["execution_date"]=>
  string(10) "1476439712"
  ["status"]=>
  string(1) "2"
  ["execution_error"]=>
  NULL
}

Migration aborted! Reason: Migration '20161012151407_xyz_content_type.yml' can not be ended as it is not executing

@phalasz
Copy link
Contributor Author

phalasz commented Oct 14, 2016

On some further investigation in my case there was an exception thrown, that was caught by https://github.com/kaliop-uk/ezmigrationbundle/blob/stable-2.x/Core/MigrationService.php#L226 and the subsequent call to endMigration which should set the migration to failed status will fail as the migration is already set to done.

The problem here is that the user executing is anonymous instead of a user with enough privileges to eZ's modules/functions.

@gggeek gggeek added the bug label Oct 14, 2016
@gggeek gggeek added this to the 2.4 milestone Oct 15, 2016
@gggeek gggeek self-assigned this Oct 15, 2016
@gggeek
Copy link
Member

gggeek commented Oct 16, 2016

Fixed in 2.4 & 3.0beta2

@gggeek gggeek closed this as completed Oct 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants