Idea #12707
closed[API] Add columns for desired/actual storage classes for each collection
Description
- storage_classes_desired (jsonb, array of strings, default ["default"])
- storage_classes_confirmed (jsonb, array of strings, default [])
- storage_classes_confirmed_at (timestamp, default null)
Don't include any of these columns in the fulltext index.
Updated by Tom Clegg about 7 years ago
- Blocks Feature #11184: [Keep] Support multiple storage classes added
Updated by Tom Clegg about 7 years ago
- Blocks Idea #12708: [keep-balance] Move blocks to satisfy storage_classes_desired added
Updated by Tom Clegg about 7 years ago
- Tracker changed from Feature to Task
- Description updated (diff)
Updated by Tom Clegg about 7 years ago
- Tracker changed from Task to Idea
- Story points set to 1.0
Updated by Tom Morris almost 7 years ago
- Target version changed from To Be Groomed to 2018-02-28 Sprint
Updated by Lucas Di Pentima almost 7 years ago
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima almost 7 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima almost 7 years ago
Updates at a9cc40fb09724af92bff78ef560011b480232b25
Test run: https://ci.curoverse.com/job/developer-run-tests/606/
Ready for review.
Updated by Peter Amstutz almost 7 years ago
For some reason, your structure.sql added "Tablespace" to every comment, what version of Postgres are you using?
(This creates enough noise in the diff I had trouble finding what actually changed)
- -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: - + -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: -; Tablespace:
Rest look good.
Updated by Lucas Di Pentima almost 7 years ago
Fixed the issue by upgrading to PostgreSQL 9.6 (I was running both 9.4 & 9.6 after upgrading to stretch, as suggested by Peter)
Rebased - b0d7f37097e8b5c56bfbfa79a134a8074789ebb4
Test run: https://ci.curoverse.com/job/developer-run-tests/610/
Updated by Peter Amstutz almost 7 years ago
- Is one of these redundant? If not, why not?
add_column :collections, :storage_classes_desired, :jsonb, :default => ["default"] add_column :collections, :storage_classes_confirmed, :jsonb, :default => []
before_validation :default_storage_classes, on: :create def default_storage_classes if self.storage_classes_desired.nil? || self.storage_classes_desired.empty? self.storage_classes_desired = ["default"] end self.storage_classes_confirmed ||= [] end
- I don't think we have used jsonb Array columns before (only Hash columns). Can you investigate which Arvados filters work with jsonb Array columns?
- We should probably validate that the elements of storage_classes_desired and storage_classes_confirmed are only non-empty strings.
Updated by Lucas Di Pentima almost 7 years ago
Updates at 281fe0c40c16aacd82cd1ca122e38aa3a3854f2e
Test run: https://ci.curoverse.com/job/developer-run-tests/619/
- Removed default value setting on the model code.
- Added validation on list element types (strings), with relevant tests.
- Checked that 'exists' filter work on jsonb array by adding some tests.
Pending: Some workbench tests are failing due to storage_classes_desired
being empty, investigating why this happens.
Updated by Lucas Di Pentima almost 7 years ago
Updates at 05ececf63
Test run: https://ci.curoverse.com/job/developer-run-tests/620/
Added back the default value setting code on Collection's model as some workbench tests were failing. The default values on the schema will be useful for database migrations with already existing collections.
Updated by Peter Amstutz almost 7 years ago
Lucas Di Pentima wrote:
Updates at 05ececf63
Test run: https://ci.curoverse.com/job/developer-run-tests/620/Added back the default value setting code on Collection's model as some workbench tests were failing. The default values on the schema will be useful for database migrations with already existing collections.
This LGTM
Updated by Anonymous almost 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|704dd826a498db11a052fe77a4953b0caa245c10.