tentwentyfour / remaim

Redmine to Maniphest migration utility
MIT License
8 stars 2 forks source link

Constraint "fulltext" is not a valid constraint for this query. #27

Closed d1rewolf closed 6 years ago

d1rewolf commented 6 years ago

Trying to import into the latest Phabricator, we get:

Arrrgh… we're really sorry but something went a little haywire here.
Use the following information to help us fix it? Pretty please?

Exception message: ERR-CONDUIT-CORE: Constraint "fulltext" is not a valid constraint for this query.
Exception trace:
#0 /opt/phabricator/libphutil/src/future/FutureProxy.php(58): ConduitFuture->didReceiveResult(Array)
#1 /opt/phabricator/libphutil/src/future/FutureProxy.php(35): FutureProxy->getResult()
#2 /opt/phabricator/libphutil/src/conduit/ConduitClient.php(64): FutureProxy->resolve()
#3 /home/user/remaim/src/Traits/Phabricator.php(288): ConduitClient->callMethodSynchronous('maniphest.searc...', Array)
#4 /home/user/remaim/src/Wizard.php(505): Ttf\Remaim\Wizard->findExistingTask(Array, 'PHID-PROJ-4y52a...', false)
#5 /home/user/remaim/src/Wizard.php(449): Ttf\Remaim\Wizard->createManiphestTask(Array, false, 'PHID-PROJ-4y52a...', Array, false, NULL)
#6 [internal function]: Ttf\Remaim\Wizard->Ttf\Remaim\{closure}(Array)
#7 /home/user/remaim/src/Wizard.php(453): array_map(Object(Closure), Array)
#8 /home/user/remaim/src/Wizard.php(144): Ttf\Remaim\Wizard->migrateIssues(Array, Array, Array, false)
#9 /home/user/remaim/bin/remaim(102): Ttf\Remaim\Wizard->run(false)
#10 {main}

Any ideas?

d1rewolf commented 6 years ago

It appears that "fulltext" has changed in the API. Changing it to "query" in src/Traits/Phabricator.php gets us a little further, but gives this error:

PHP Warning:  Illegal string offset 'custom_fields' in /home/user/remaim/vendor/kbsali/redmine-api/lib/Redmine/Api/CustomField.php on line 46
PHP Warning:  Invalid argument supplied for foreach() in /home/user/remaim/vendor/kbsali/redmine-api/lib/Redmine/Api/CustomField.php on line 46
PHP Warning:  Illegal string offset 'custom_fields' in /home/user/remaim/vendor/kbsali/redmine-api/lib/Redmine/Api/CustomField.php on line 46
PHP Warning:  Invalid argument supplied for foreach() in /home/user/remaim/vendor/kbsali/redmine-api/lib/Redmine/Api/CustomField.php on line 46
PHP Warning:  Illegal string offset 'custom_fields' in /home/user/remaim/vendor/kbsali/redmine-api/lib/Redmine/Api/CustomField.php on line 46
PHP Warning:  Invalid argument supplied for foreach() in /home/user/remaim/vendor/kbsali/redmine-api/lib/Redmine/Api/CustomField.php on line 46
Arrrgh… we're really sorry but something went a little haywire here.
Use the following information to help us fix it? Pretty please?

Exception message: ERR-CONDUIT-CORE: Exception when processing transaction of type "view": Error while reading "value": Expected string, got something else.
Exception trace:
#0 /opt/phabricator/libphutil/src/future/FutureProxy.php(58): ConduitFuture->didReceiveResult(Array)
#1 /opt/phabricator/libphutil/src/future/FutureProxy.php(35): FutureProxy->getResult()
#2 /opt/phabricator/libphutil/src/conduit/ConduitClient.php(64): FutureProxy->resolve()
#3 /home/user/remaim/src/Traits/Phabricator.php(255): ConduitClient->callMethodSynchronous('maniphest.edit', Array)
#4 /home/user/remaim/src/Wizard.php(532): Ttf\Remaim\Wizard->createOrUpdatePhabTicket(Array, Array)
#5 /home/user/remaim/src/Wizard.php(449): Ttf\Remaim\Wizard->createManiphestTask(Array, false, 'PHID-PROJ-4y52a...', Array, false, NULL)
#6 [internal function]: Ttf\Remaim\Wizard->Ttf\Remaim\{closure}(Array)
#7 /home/user/remaim/src/Wizard.php(453): array_map(Object(Closure), Array)
#8 /home/user/remaim/src/Wizard.php(144): Ttf\Remaim\Wizard->migrateIssues(Array, Array, Array, false)
#9 /home/user/remaim/bin/remaim(102): Ttf\Remaim\Wizard->run(false)
#10 {main}
d1rewolf commented 6 years ago

Ok, so I'm hacking through this, and I'll document my progress here. After updating remain.yml to use words instead of codes in priority_map, I'm able to import some tasks. However, I eventually get

Exception message: ERR-CONDUIT-CORE: Query timed out after 30 second(s)!
Exception trace:
#0 /opt/phabricator/libphutil/src/future/FutureProxy.php(58): ConduitFuture->didReceiveResult(Array)
#1 /opt/phabricator/libphutil/src/future/FutureProxy.php(35): FutureProxy->getResult()
#2 /opt/phabricator/libphutil/src/conduit/ConduitClient.php(64): FutureProxy->resolve()
#3 /home/user/remaim/src/Traits/Phabricator.php(288): ConduitClient->callMethodSynchronous('maniphest.searc...', Array)
#4 /home/user/remaim/src/Wizard.php(505): Ttf\Remaim\Wizard->findExistingTask(Array, 'PHID-PROJ-4y52a...', false)
#5 /home/user/remaim/src/Wizard.php(449): Ttf\Remaim\Wizard->createManiphestTask(Array, false, 'PHID-PROJ-4y52a...', Array, false, NULL)
#6 [internal function]: Ttf\Remaim\Wizard->Ttf\Remaim\{closure}(Array)
#7 /home/user/remaim/src/Wizard.php(453): array_map(Object(Closure), Array)
#8 /home/user/remaim/src/Wizard.php(144): Ttf\Remaim\Wizard->migrateIssues(Array, Array, Array, false)
#9 /home/user/remaim/bin/remaim(102): Ttf\Remaim\Wizard->run(false)
#10 {main}
d1rewolf commented 6 years ago

After manually extending the timeout by editing /opt/phabricator/phabricator/src/infrastructure/cluster/PhabricatorDatabaseRef.php and restarting phd...we're getting further.

kwisatz commented 6 years ago

Hi John.

I'm sorry I can't help you with this right now, I'm out sick today. I'll try to look into it as soon as I'm feeling better. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

d1rewolf commented 6 years ago

@kwisatz Very sorry to hear you're feeling ill. I have gotten it working for the most part after tweaking the timeout. Tracking changes on my fork here: https://github.com/jbwiv/remaim

When I'm confident enough, I'll generate a pull request. In the meantime, I'll close this, since it's not tracking a singular issue.