Skip to content

Commit

Permalink
Remove objectstore transient metadata - did not materialize this PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Sep 29, 2020
1 parent ba84321 commit 311ad5e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
28 changes: 0 additions & 28 deletions lib/galaxy/objectstore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,6 @@ def get_concrete_store_description_markdown(self, obj):
be returned for the ConcreteObjectStore corresponding to the object.
"""

@abc.abstractmethod
def is_transient(self, obj):
"""Return boolean indicating if obj should be treated as transient.
To accommodate nested objectstores, obj is passed in so this metadata can
be returned for the ConcreteObjectStore corresponding to the object.
ObjectStores corresponding to data sources that get purged frequently
can mark that here. In the future it would be nice to provide different
icons in the UI for instance based on this or warn people before
publishing pages with links to transient datasets for instance, this
should provide a piece of the puzzle for doing that in the future.
"""

@abc.abstractmethod
def get_store_usage_percent(self):
"""Return the percentage indicating how full the store is."""
Expand Down Expand Up @@ -328,9 +314,6 @@ def get_concrete_store_name(self, obj):
def get_concrete_store_description_markdown(self, obj):
return self._invoke('get_concrete_store_description_markdown', obj)

def is_transient(self, obj):
return self._invoke('is_transient', obj)

def get_store_usage_percent(self):
return self._invoke('get_store_usage_percent')

Expand Down Expand Up @@ -364,14 +347,12 @@ def __init__(self, config, config_dict=None, **kwargs):
self.store_by = config_dict.get("store_by", None) or getattr(config, "object_store_store_by", "id")
self.name = config_dict.get("name", None)
self.description = config_dict.get("description", None)
self.transient = config_dict.get("transient", False)

def to_dict(self):
rval = super().to_dict()
rval["store_by"] = self.store_by
rval["name"] = self.name
rval["description"] = self.description
rval["transient"] = self.transient
return rval

def _get_concrete_store_name(self, obj):
Expand All @@ -380,9 +361,6 @@ def _get_concrete_store_name(self, obj):
def _get_concrete_store_description_markdown(self, obj):
return self.description

def _is_transient(self, obj):
return self.transient

def _get_store_by(self, obj):
return self.store_by

Expand Down Expand Up @@ -432,9 +410,6 @@ def parse_xml(clazz, config_xml):
store_by = config_xml.attrib.get('store_by', None)
if store_by is not None:
config_dict['store_by'] = store_by
transient = config_xml.attrib.get('transient', None)
if transient is not None:
config_dict['transient'] = asbool(transient)
name = config_xml.attrib.get('name', None)
if name is not None:
config_dict['name'] = name
Expand Down Expand Up @@ -727,9 +702,6 @@ def _get_concrete_store_name(self, obj):
def _get_concrete_store_description_markdown(self, obj):
return self._call_method('_get_concrete_store_description_markdown', obj, None, True)

def _is_transient(self, obj):
return self._call_method('_is_transient', obj, None, True)

def _get_store_by(self, obj):
return self._call_method('_get_store_by', obj, None, False)

Expand Down
2 changes: 0 additions & 2 deletions lib/galaxy/webapps/galaxy/api/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def show_storage(self, trans, dataset_id, hda_ldda='hda', **kwd):
object_store_id = dataset.object_store_id
name = object_store.get_concrete_store_name(dataset)
description = object_store.get_concrete_store_description_markdown(dataset)
transient = object_store.is_transient(dataset)
# not really working (existing problem)
try:
percent_used = object_store.get_store_usage_percent()
Expand All @@ -181,7 +180,6 @@ def show_storage(self, trans, dataset_id, hda_ldda='hda', **kwd):
'object_store_id': object_store_id,
'name': name,
'description': description,
'transient': transient,
'percent_used': percent_used,
}

Expand Down

0 comments on commit 311ad5e

Please sign in to comment.