ncbo / bioportal-project

Serves to consolidate (in Zenhub) all public issues in BioPortal
BSD 2-Clause "Simplified" License
7 stars 5 forks source link

AG: error when processing ontology - Goo::Base::NotValidException: Object is not valid. #255

Open alexskr opened 1 year ago

alexskr commented 1 year ago

getting Goo::Base::NotValidException: Object is not validerror processing QUDT, GSSO, MADS-RDF, FYPO, MF, ISO19115MI,E COCORE, LCTGM, ONTODRC ontologies. The ontology load process completes despite the error, and ontology seems to work okay.

E, [2022-08-25T16:16:39.066082 #17976] ERROR -- : Failed, exception: Goo::Base::NotValidException: Object is not valid. Check errors.
/srv/ncbo/ncbo_cron/vendor/bundle/ruby/2.7.0/bundler/gems/goo-fd7d45cb862c/lib/goo/base/resource.rb:333:in `save'
/srv/ncbo/ncbo_cron/vendor/bundle/ruby/2.7.0/bundler/gems/ontologies_linked_data-8196bf34b45c/lib/ontologies_linked_data/models/base.rb:13:in `save'
/srv/ncbo/ncbo_cron/vendor/bundle/ruby/2.7.0/bundler/gems/ontologies_linked_data-8196bf34b45c/lib/ontologies_linked_data/models/ontology_submission.rb:1110:in `process_submission'
/srv/ncbo/ncbo_cron/lib/ncbo_cron/ontology_submission_parser.rb:210:in `block in archive_old_submissions'
/srv/ncbo/ncbo_cron/lib/ncbo_cron/ontology_submission_parser.rb:207:in `each'
/srv/ncbo/ncbo_cron/lib/ncbo_cron/ontology_submission_parser.rb:207:in `archive_old_submissions'
/srv/ncbo/ncbo_cron/lib/ncbo_cron/ontology_submission_parser.rb:181:in `process_submission'
bin/ncbo_ontology_process:98:in `block in <main>'
bin/ncbo_ontology_process:81:in `each'
bin/ncbo_ontology_process:81:in `<main>'
mdorf commented 1 year ago

For the ontologies QUDT, GSSO, MADS-RDF, MF, the error reported is that the released date isn't set in the previous submissions that are due to be archived; therefore, the ontology submission object being archived is reported as being invalid.

/srv/ncbo/ncbo_cron/lib/ncbo_cron/ontology_submission_parser.rb:210:in `block in archive_old_submissions'
[1] pry(#<LinkedData::Models::OntologySubmission>)> self.valid?
=> false
[2] pry(#<LinkedData::Models::OntologySubmission>)> self.errors
=> {:released=>{:existence=>"`released` value cannot be nil"}}
mdorf commented 1 year ago

Focusing on GSSO, I've checked the previous submissions at random and found that none of them are missing the released date except for submission 69. It would be difficult to determine why that property wasn't set in that specific submission. I set it manually, and the error went away for GSSO ontology.