From e909f32fff6c50978bc939736b4aa2f6913e459c Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Thu, 4 May 2023 15:50:14 +0200 Subject: [PATCH 1/3] Add missing fields to HistorySummary schema model --- lib/galaxy/schema/schema.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/schema/schema.py b/lib/galaxy/schema/schema.py index cc76441d07f..b15f770bf4b 100644 --- a/lib/galaxy/schema/schema.py +++ b/lib/galaxy/schema/schema.py @@ -975,6 +975,12 @@ class HistorySummary(HistoryBase): ) annotation: Optional[str] = AnnotationField tags: TagCollection + update_time: datetime = UpdateTimeField + preferred_object_store_id: Optional[str] = Field( + None, + title="Preferred Object Store ID", + description="The ID of the object store that should be used to store new datasets in this history.", + ) class HistoryActiveContentCounts(Model): @@ -1016,7 +1022,6 @@ class HistoryDetailed(HistorySummary): # Equivalent to 'dev-detailed' view, whi description="The encoded ID of the user that owns this History.", ) create_time: datetime = CreateTimeField - update_time: datetime = UpdateTimeField importable: bool = Field( ..., title="Importable", From 92b94ae0bbed15682a226fdfad2f8959c7eade88 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Thu, 4 May 2023 15:51:37 +0200 Subject: [PATCH 2/3] Remove redundant fields from serialization They are already included in the summary view. --- lib/galaxy/managers/histories.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/galaxy/managers/histories.py b/lib/galaxy/managers/histories.py index bd66f59367a..b1e7b52ec6c 100644 --- a/lib/galaxy/managers/histories.py +++ b/lib/galaxy/managers/histories.py @@ -572,7 +572,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri "size", "user_id", "create_time", - "update_time", "importable", "slug", "username", @@ -583,7 +582,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri "state_details", "state_ids", "hid_counter", - "preferred_object_store_id", # 'community_rating', # 'user_rating', ], @@ -599,7 +597,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri "size", "user_id", "create_time", - "update_time", "importable", "slug", "username_and_slug", @@ -607,7 +604,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri # 'contents_states', "contents_active", "hid_counter", - "preferred_object_store_id", ], include_keys_from="summary", ) From c4a9530bcbba386064b50387fbfb711f98251045 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Thu, 4 May 2023 15:53:45 +0200 Subject: [PATCH 3/3] Update client API schema --- client/src/schema/schema.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/src/schema/schema.ts b/client/src/schema/schema.ts index e5f4be6666e..bdc9e0f06e2 100644 --- a/client/src/schema/schema.ts +++ b/client/src/schema/schema.ts @@ -4492,6 +4492,11 @@ export interface components { * @description The name of the history. */ name: string; + /** + * Preferred Object Store ID + * @description The ID of the object store that should be used to store new datasets in this history. + */ + preferred_object_store_id?: string; /** * Published * @description Whether this resource is currently publicly available to all users. @@ -4594,6 +4599,11 @@ export interface components { * @description The name of the history. */ name: string; + /** + * Preferred Object Store ID + * @description The ID of the object store that should be used to store new datasets in this history. + */ + preferred_object_store_id?: string; /** * Published * @description Whether this resource is currently publicly available to all users. @@ -4605,6 +4615,12 @@ export interface components { */ purged: boolean; tags: components["schemas"]["TagCollection"]; + /** + * Update Time + * Format: date-time + * @description The last time and date this item was updated. + */ + update_time: string; /** * URL * @deprecated