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
Mccalluc/user files sorting #1950
Conversation
… Instead of trapping and just logging, we will exit with a more helpful error
Codecov Report
@@ Coverage Diff @@
## develop #1950 +/- ##
===========================================
- Coverage 42.78% 42.77% -0.02%
===========================================
Files 414 415 +1
Lines 26988 27015 +27
Branches 1321 1322 +1
===========================================
+ Hits 11548 11556 +8
- Misses 15440 15459 +19
Continue to review full report at Codecov.
|
refinery/data_set_manager/utils.py
Outdated
)) | ||
except KeyError: | ||
raise RuntimeError( | ||
'Not expected response structure: %s', response_obj |
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.
.format()
refinery/data_set_manager/utils.py
Outdated
response_obj = json.loads(full_response.content) | ||
except ValueError: | ||
raise RuntimeError( | ||
'Expected JSON from SOLR, not: %s', full_response.content |
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.
.format()
function UserFileBrowserFilesCtrl ( | ||
$log, | ||
$q, | ||
uiGridConstants, |
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.
Don't need uiGridConstants
anymore
@@ -160,7 +160,7 @@ | |||
.expectGET( | |||
settings.appRoot + | |||
settings.refineryApiV2 + | |||
'/user/files/?fq=&limit=100' | |||
'/user/files/?fq=&limit=100&sort=' |
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.
Test for appropriate structure after sort=
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.
actually, now that I look at it, that is already being done with fakeResponse
.
@scottx611x : Comments addressed. Travis failure on the push build isn't something I've seen before, but I don't think it's related to anything in the PR. Ok to merge? |
@mccalluc Hmm thats an odd one, looks like an Issue with that CI build itself. I've just restarted it, lets see it pass first just as a sanity check. |
There are still bugs in the sorting, but this is a start. (For example, other columns seem to work, but not "filename"?)
Changes to utils.py not required in this PR, but they are part of the general idea of failing fast and giving enough information to debug the problem.
Trying to reproduce the test failure locally...