Skip to content
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

Update SRAT Catchment API Endpoint #3129

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Jul 24, 2019

Overview

Updates endpoint URL for the SRAT Catchment API, as instructed by Scott Haag.

Also updates the URL and the KEY in deployment configuration in the fileshare and on civicci.

Connects #3128

Demo

image

Notes

Currently the new API is failing with this message:

[2019-07-24 13:37:04,793: ERROR/ForkPoolWorker-1] Task f2aa3aa0-d6be-4014-8359-8b143062f843 run from job 29 raised exception: SRAT Catchment API returned malformed result: u'tploadrate_conc'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 374, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 629, in __protected_call__
    return self.run(*args, **kwargs)
  File "/opt/app/apps/modeling/tasks.py", line 407, in run_srat
    raise Exception('SRAT Catchment API returned malformed result: %s' % e)
Exception: SRAT Catchment API returned malformed result: u'tploadrate_conc'

Because the key that should be tploadrate_conc is reported as tploadate_conc. We are trying to get this fixed on the SRAT end.

This has been fixed in the API and it is now working correctly.

Testing Instructions

  • Check out this branch
  • vagrant ssh in to app and worker and update /etc/mmw.d/env/MMW_SRAT_CATCHMENT_API_URL and /etc/mmw.d/env/MMW_SRAT_CATCHMENT_API_KEY with values from civicci's /var/lib/jenkins/.aws/staging.yml
  • Restart mmw-app and celeryd services
  • Go to :8000/ and select a HUC-10 or HUC-8 boundary
  • Create a MapShed Model with the shape
  • Go to Water Quality tab and view subbasin results
    • Ensure they come through

Checklist

  • All JavaScript tests pass ./scripts/testem.sh

@rajadain rajadain marked this pull request as ready for review August 1, 2019 19:45
@rajadain rajadain added the NSF Funding Source: National Science Foundation label Aug 2, 2019
Copy link
Member

@caseycesari caseycesari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

image

@caseycesari caseycesari assigned rajadain and unassigned caseycesari Aug 5, 2019
@rajadain
Copy link
Member Author

rajadain commented Aug 5, 2019

Thanks for taking a look!

@rajadain rajadain merged commit e28ca64 into develop Aug 5, 2019
@rajadain rajadain deleted the tt/update-srat-endpoint branch August 5, 2019 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NSF Funding Source: National Science Foundation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants