-
Notifications
You must be signed in to change notification settings - Fork 84
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 store info display #3913
Fix store info display #3913
Conversation
Co-authored-by: Ashwin Ramaswami <[email protected]>
This reverts commit eeaccd7.
…ets into bundle-store-cli
Looks good except for the |
The schema is defined incorrectly I believe. The error is |
Are you sure that's the error you get? BundleLocationListSchema doesn't have an id field defined (https://github.com/codalab/codalab-worksheets/blob/fix-store-info/codalab/rest/schemas.py#L247-L255) (only BundleStoreSchema does) |
Yes I can confirm that's the error. If you look at the definition of the Schema class the BundleLocationListSchema extends, it requires an id field to be defined. |
Can you try reverting the BundleLocationListSchema(many=True).dump(bundle_locations).data -> json.dump change? I think the json change you did is causing the CI tests to fail. We should maybe get on a call to talk through this further to see what exactly the issue. |
If I revert the json.dumps change then the endpoint wouldn't work and this page will be broken. |
codalab/model/bundle_model.py
Outdated
@@ -3090,6 +3090,7 @@ def get_bundle_locations(self, bundle_uuid: str) -> List[dict]: | |||
rows = connection.execute( | |||
select( | |||
[ | |||
cl_bundle_store.c.id, |
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.
let's revert this file (which I changed in an attempt to fix the json issue)
This reverts commit bf3958e.
Reasons for making this change
Legacy bundles will not have bundle stores so we won't show the store info if API returns empty.
BundleLocationListSchema(many=True).dump
doesn't seem to be working so I'm usingjson.dumps
for now.Related issues
fixes #3910
Screenshots
For an old file upload:
New bundle:
Checklist