Skip to content

Commit

Permalink
Fixed the order of runsList in experiment tracking (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidakanchwala authored Jan 11, 2022
1 parent 104ce9b commit 56a3fa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ Please follow the established format:

## Bug fixes and other changes

- Fix the order of the runs list in experiment tracking. (#691)
- Bug fix for plotly JSONDataSet icon (#684)


# Release 4.2.0

## Major features and improvements
Expand Down
2 changes: 1 addition & 1 deletion package/kedro_viz/api/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_all_runs() -> List[Run]:
session = data_access_manager.db_session
if not session:
return runs
for run_data in session.query(RunModel).all():
for run_data in session.query(RunModel).order_by(RunModel.id.desc()).all():
run = format_run(run_data.id, json.loads(run_data.blob))
runs.append(run)
return runs
Expand Down
2 changes: 1 addition & 1 deletion package/tests/test_api/test_graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ def test_graphql_run_list_endpoint(
assert response.json() == {
"data": {
"runsList": [
{"id": save_version, "bookmark": False},
{"id": save_new_version, "bookmark": False},
{"id": save_version, "bookmark": False},
]
}
}
Expand Down

0 comments on commit 56a3fa1

Please sign in to comment.