CMR-11155: Version Control Index Set - Part 1#2455
Conversation
| (println "cmr.metadata-db.migrations.092-update-cmr-sub-notifications-table up...") | ||
| (h/sql "ALTER TABLE METADATA_DB.CMR_SUB_NOTIFICATIONS DROP COLUMN AWS_ARN") | ||
| (h/sql "ALTER TABLE METADATA_DB.CMR_SUBSCRIPTIONS ADD AWS_ARN VARCHAR(2048) NULL")) | ||
| (when (h/column-exists? "CMR_SUB_NOTIFICATIONS" "AWS_ARN") |
There was a problem hiding this comment.
had to add this because my local had a wrong version of AWS_ARN and had to be replaced. This is helpful to any other dev with local db issues. This will not have adverse affects since the logic still remains the same
There was a problem hiding this comment.
We should be running migrate db when someone changes database structures, that way all of our databases will be up to date. I forget to do this sometimes. Or did you migrate and it didn't work?
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2455 +/- ##
==========================================
- Coverage 58.20% 58.13% -0.07%
==========================================
Files 1069 1070 +1
Lines 74278 74385 +107
Branches 2166 2164 -2
==========================================
+ Hits 43233 43247 +14
- Misses 29028 29116 +88
- Partials 2017 2022 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| [taoensso.carmine :as carmine])) | ||
|
|
||
| (use-fixtures :once test-util/embedded-redis-server-fixture) | ||
| (use-fixtures :each test-util/reset-redis-fixture) |
There was a problem hiding this comment.
to keep consistent test execution. One of the unit tests kept failing the first time and succeeding the second time, which made me realize the caches were not in clean states per test
| @@ -4,6 +4,7 @@ | |||
| [cheshire.core :as json] | |||
There was a problem hiding this comment.
all the following changes are additions and should not affect CMR behavior at all when merged into master
|
I first glance I am wondering why you chose the path to "create" a new concept, instead of just creating a database table with get/set functions for it for the index set - which I thought we already had - maybe I am remembering the redis cache. |
|
In the beginning, it was easier to treat index-set like a concept and borrow the metadata-db funcs to keep revisions, delete old revs, updates/deletes, etc. I wanted to keep all database interactions under the same pattern. Index-set table did not exist prior to this change. |
Overview
What is the objective?
To allow for disaster recovery and keeping track of historical changes of index-set.
What are the changes?
This is PART 1 of 2 PRs to reduce PR size. This PR mainly introduces helper funcs that will be needed for the major changes in PART 2.
What areas of the application does this impact?
Indexer
Required Checklist
Additional Checklist