Problem/Motivation
Reported by @cilefen.
> [notice] Update started: editoria11y_update_9012
> [error] 'view' entity with ID 'ed11y_action' already exists.
> [error] Update failed: editoria11y_update_9012
There is a potential `drush updb` vs `drush ci` order of operations problem, because the 2->3 update hook assumes it will see 2.x config. Updating local, committing that config, then running updb on prod confuses the update hook, whereas updating in production and then running config-import tries to restore un-updated config.
This only affects certain tooling workflows.
Fix will be to modify update hook 9012 to detect intermediate states and disambiguate, and to document the process.
Comments
Comment #2
itmaybejj commentedComment #4
itmaybejj commentedComment #5
ryan-l-robinson commentedI am also encountering this issue
Comment #6
itmaybejj commentedIf you're up for testing the dev branch, I'd love to know if it solves the problem.
I'm planning to do some more testing on the staged code and then tag a release this week.
Comment #7
ryan-l-robinson commentedI turned your commit into a branch and deployed it to a dev server. I am still getting a "Table 'ed11y_page' already exists." except now it is related to hook 9010 instead of 9012.
Comment #8
itmaybejj commentedThe
table? Now that's unexpected.Is this dev server plain v2 or did it previously have the failed update applied?
Comment #10
itmaybejj commentedThat commit should handle situations where a failed migration needs to re-run (drops and regenerates
ed11y_pagetable if it is in the DB when 9010 runs).Comment #11
ryan-l-robinson commentedLatest version deployed to dev for me without any other visible errors. I attached it as a patch in case that is helpful to anybody else.
My scenario included copying back my production database, which is on editoria11y v2, to dev first, so that I could replicate what it would be like when it goes out to production. Then the CI/CD deployment process deploys the updated code, then config-import, then updb.
Comment #14
itmaybejj commentedOK I tagged 3.0.4 with the fixes.
Contact me if you want a year of CSA for helping test.