-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix db error reporting #1
base: master
Are you sure you want to change the base?
Conversation
@@ -137,7 +137,7 @@ async def get_artifacts_by_task(self, request): | |||
) |
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.
self._async_table.get_artifact_in_task(...)
returns a DBResponse
with .body
attribute of type string and a .response_code
of 500, indicating an error. The string-type body is set in db_utils.aiopg_exception_handling
.
ArtifactsApi._filter_artifacts_by_attempt_id(...)
expects artifacts.body
to be a list, which is what get_artifact_in_task
returns when no error has occurred (and fetch_single==False
, which is the case in get_artifact_in_task
). In the event of no error, .response_code == 200
.
If this works for us, will we create the same pull request for the main project? |
Yeah, I think that's the plan. Tim has fixed the underlying problem that caused an error to be raised in the first place, so I think that fix and this will go into a single PR for Netflix's repo. Tim's fix changed the db schema slightly (adding an index appropriate for the SFN runs), so he said he would need to define a migration as well. |
Sorry I thought I approved this with my earlier comment. |
Oops, this was on the backburner. I'm just going to put in a PR with metaflow-service. Thanks for reviewing it. |
Here is the PR: Netflix#93 |
From what I can tell, this will fix the obfuscation of the error message contained in the
DBResponse.body
.Some context, from Tim:
I'm trying to take a look at the artifacts associated with one of our SFN executions but when trying to call:
We run into the following error:
Looking at the logs from our metadata service, I see the following error:
From what I can tell, this can only occur when the result of this call: https://github.com/Netflix/metaflow-service/blob/b656d42cfb946b5ec64ef15b4f5e86a1505a4e90/services/data/postgres_async_db.py#L112-L156 returns a
DBResponse
object with a body of type string. And it looks like this would only happen in the case of error handling. Unfortunately it looks like the underlying error message is obfuscated by this error.