From f840d1ccb09b15fd2653df21c89fb5aee6896f55 Mon Sep 17 00:00:00 2001 From: Jeremy Nicklas Date: Wed, 16 Aug 2017 09:25:57 -0400 Subject: [PATCH] remove temp osc bc dataroot patch Fixes #200 --- .gitignore | 1 - CHANGELOG.md | 3 + bin/setup | 9 --- .../fix_batch_connect_dataroot.rb.osc | 66 ------------------- 4 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 config/initializers/fix_batch_connect_dataroot.rb.osc diff --git a/.gitignore b/.gitignore index 2441ab73..db904a1b 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,6 @@ tags /public/assets .env.local /config/initializers/ood.rb -/config/initializers/fix_batch_connect_dataroot.rb # Ignore staged app /vendor/my_app diff --git a/CHANGELOG.md b/CHANGELOG.md index 4acf2a77..696a717b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Removed the ability to build a Rails app from a template as it copies from an outdated template. [#215](https://github.com/OSC/ood-dashboard/issues/215) +- (Batch Connect) Removed temporary OSC patch that migrated Batch Connect app + data to a namespaced data root. + [#200](https://github.com/OSC/ood-dashboard/issues/200) ## [1.15.2] - 2017-07-24 diff --git a/bin/setup b/bin/setup index d3228e2b..5e5b3ebf 100755 --- a/bin/setup +++ b/bin/setup @@ -108,15 +108,6 @@ chdir APP_ROOT do source_file = "config/initializers/ood.rb.#{APP.site}.#{APP.portal}" cat source_file, target_file end - - # config/initializers/fix_batch_connect_dataroot.rb - target_file = "config/initializers/fix_batch_connect_dataroot.rb" - if APP.site == "" # user wants to unset site settings - rm_f target_file - else - source_file = "config/initializers/fix_batch_connect_dataroot.rb.#{APP.site}" - cat source_file, target_file - end end if APP.production? diff --git a/config/initializers/fix_batch_connect_dataroot.rb.osc b/config/initializers/fix_batch_connect_dataroot.rb.osc deleted file mode 100644 index 017461da..00000000 --- a/config/initializers/fix_batch_connect_dataroot.rb.osc +++ /dev/null @@ -1,66 +0,0 @@ -# FIXME: Remove me and my references in `bin/setup` and `.gitignore` after all -# users' jobs have finished from before the migration. -# -# Do not forget to manually delete -# `config/initializers/fix_batch_connect_dataroot.rb` at each deployment. -# - -module FixBatchConnectDataroot - def self.fix - db_root = OodAppkit.dataroot.join("db") - dev_root = OodAppkit.dataroot.join("dev") - usr_root = OodAppkit.dataroot.join("usr") - sys_root = OodAppkit.dataroot.join("sys") - - dataroot = OodAppkit.dataroot.join("batch_connect") - new_db_root = dataroot.join("db") - new_dev_root = dataroot.join("dev") - new_usr_root = dataroot.join("usr") - new_sys_root = dataroot.join("sys") - - has_jobs = db_root.children.select(&:file?).any? if db_root.exist? - - # Create new dataroot - dataroot.mkpath unless dataroot.exist? - - if has_jobs - # Move over old db root if not symlink - if db_root.exist? && !db_root.symlink? - db_root.rename new_db_root - db_root.make_symlink new_db_root - end - - # Move over old dev root if not symlink - if dev_root.exist? && !dev_root.symlink? - dev_root.rename new_dev_root - dev_root.make_symlink new_dev_root - end - - # Move over old usr root if not symlink - if usr_root.exist? && !usr_root.symlink? - usr_root.rename new_usr_root - usr_root.make_symlink new_usr_root - end - - # Move over old sys root if not symlink - if sys_root.exist? && !sys_root.symlink? - sys_root.rename new_sys_root - sys_root.make_symlink new_sys_root - end - else - # Remove old db root - db_root.rmtree if db_root.exist? - - # Remove old dev root - dev_root.rmtree if dev_root.exist? - - # Remove old usr root - usr_root.rmtree if usr_root.exist? - - # Remove old sys root - sys_root.rmtree if sys_root.exist? - end - end -end - -FixBatchConnectDataroot.fix