History log of /ontohub/lib/ontology_saver.rb
Revision Date Author Comments Expand
2007ce65c0947e10e337f55f7168590e4f7f6365 14-Aug-2016 Eugen Kuksa <kuksa.eugen@gmail.com>

1779 git push into a repository doesnt start jobs (#1782) * Push the job into the right redis-list. * Fix error "unknown key: :user" at GitRepository#commits.

97669a2ab79fef55a04bd6f0e51267e5119ddab7 08-Aug-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

1753 wait for sql to finish before parsing worker retry (#1761) * Remove callback for parsing a version on create. * Handle do_not_parse flag properly * Remove the sleep command. * Refactor: Put state change into a method. * Fix specs. * Only assign the distributed logic once. * Only clone asynchronously after the transaction completed. * Fix specs that clone a repository. * Remove do_not_parse flag and replace it by a do_parse flag where needed. * Obey Hound as much as possible. * Fix parsing ontologies in the seeds.

81da36894af70bbb8d8e24b004026ad4c5c1bc99 19-Jul-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

1592 committer not shown in versions (#1704) * Supply pushing user. * Code style. * Remove already executed data migration task. * Improve Commit model, add associations to User model. * Get rid of ambiguous class/module names. * Replace OntologyVersion#user by #pusher. * Display pusher information in OntologyVersions index. * Fix all the tests. * Add new tests. * Obey Hound. * Fix migration. * Add data migration for missing commits. * Add data migrations. * Shorten up method. * Remove unnecessary comment.

/ontohub/app/controllers/ontologies_controller.rb /ontohub/app/helpers/ontology_version_helper.rb /ontohub/app/models/commit.rb /ontohub/app/models/ontology/versions.rb /ontohub/app/models/ontology_version.rb /ontohub/app/models/ontology_version/files.rb /ontohub/app/models/ontology_version/parsing.rb /ontohub/app/models/repository/git.rb /ontohub/app/models/user.rb /ontohub/app/views/home/_versions.html.haml /ontohub/app/views/ontologies/_ontology.html.haml /ontohub/app/views/ontology_versions/_ontology_version.html.haml /ontohub/db/data/20160614065104_create_missing_commits.rb /ontohub/db/data/20160614065106_fill_empty_commits.rb /ontohub/db/migrate/20160614065105_add_association_from_commit_to_user.rb git_repository.rb git_repository/committing.rb git_repository/get_commit.rb hets/dg/node_evaluation_helper.rb hets/dg/node_evaluator.rb migration_with_data.rb ontology_saver.rb ontology_version_options.rb proof_execution.rb repository_update_worker.rb tasks/migrate_data.rake /ontohub/spec/controllers/users_controller_spec.rb /ontohub/spec/factories/commit_factory.rb /ontohub/spec/factories/ontology_factory.rb /ontohub/spec/factories/ontology_version_factory.rb /ontohub/spec/models/commit_spec.rb /ontohub/spec/models/ontology_spec.rb /ontohub/spec/models/ontology_version_spec.rb /ontohub/spec/models/repository/git_spec.rb /ontohub/spec/models/repository/save_and_delete_file_spec.rb /ontohub/spec/models/user_spec.rb
e8ec59dda8f903e81cb5cceaef93d20a0812fc77 01-Jul-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

982 error this iri is already being processed (#1697) * Add expiration parameter to Semaphore After the expiration, the semaphore is unlocked. This allows dead processes (e.g. by kill -9) to release the lock again. * Namespace the redis semaphore at ontohub:semaphore. * Code style. * Code style: use class << self block. * Add concurrency testing gem. * Completely revamp Semaphore * Put it into the same redis-namespace as sidekiq. * Add method to check if a lock is closed. * Namespace semaphores even deeper. Checking if a lock is closed is not an atomic operation. To make it atomic, we put the check into a mutexed part. In order to really exclude the locking and unlocking from this mutexed check, these two operations must be mutexed as well with the same key (LOCK_ACTION_KEY). Unfortunately, using many threads/processes in an example makes the test suite hang. This is because of celluloid. Maybe we can unskip the example after upgrading to sidekiq 4 and dropping sidetiq. * Add settings keys for Redis. * Use redis namespace setting for Semaphore. * Share redis connections between Sidekiq and Semaphore When all connections are in use, any Redis call will block until a connection is freed. Sidekiq is now namespaced deeper in order to prevent conflicts with the semaphore. * Fix locked? and perform_exclusively signatures. * Add lock and unlock methods. * Use separate redis namespaces for our environments. * Use Semaphore only if not testing * Use Semaphore when parsing an Ontology * Remove not needed method perform_async_on_queue. * Refactor all the Worker classes for parsing Now, all comes down to the new OntologyParsingWorker. It performs on a queue of triples containing the version id, options for the version and the try_count (number of the next parsing attempt). If parsing a version fails, it is put back to the queue (at the end), with an incremented try_count. If this happens too often for the same version, it is given to the SequentialOntologyParsingWorker that only parses one OntologyVersion at a time. The OntologyParsingPriorityWorker is a more elegant way to use the priotitized queue. All the background parsing is now performed via the OntologyParsingWorker or its subclasses. * Be explicit about the namespace. * Obey Hound.

/ontohub/Gemfile /ontohub/Gemfile.lock /ontohub/app/models/hets_instance.rb /ontohub/app/models/ontology_version/parsing.rb /ontohub/app/models/sine_axiom_selection.rb /ontohub/config/initializers/redis_pool.rb /ontohub/config/initializers/sidekiq.rb /ontohub/config/settings.yml /ontohub/config/settings/development.yml /ontohub/config/settings/test.yml base_worker.rb hets/concurrent_evaluator.rb hets/dg/importer.rb hets/dg/node_evaluator.rb hets_instance_force_free_worker.rb ontology_batch_parse_worker.rb ontology_parsing_priority_worker.rb ontology_parsing_worker.rb ontology_saver.rb proof_evaluation_state_updater.rb proof_execution_worker.rb repository_update_worker.rb semaphore.rb sequential_ontology_batch_parse_worker.rb sequential_ontology_parsing_worker.rb sequential_worker.rb settings_validation_wrapper.rb tasks/data.rake worker.rb /ontohub/spec/lib/access_token_deletion_worker_spec.rb /ontohub/spec/lib/ontology_batch_parse_worker_spec.rb /ontohub/spec/lib/repository/git_repository_spec.rb /ontohub/spec/lib/semaphore_spec.rb /ontohub/spec/lib/worker_spec.rb /ontohub/spec/models/repository/git_spec.rb
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13a 01-Jul-2016 Sascha Graef <sgraef@informatik.uni-bremen.de>

Improve locId (#1618) * introduce new model to ontohub * introduce new locid behavior * adding try to prevent undefined method for nil * generate the locids by object creation * introduce method to simulate an attribute * generate Locids correctly for ontologies * correct creation of child_ontology locids * remove old uniqueness validation for ontology locid * use better names vor locidportion * correct behaviour for locid creation * generate loc_id correctly for ontology * use correct class for inherritanc * remove locids on deletion of objects * rename the base model * introduce data-migration to move the locids * remove double naming in the cat ontology * obey hound * correct behaviour of external repository for locid * change factory behaviour for locid * fix missing comma * begin to fix test * change ontology factory to new locid * change factories for new LocId Model * remove unneeded test * Use proper class retrieval in factories. * Always use to_s on the class call in LocIdBaseModel. * Always use .class.to_s instead of .class when used for the database. * Fix external repository. * Be clean and unstub again. * Fix sentence factory. * Quick fix the destruction of locids. * Fix code style. * Generate locids during create process: Base class. * Generate locids during create process: Mapping. * Generate locids during create process: Sentence. * Generate locids during create process: Symbol. * Generate locids during create process: ProofAttempt. * Generate locids during create process: ProverOutput. * Generate locids during create process: Ontology #1. * Generate locids during create process: Ontology #2. * Generate locids during create process: Ontology #3. * Generate locids during create process: Factories. * Fix seeds errors. * Fix ontology spec on error while parsing The ontology needs to be reloaded because sidekiq does so as well. It always fetches a fresh record from the database. The test failed before because `NodeEvaluationHelper#clean_ontology` called destroy on all the ontology's symbols which existed in the object, but were not really persisted because of an aborted transaction. * Remove redundant space. * Move comment to the correct line. * Fix worker_spec In the production code, the locid is never set before saving the ontology. * Add gems pry-stack_explorer, awesome_print for debugging purposes. * Only start hets if there was a hets error and rollback the changes. * Destroy dependent prover output. * Fix ProofAttempt factory. * Rename assorted_object to specific and fix migration. * Fix migration code style. * Reanalyze ontologies with duplicate locids. * Fix code style. * Remove redundancies. * Remove useless association. * Obey Hound. * Directly query in the LocIdBaseModel. * Add locid routing feature. * Cache LocId query results This should speed up the routing in a great extent. For each matching `specified_get`, the LocIdRouterConstraint fetched the element once from the database. This resulted in 8 times the same SQL query for a ProofAttempt. The implemented cache reduces this to a single query. * Clear the elements cache periodically to prevent memory leaks. * Add missing dependent: :destroy. * Add Recreating repository feature. * Combine if statements. * Change Given to When. * Catch ambiguous locid error. * Fix i18n key usage. * Fix code style. * Comment on error suppression. * Add spec for Syntax Error. * Use single-quoted strings. * Fix error message check: language. * Keep parameter assignment DRY. * Rename RecreatingRepository feature to Repository. * Use local_variable_get instead of eval. * Change locid column type to text. * Implement (implicit) down-migration. * Implement (explicit) down migration. * Add migration to create missing locids. * Fix nil error. * Really fix nil error. * Fix migration. * Fix sentence migration accessing association. * Force old Mappings to have a name. * Add missing locids to symbols.

/ontohub/Gemfile /ontohub/Gemfile.lock /ontohub/app/models/loc_id.rb /ontohub/app/models/loc_id_base_model.rb /ontohub/app/models/mapping.rb /ontohub/app/models/ontology.rb /ontohub/app/models/ontology/associations_and_attributes.rb /ontohub/app/models/ontology/class_methods_and_scopes.rb /ontohub/app/models/ontology/mappings.rb /ontohub/app/models/ontology/sentences.rb /ontohub/app/models/ontology/symbols.rb /ontohub/app/models/ontology/validations.rb /ontohub/app/models/ontology_member/symbol.rb /ontohub/app/models/proof_attempt.rb /ontohub/app/models/prover_output.rb /ontohub/app/models/sentence.rb /ontohub/config/locales/en.yml /ontohub/db/data/20160310132620_move_loc_id_to_own_model_data.rb /ontohub/db/migrate/20160110133824_create_loc_ids.rb /ontohub/db/migrate/20160310132618_enter_name_for_mappings.rb /ontohub/db/migrate/20160310132619_create_missing_locids.rb /ontohub/db/migrate/20160310132620_move_loc_id_to_own_model.rb /ontohub/db/seeds/040-git.rb /ontohub/features/LocId.feature /ontohub/features/LocIdRouting.feature /ontohub/features/Repository.feature /ontohub/features/step_definitions/loc_id_routing_steps.rb /ontohub/features/step_definitions/loc_id_steps.rb /ontohub/features/step_definitions/repository_steps.rb /ontohub/features/support/env.rb external_repository.rb hets/dg/node_evaluation_helper.rb hets/dg/node_evaluator.rb hets/errors.rb ontology_saver.rb permissionable.rb router_constraints.rb /ontohub/spec/controllers/api/v1/proof_attempts_controller_spec.rb /ontohub/spec/controllers/api/v1/prover_outputs_controller_spec.rb /ontohub/spec/factories/axiom_factory.rb /ontohub/spec/factories/mapping_factory.rb /ontohub/spec/factories/mapping_version_factory.rb /ontohub/spec/factories/ontology_factory.rb /ontohub/spec/factories/proof_attempt_factory.rb /ontohub/spec/factories/sentence_factory.rb /ontohub/spec/factories/symbol_factory.rb /ontohub/spec/factories/theorem_factory.rb /ontohub/spec/fixtures/ontologies/casl/sentence_and_symbol_with_same_name.casl /ontohub/spec/hets_helper.rb /ontohub/spec/lib/ontology_batch_parse_worker_spec.rb /ontohub/spec/lib/worker_spec.rb /ontohub/spec/models/ontology_spec.rb /ontohub/spec/models/ontology_version/parsing_spec.rb /ontohub/spec/support/common_helper_methods.rb /ontohub/spec/support/fixtures_generation/pipeline_generator.rb
89a44b1ca5aa6007b102831cc4a4e306fd32507b 11-Jan-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

Handle files that need to be parsed with the current one.

aeee7f45fea603773fa9aa176ca54683af4c08bc 11-Jan-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

Determine the files that import the current one.

cb08b6bacfcb9c0de6d66222071adbefba898097 11-Jan-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

Add method to check if a version was already parsed in the commit.

006de713cc0c62dc3dd8549f4d74c00e8b822dd2 11-Jan-2016 Eugen Kuksa <eugenk@informatik.uni-bremen.de>

Move ontology saving code into separate service class.