tripal / tripal_galaxy

This module is for integration of Tripal and a remote Galaxy Instance.
https://tripal-galaxy.readthedocs.io/en/latest/
GNU General Public License v2.0
2 stars 4 forks source link

Adds 'uid' column to the submission table #131

Closed spficklin closed 5 years ago

spficklin commented 5 years ago

Before we changed the API to support non webform submissions, we were able to lookup the user that had submitted the workflow by examining the node that the webform created. But now that the API supports non webform submissions we need a way to keep track of the user that submitted the workflow.

This PR adds a 'uid' column to the tripal_galaxy_workflow_submission table and adjusts all of the code that previously relied on the node.

To test this PR, you must

  1. Pull this branch
  2. Run the drush updatedb
  3. Check the tripal_galaxy_workflow_submission table to make sure it now has a uid column, is populated with the proper UIDs and is not null
  4. Sumbit a workflow a. Your workflow should submit, the record in the table should have your UID in it. b. You should receive an email that your submission succeeded or failed. (hopefully succeeded).
  5. After the workflow completes you should check it with the drush trp-galaxy-status call and you should get an email on the status if it completed.
  6. Check the Admin > Tripal > Extensions > Galaxy > Usage and make sure the report shows the proper count.
shawnawsu commented 5 years ago

I get this error when attempting to run updatedb

drush updatedb
 Tripal_galaxy  7107  This update adds the uid column to the tripal_galaxy_workflow submission table.
Do you wish to run all pending updates? (y/n): y
Could not update the tripal_galaxy table: SQLSTATE[23502]: Not null violation: 7 ERROR:      [error]
column "uid" contains null values
Performed update: tripal_galaxy_update_7107                                                  [ok]
'all' cache was cleared.                                                                     [success]
Finished performing updates.                                                                 [ok]
spficklin commented 5 years ago

So it looks like you have a workflow that is missing the history information in the errors column. Can you check the table and make sure that's not a left over messup from previous development? In the meantime I'll try to apply a fix.

spficklin commented 5 years ago

Okay, I made a fix that I think will help. If you can try again.