From 9c6159bb55bda16663b5f8f16996eb3589f09d47 Mon Sep 17 00:00:00 2001 From: Rob Kooper Date: Thu, 17 Sep 2020 21:24:26 -0500 Subject: [PATCH 1/4] fix status message error --- pyclowder/connectors.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyclowder/connectors.py b/pyclowder/connectors.py index d39e477..776b5d0 100644 --- a/pyclowder/connectors.py +++ b/pyclowder/connectors.py @@ -391,7 +391,7 @@ def _process_message(self, body): self.register_extractor("%s?key=%s" % (url, secret_key)) # tell everybody we are starting to process the file - self.status_update(pyclowder.utils.StatusMessage.start.value, resource, "Started processing.") + self.status_update(pyclowder.utils.StatusMessage.start, resource, "Started processing.") # checks whether to process the file in this message or not # pylint: disable=too-many-nested-blocks @@ -455,7 +455,7 @@ def _process_message(self, body): logger.exception("Error removing temporary dataset directory") else: - self.status_update(pyclowder.utils.StatusMessage.skip.value, resource, "Skipped in check_message") + self.status_update(pyclowder.utils.StatusMessage.skip, resource, "Skipped in check_message") self.message_ok(resource) @@ -534,16 +534,16 @@ def status_update(self, status, resource, message): logging.getLogger(__name__).info("[%s] : %s: %s", resource["id"], status, message) def message_ok(self, resource, message="Done processing."): - self.status_update(pyclowder.utils.StatusMessage.done.value, resource, message) + self.status_update(pyclowder.utils.StatusMessage.done, resource, message) def message_error(self, resource, message="Error processing message."): - self.status_update(pyclowder.utils.StatusMessage.error.value, resource, message) + self.status_update(pyclowder.utils.StatusMessage.error, resource, message) def message_resubmit(self, resource, retry_count, message="Resubmitting message."): - self.status_update(pyclowder.utils.StatusMessage.retry.value, resource, message) + self.status_update(pyclowder.utils.StatusMessage.retry, resource, message) def message_process(self, resource, message): - self.status_update(pyclowder.utils.StatusMessage.processing.value, resource, message) + self.status_update(pyclowder.utils.StatusMessage.processing, resource, message) def get(self, url, params=None, raise_status=True, **kwargs): """ @@ -938,7 +938,7 @@ def status_update(self, status, resource, message): "job_id": self.job_id, "status": "%s: %s" % (status, message), "start": pyclowder.utils.iso8601time(), - "message_type": status, + "message_type": "%s" % status, "message": message }}) From 0764382a123eadd416ac405db2b5a00e5d912eee Mon Sep 17 00:00:00 2001 From: Rob Kooper Date: Fri, 18 Sep 2020 13:51:35 -0500 Subject: [PATCH 2/4] update changelog and version --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfef20f..b0f8c3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 2.3.1 - 2020-09-18 + +### Fixed +- There was an issue where status messages could cause an exception. This would prevent most extractors from running correctly. + ## 2.3.0 - 2020-09-15 +**CRITICAL BUG IN THIS VERSION. PLEASE USE VERSION 2.3.1** + Removed develop branch, all pull requests will need to be against master from now forward. Please update version number in setup.py in each PR. diff --git a/setup.py b/setup.py index 91c17b3..78ea683 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def description(): setup(name='pyclowder', - version='2.3.0', + version='2.3.1', packages=find_packages(), description='Python SDK for the Clowder Data Management System', long_description=description(), From e2538fcf53e87a29d1ad1dc98d377c89e0f3c091 Mon Sep 17 00:00:00 2001 From: Max Burnette Date: Fri, 18 Sep 2020 14:11:46 -0500 Subject: [PATCH 3/4] add enum back to requirements --- requirements.txt | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 27a4ff8..d8bfa5e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +enum34==1.1.6 pika==1.1.0 PyYAML==5.1 requests==2.24.0 diff --git a/setup.py b/setup.py index 78ea683..910338c 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ def description(): keywords=['clowder', 'data management system'], install_requires=[ + 'enum34==1.1.6', 'pika==1.1.0', 'PyYAML==5.1', 'requests==2.24.0', From 8105160619c8ff2f8c9760e74eb4ebc31b3ac6ec Mon Sep 17 00:00:00 2001 From: Rob Kooper Date: Fri, 18 Sep 2020 14:19:50 -0500 Subject: [PATCH 4/4] add message about python 2.7 Probably does not work for python < 3.4 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0f8c3e..82edcff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## 2.3.1 - 2020-09-18 +With this version we no longer gurantee support for versions of python below 3. + ### Fixed - There was an issue where status messages could cause an exception. This would prevent most extractors from running correctly.