NAL-i5K / tripal_eutils

ncbi loader via the eutils interface
GNU General Public License v3.0
4 stars 3 forks source link

Undeclared dependency: Module requires Chado 1.3 #210

Closed mpoelchau closed 5 years ago

mpoelchau commented 5 years ago

I got a couple of warnings when enabling the module:

drush pm-enable tripal_eutils -y
The following extensions will be enabled: tripal_eutils
Do you really want to continue? (y/n): y
Invalid argument supplied for foreach() sbo__relationship.inc:224                                                                                                        [warning]
array_key_exists() expects parameter 2 to be array, null given sio__annotation.inc:136                                                                                   [warning]
array_key_exists() expects parameter 2 to be array, null given sio__annotation.inc:147                                                                                   [warning]
array_key_exists() expects parameter 2 to be array, null given sio__annotation.inc:158                                                                                   [warning]
tripal_eutils was enabled successfully.                                                                                                                                  [ok]
tripal_eutils defines the following permissions: access tripal_eutils admin

Then I tried to use it to see whether or not I could ignore those warnings. Imported GCA_001412515.2 (assembly). Got this:

drush trp-run-jobs --username=siteadmin --root=/app/tripal3/drupal7

2019-03-18 15:29:48
Tripal Job Launcher
Running as user 'siteadmin'
-------------------
2019-03-18 15:29:48: There are 4 jobs queued.
2019-03-18 15:29:48: Job ID 546.
2019-03-18 15:29:48: Calling: tripal_tripal_cron_notification()
2019-03-18 15:30:04: Job ID 547.
2019-03-18 15:30:04: Calling: tripal_expire_collections()
2019-03-18 15:30:04: Job ID 548.
2019-03-18 15:30:04: Calling: tripal_expire_files()
2019-03-18 15:30:04: Job ID 549.
2019-03-18 15:30:04: Calling: tripal_run_importer(2)

Running 'NCBI EUtils Accession loader' importer
NOTE: Loading of file is performed using a database transaction. 
If it fails or is terminated prematurely then all insertions and 
updates are rolled back and will not be found in the database

INFO (TRIPAL_EUTILS): Inserting record into Chado: assembly: 2338241
Inserting record into Chado: assembly: 2338241
WARNING (TRIPAL_CHADO): chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_CHADO] chado_insert_record; There is no table description for analysis_dbxref
WARNING (TRIPAL_CHADO): chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_CHADO] chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_API] Failed to insert the analysis_dbxref record 8716328
WARNING (TRIPAL_CHADO): chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_CHADO] chado_insert_record; There is no table description for analysis_dbxref
WARNING (TRIPAL_CHADO): chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_CHADO] chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_API] Failed to insert the analysis_dbxref record GCA_001412515.2
WARNING (TRIPAL_CHADO): chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_CHADO] chado_insert_record; There is no table description for analysis_dbxref
WARNING (TRIPAL_CHADO): chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_CHADO] chado_insert_record; There is no table description for analysis_dbxref
[site http://default] [TRIPAL WARNING] [TRIPAL_API] Failed to insert the analysis_dbxref record LDKA02
INFO (TRIPAL_EUTILS): Inserting record into Chado: NCBI Taxon (organism): 454923
Inserting record into Chado: NCBI Taxon (organism): 454923
Object of class TripalJob could not be converted to string tripal.notice.api.inc:135                                                                                     [error]
E_RECOVERABLE_ERROR encountered; aborting. To ignore recoverable errors, run again with --no-halt-on-error                                                               [error]
Drush command terminated abnormally due to an unrecoverable error.                                                                                                       [error]
PHP Notice:  A non well formed numeric value encountered in phar:///app/local/bin/drush/includes/drush.inc on line 1661
PHP Fatal error:  Uncaught PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block in /app/tripal3/drupal7/includes/database/database.inc:2227
Stack trace:
#0 /app/tripal3/drupal7/includes/database/database.inc(2227): PDOStatement->execute(Array)
#1 /app/tripal3/drupal7/includes/database/pgsql/database.inc(111): DatabaseStatementBase->execute(Array, Array)
#2 /app/tripal3/drupal7/includes/database/database.inc(2406): DatabaseConnection_pgsql->query('SELECT expire, ...', Array, Array)
#3 /app/tripal3/drupal7/includes/lock.inc(167): db_query('SELECT expire, ...', Array)
#4 /app/tripal3/drupal7/includes/lock.inc(146): lock_may_be_available('schema:runtime:...')
#5 /app/tripal3/drupal7/includes/bootstrap.inc(438): lock_acquire('schema:runtime:...')
#6 /app/tripal3/drupal7/includes/bootstrap.inc(460): DrupalCacheArray->set(Array)
#7 [internal function]: DrupalCacheArray->__destruct()
#8 {main}
  thrown in /app/tripal3/drupal7/includes/database/database.inc on line 2227

Tried to publish analysis records. Job ran and published 9 analyses (more than I thought). They look weird:

analysis-problem

I then attempted to publish the organism record, which failed:

$ drush trp-run-jobs --username=siteadmin --root=/app/tripal3/drupal7
2019-03-18 15:30:57
Tripal Job Launcher
Running as user 'siteadmin'
-------------------
2019-03-18 15:30:57: There are 1 jobs queued.
2019-03-18 15:30:57: Job ID 550.
2019-03-18 15:30:57: Calling: chado_publish_records(Array)
INFO (PUBLISH_RECORDS): There are 0 records to publish.
There are 0 records to publish.
INFO (PUBLISH_RECORDS): Successfully published 0 Organism record(s).
Successfully published 0 Organism record(s).
[mpoelchau@gmod-dev /app/tripal3/drupal7/sites/all/modules/contrib]$ 
bradfordcondon commented 5 years ago

The warnings on install are tripal core (sbo__relationship etc)

The problem is your database doesn't have analysis_dbxref. This table is part of Chado 1.3 so i wouldnt think to install... makes me wonder what other tables in chado 1.3 your install might be missing?

That said the many, very weird analyses.... thats bizarre. I would think when the exception was thrown trying to insert the analysis_dbxref, the creation would stop and the transaction would roll back...

mpoelchau commented 5 years ago

afaik we have Chado1.2 and not 1.3 installed. Can we upgrade?

bradfordcondon commented 5 years ago

:| this was a big process for us on HWG. We were missing lots of 1.2 tables so the upgrade didnt go smoothly. maybe you all will be luckier?

/admin/tripal/storage/chado/install

Screen Shot 2019-03-18 at 2 47 54 PM

yep: we're going to have install errors.

[TRIPAL ERROR] [TRIPAL_CHADO] FAILED. Line  1853, 0SQLSTATE[42809]: Wrong object type: 7 ERROR:  "all_feature_names" is not a viewHINT:  Use DROP TABLE to remove a table.:DROP VIEW IF EXISTS all_feature_names CASCADE;

Let me dig up my solution to the issue for HWG

bradfordcondon commented 5 years ago

@mpoelchau im going to repurpose this issue to be "Module should state it requires Chado 1.3 or greater". Let's continue discussion on upgrading in I5K general repo.

bradfordcondon commented 5 years ago

i've added this to the documentation and guided i5k's upgrade process. Closing.