[ARVADOS] created: 210d00c923268ceeb7f551874b0e8d0a51654610
Git user
git at public.curoverse.com
Fri Feb 19 17:46:35 EST 2016
at 210d00c923268ceeb7f551874b0e8d0a51654610 (commit)
commit 210d00c923268ceeb7f551874b0e8d0a51654610
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Feb 19 17:43:21 2016 -0500
8484: Fix fixtures with modified_at=NULL
diff --git a/services/api/test/fixtures/collections.yml b/services/api/test/fixtures/collections.yml
index 556a5c0..b1154a8 100644
--- a/services/api/test/fixtures/collections.yml
+++ b/services/api/test/fixtures/collections.yml
@@ -244,6 +244,7 @@ real_log_collection:
uuid: zzzzz-4zz18-op4e2lbej01tcvu
owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
created_at: 2014-09-01 12:00:00
+ modified_at: 2014-09-01 12:00:00
portable_data_hash: 0b9a7787660e1fce4a93f33e01376ba6+81
manifest_text: ". cdd549ae79fe6640fa3d5c6261d8303c+195 0:195:zzzzz-8i9sb-0vsrcqi7whchuil.log.txt\n"
name: real_log_collection
@@ -278,6 +279,7 @@ collection_owned_by_foo:
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
owner_uuid: zzzzz-tpzed-81hsbo6mk8nl05c
created_at: 2014-02-03T17:22:54Z
+ modified_at: 2014-02-03T17:22:54Z
name: collection_owned_by_foo
collection_to_remove_from_subproject:
@@ -287,6 +289,7 @@ collection_to_remove_from_subproject:
manifest_text: ". 8258b505536a9ab47baa2f4281cb932a+9 0:9:missingno\n"
owner_uuid: zzzzz-j7d0g-axqo7eu9pwvna1x
created_at: 2014-10-15T10:45:00
+ modified_at: 2014-10-15T10:45:00
name: Collection to remove from subproject
collection_with_files_in_subdir:
@@ -307,6 +310,8 @@ graph_test_collection1:
portable_data_hash: fa7aeb5140e2848d39b416daeef4ffc5+45
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: bar_file
+ created_at: 2014-02-03T17:22:54Z
+ modified_at: 2014-02-03T17:22:54Z
graph_test_collection2:
uuid: zzzzz-4zz18-uukreo9rbgwsujx
@@ -314,6 +319,8 @@ graph_test_collection2:
portable_data_hash: 65b17c95fdbc9800fc48acda4e9dcd0b+93
manifest_text: ". 6a4ff0499484c6c79c95cd8c566bd25f+249025 0:249025:FOO_General_Public_License,_version_3.pdf\n"
name: "FOO General Public License, version 3"
+ created_at: 2014-02-03T17:22:54Z
+ modified_at: 2014-02-03T17:22:54Z
graph_test_collection3:
uuid: zzzzz-4zz18-uukreo9rbgwsujj
@@ -321,6 +328,8 @@ graph_test_collection3:
portable_data_hash: ea10d51bcf88862dbcc36eb292017dfd+45
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: "baz file"
+ created_at: 2014-02-03T17:22:54Z
+ modified_at: 2014-02-03T17:22:54Z
collection_1_owned_by_fuse:
uuid: zzzzz-4zz18-ovx05bfzormx3bg
@@ -557,6 +566,7 @@ collection_<%=i%>_of_10:
uuid: zzzzz-4zz18-10gneyn6brkx<%= i.to_s.rjust(3, '0') %>
owner_uuid: zzzzz-j7d0g-0010collections
created_at: <%= i.minute.ago.to_s(:db) %>
+ modified_at: <%= i.minute.ago.to_s(:db) %>
<% end %>
# collections in project_with_201_collections
@@ -568,6 +578,7 @@ collection_<%=i%>_of_201:
uuid: zzzzz-4zz18-201gneyn6brd<%= i.to_s.rjust(3, '0') %>
owner_uuid: zzzzz-j7d0g-0201collections
created_at: <%= i.minute.ago.to_s(:db) %>
+ modified_at: <%= i.minute.ago.to_s(:db) %>
<% end %>
# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper
commit cdad40f38151c5d678f13787853f361566fbcd43
Author: Joshua C. Randall <jcrandall at alum.mit.edu>
Date: Fri Feb 19 22:09:35 2016 +0000
adds missing var collections SdkCollectionList
diff --git a/services/datamanager/collection/collection.go b/services/datamanager/collection/collection.go
index 42e0cc4..7cc3ff7 100644
--- a/services/datamanager/collection/collection.go
+++ b/services/datamanager/collection/collection.go
@@ -228,6 +228,7 @@ func GetCollections(params GetCollectionsParams) (results ReadCollections, err e
}
// Make one final API request to verify that we have processed all collections available up to the latest modification date
+ var collections SdkCollectionList
sdkParams["filters"].([][]string)[0][1] = "<="
sdkParams["limit"] = 0
err = params.Client.List("collections", sdkParams, &collections)
commit 45ee6988e990ec0c808d3a64b7b0c4a5f864a5ec
Author: Joshua C. Randall <jcrandall at alum.mit.edu>
Date: Fri Feb 19 13:42:25 2016 +0000
Modifies sanity check to query for the total expected number of collections
diff --git a/services/datamanager/collection/collection.go b/services/datamanager/collection/collection.go
index 724e3ec..42e0cc4 100644
--- a/services/datamanager/collection/collection.go
+++ b/services/datamanager/collection/collection.go
@@ -227,14 +227,26 @@ func GetCollections(params GetCollectionsParams) (results ReadCollections, err e
}
}
- if totalCollections < initialNumberOfCollectionsAvailable {
- err = fmt.Errorf("Initially there were %d collections available, "+
- "but we only retrieved %d. Refusing to continue as "+
- "this could indicate an otherwise undetected "+
- "failure, though it is also possible that "+
- "collections were deleted by another process "+
- "while datamanager was running.",
- initialNumberOfCollectionsAvailable, totalCollections)
+ // Make one final API request to verify that we have processed all collections available up to the latest modification date
+ sdkParams["filters"].([][]string)[0][1] = "<="
+ sdkParams["limit"] = 0
+ err = params.Client.List("collections", sdkParams, &collections)
+ if err != nil {
+ return
+ }
+ finalNumberOfCollectionsAvailable, err :=
+ util.NumberItemsAvailable(params.Client, "collections")
+ if err != nil {
+ return
+ }
+ if totalCollections < finalNumberOfCollectionsAvailable {
+ err = fmt.Errorf("API server indicates a total of %d collections "+
+ "available up to %v, but we only retrieved %d. "+
+ "Refusing to continue as this could indicate an "+
+ "otherwise undetected failure.",
+ finalNumberOfCollectionsAvailable,
+ sdkParams["filters"].([][]string)[0][2],
+ totalCollections)
return
}
commit 5b63028ebd8fc936cc6d5bcaa7773cc2a745b3f4
Author: Joshua C. Randall <jcrandall at alum.mit.edu>
Date: Thu Feb 18 00:02:06 2016 +0000
Adds sanity check on number of collections retrieved
Changes GetCollections() to return an error if the number
of collections retrieved is less than the initial number
of collections.
diff --git a/services/datamanager/collection/collection.go b/services/datamanager/collection/collection.go
index 1229f29..724e3ec 100644
--- a/services/datamanager/collection/collection.go
+++ b/services/datamanager/collection/collection.go
@@ -227,6 +227,17 @@ func GetCollections(params GetCollectionsParams) (results ReadCollections, err e
}
}
+ if totalCollections < initialNumberOfCollectionsAvailable {
+ err = fmt.Errorf("Initially there were %d collections available, "+
+ "but we only retrieved %d. Refusing to continue as "+
+ "this could indicate an otherwise undetected "+
+ "failure, though it is also possible that "+
+ "collections were deleted by another process "+
+ "while datamanager was running.",
+ initialNumberOfCollectionsAvailable, totalCollections)
+ return
+ }
+
// Write the heap profile for examining memory usage
err = WriteHeapProfile()
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list