# Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ## [1.3.0] - 2020-01-21 ### Changed - dependency on rails has been increased from 4.2 to > 5. - this changed a lot in the test cases, nothing in the actual library. ## [1.2.2] - 2016-07-26 ### Changed - dependency from osc-machete 1.1 to 1.2 which ups the pbs dependency to 2.0 ### Fixed - use latest version of osc-machete gem so `Job#host` exists so after submitting a job we save the host to the database ## [1.2.1] - 2016-07-26 ### Fixed - bug where `results_valid?` might not call results validation method ## [1.2.0] - 2016-06-07 ### Changed - remove `AwesimRails` as a dependency - README and spec changes for rubygems release - `Workflow#staging_target_dir` now accepts `dataroot` path keyword argument - change Rails dependency to allow any minor version of Rails 4 ## [1.1.0] - 2016-03-03 ### Fixed - fix precompiling assets when a database is not available (which almost always happens when you go to share an app) ### Changed - status_label view helper now accepts a second optional argument specifying the tag that wraps the label (defaults to span) - status_label view helper now adds the class `status_label` to the labels for easier customization of the labels ## [1.0.1] - 2016-02-19 ### Fixed - Fix module used so Statusable.update_status_of_all_active_jobs is called on each request ## 1.0.0 - 2016-02-03 This release notes changes from existing files pulled out of osc-machete gem and added features and fixed defects that this gem introduces. ### Fixed - `update_status!` on the `Job` models (models that include `OscMacheteRails::Statusable`) is called at beginning of each request instead of in the `after_find` hook, so you no longer need to preload to trigger the update (a big hangup we had earlier for each new developer) - even if you did preload for the `Job` models, superfluous sql calls were being made for each model - this was eliminated - with the latest version of torque new status values were causing problems with status display on simulations. Introducing the Status value object fixed this problem - proper error handling avoided various odd behavior that resulted if job submission failed ### Added - Rails generators to scaffold a workflow - status_label helper to replace the one previously manually added or generated by Rails application template (this one handles Status values appropriately) - Initialization option: change OscMacheteRails.update_status_of_all_active_jobs_on_each_request to false if you want to disable the update of all active jobs on each request - workflow.rb: before_destroy we stop all of the jobs and if that succeeds we delete the staged directory if "staged_dir" exists on model that has a workflow - statusable.rb: Added Statusable#stop to allow qdel-ing the job. This could be used to implement a stop feature if you wanted to stop a simulation but keep from deleting the files it had created so far. ### Changed workflow.rb (from v0.6.3 of osc-machete to latest osc_machete_rails) - in module OscMacheteRails instead of OSC::Machete::SimpleJob - handle errors when submitting jobs, logging the error and setting it on the model#errors object - if submitting a job fails, we delete the staged directory that was created during submission statusable.rb (from v0.6.3 of osc-machete to latest osc_machete_rails) - in module OscMacheteRails instead of OSC::Machete::SimpleJob - models that include Statutable no longer are updated via after_find hook. instead a new class method "update_status_of_all_active_jobs" is called to call `Statusable#update_status!` on each instance that is in an active state (running, queued, etc.). this is called at the beginning of each request via a before_action hook on the application controller. - update_status! handles PBS::Error's when checking the status, logs an error in the log and then leaves the model untouched - Statusable#status returns OSC::Machete::Status object instead of a character - Statusable#status= can accept a character, nil or an OSC::Machete::Status - Statusable#job= lets you set the attributes of an OSC::Machete::Job object to the Statusable model. Backwards compatibility supports saving the attributes script_name, job_path, and pbsid. New models produced by the generators use a job_cache column that stores a hash, and script, pbsid, and host are saved here instead. - setters `script_name=` and `job_path=` do not exist on models that are generated using the generators (models that have a job_cache column) ### Removed [Unreleased]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.3.0...master [1.3.0]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.2.2...v1.3.0 [1.2.2]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.2.1...v1.2.2 [1.2.1]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.2.0...v1.2.1 [1.2.0]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.0.1...v1.1.0 [1.0.1]: https://github.com/AweSim-OSC/osc_machete_rails/compare/v1.0.0...v1.0.1