-
Notifications
You must be signed in to change notification settings - Fork 4
PR-3242 Refactor EDL calls #296
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
Conversation
7b41a12 to
9b6ebb2
Compare
fb2e5e6 to
82d4657
Compare
82d4657 to
bc42fec
Compare
| # sample json in this case: | ||
| # `{"status_code": 403, "error_description": "EULA Acceptance Failure", | ||
| # "resolution_url": "http://uat.urs.earthdata.nasa.gov/approve_app?client_id=LqWhtVpLmwaD4VqHeoN7ww"}` | ||
| log.warning('user needs to sign the EULA') |
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.
is it bad to log the user name here? It would make searching the logs far easier in something like tea?
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.
In the TEA code the username is added to the log context meaning it will automatically show up when JSON logging is used.
I don't actually know how to get the username here in general. I think it would have to come from the request params somehow, but might not be entirely consistent.
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.
It wouldn't be bad though.
bc42fec to
7898c91
Compare
Refactor urllib request calls to EDL to an EDL client so that each request is handled consistently with regards to the timing code, log calls and error handling.
I tested this by deploying a dev stack of TEA and running a few checks with bearer tokens and browser downloads. asfadmin/thin-egress-app#855