-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAS-2034 - Remove custom retry logic from HOSS in favour of harmony-service-lib. #4
Conversation
@@ -58,6 +58,7 @@ def get_request_shape_file(message: Message, working_dir: str, | |||
raise UnsupportedShapeFileFormat(message.subset.shape.type) | |||
|
|||
shape_file_url = message.subset.shape.process('href') | |||
adapter_logger.info('Downloading request shape file') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I included the path to the shape file, but this is somewhat meaningless as Harmony creates a temporary file, which obfuscates any original user naming convention (the file name is essentially a generated ID).
@lyonthefrog - I couldn't add you to the HOSS reviewers (you may need to tweak your NAMS request to include this repo). But I thought you would want to track this as someone also working on HOSS now. @jgallagher59701 and @ndp-opendap - for your awareness. (I'm getting a little ahead of ticket process here, but wanted to start getting this change propagated out as a quick win to help reduce load on OPeNDAP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. I was able to run the regression test locally without issue. I'll approve, but there is one comment to fix in the tests before you merge.
|
||
|
||
def rgetattr(input_object, requested_attribute, *args): | ||
""" This is a recursive version of the inbuilt `getattr` method, such that | ||
it can be called to retrieve nested attributes. For example: | ||
the Message.subset.shape within the input Harmony message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I saw this yesterday browsing the code.
@@ -92,10 +91,18 @@ def test_download_url(self, mock_util_download): | |||
mock_util_download.side_effect = [self.harmony_500_error, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This subtest name is incorrect now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I updated that test name (and also the doc string for the overall test that mentioned retries would be tested)
Description
This ticket removes custom retry logic for downloading a file from OPeNDAP. The
harmony-service-lib
also has retry logic, as does each step in a Harmony workflow. All three of these retry types currently can lead to 150 attempts to download a file, which is currently causing issues for OPeNDAP with the GHRSST MUR data.Jira Issue ID
DAS-2034.
Local Test Steps
run_notebooks.sh
script). This will also mean settingharmony_host_url = 'http://localhost:3000'
in the notebook. The tests should pass.http://localhost:3000/workflow-ui
endpoint, and the test to check uses the collection concept ID 'C1245618475-EEDTEST' and has three steps in the workflow: query-cmr, harmony-opendap-subsetter and maskfill. The loggin will contain a line similar to:PR Acceptance Checklist
CHANGELOG.md
updated to include high level summary of PR changes.VERSION
updated if publishing a release.Documentation updated (if needed).