-
Notifications
You must be signed in to change notification settings - Fork 6
Beanie #424
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
FIXME endpoints return MongoDB `_id` but javascripts expects `id`.
…ed by javascript.
error regarding no database name provided.
# Conflicts: # backend/Pipfile # backend/Pipfile.lock # backend/app/routers/authorization.py # frontend/package-lock.json # frontend/package.json # frontend/src/openapi/v2/services/AuthService.ts # frontend/src/types/data.ts # frontend/src/utils/common.js
longshuicy
left a comment
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.
* import container (#462) * 446 gui to manage api keys (#465) * add new routes placeholder * add list and delete endpoint; inline docs * codegen and pytest * ugly ui? * onstart clear user keys * delete works but pytest doesn't work yet * pytest all works * codegen * redux * reducer and types * write the table * correctly wire in the apikey and error handling * wire in the delete modal of apikeys * wire in the creation api key * everything working in the gui * formatting --------- Co-authored-by: toddn <[email protected]> * Sharing tab cleanup (#430) * fix bug where users not being fetched * simplifying role query pt 1 * refactor tables and API calls * cleanup * start moving GroupAndRole to separate table * add expanding sub table * remove AddGroup buttons for now * formatting * codegen * add response model * codegen * remove container * fix bug with Roles return object and autocomplete on groups * codegen * Fix reload bug (#451) * 461 fix library version in pipfile (#468) * fix pipfile version * regenerate the piplock file * 443 frontend need to display more verbose backend error (#458) * Updated frontend error message to be more verbose * Backend returns verbose logs, frontend displays it as generic messages depending on the HTTP status code * Updated the error message logic to include original backend logs wherever possible * Fixed report button issue * Rootcause: The onClick event for the report button has a semantic error, which is causing the issue reason string to be replaced with an object * Also added encode for the reason * Fixing issue with error message * Revert "Updated frontend error message to be more verbose" This reverts commit 7d230d3. * Fixing issue with error message * 469 create profile page (#471) * profile page exists * new route for user profile profile page includes layout * codegen new route for get current user profile * we now get the profile, but nothing shows yet * page has fake data * we see the profile now * formatting * Implemented role delete in sharing tab (#472) * Tested by deleting a user, group. Verified entry is removed upon refresh * Show Creator on Group Page (#428) * the owner is visible, and we cannot change the owner in the table * showing group creator on top * creator link is wrong, need to fix * bold text for word 'creator' * using more conditionals to reduce duplicate code * missing modal added creator name matches other names --------- Co-authored-by: Chen Wang <[email protected]> * Fixed bug where error detail might be empty (#478) * Fixed bug where error detail might be empty * Added null check to the detail string to prevent errors when detail is not set * Second check to validate the body field * authorization deps * update models * refactoring the metadata route * include in main * mongoout pattern * black * see if this new query pattern works * metadata datasets * finish metadata dataset and metadata file * remove _beanie database * codegen * new pattern of matching id * fix typo * get/post works * more fixes * fix deleting endpoint * fix patch endpoint * fix put metadata * try max's style to minimize merge conflict --------- Co-authored-by: toddn <[email protected]> Co-authored-by: Max Burnette <[email protected]> Co-authored-by: Aruna Parameswaran <[email protected]> Co-authored-by: Todd Nicholson <[email protected]>
* import container (#462) * 446 gui to manage api keys (#465) * add new routes placeholder * add list and delete endpoint; inline docs * codegen and pytest * ugly ui? * onstart clear user keys * delete works but pytest doesn't work yet * pytest all works * codegen * redux * reducer and types * write the table * correctly wire in the apikey and error handling * wire in the delete modal of apikeys * wire in the creation api key * everything working in the gui * formatting --------- Co-authored-by: toddn <[email protected]> * Sharing tab cleanup (#430) * fix bug where users not being fetched * simplifying role query pt 1 * refactor tables and API calls * cleanup * start moving GroupAndRole to separate table * add expanding sub table * remove AddGroup buttons for now * formatting * codegen * add response model * codegen * remove container * fix bug with Roles return object and autocomplete on groups * codegen * Fix reload bug (#451) * 461 fix library version in pipfile (#468) * fix pipfile version * regenerate the piplock file * 443 frontend need to display more verbose backend error (#458) * Updated frontend error message to be more verbose * Backend returns verbose logs, frontend displays it as generic messages depending on the HTTP status code * Updated the error message logic to include original backend logs wherever possible * Fixed report button issue * Rootcause: The onClick event for the report button has a semantic error, which is causing the issue reason string to be replaced with an object * Also added encode for the reason * Fixing issue with error message * Revert "Updated frontend error message to be more verbose" This reverts commit 7d230d3. * Fixing issue with error message * 469 create profile page (#471) * profile page exists * new route for user profile profile page includes layout * codegen new route for get current user profile * we now get the profile, but nothing shows yet * page has fake data * we see the profile now * formatting * Implemented role delete in sharing tab (#472) * Tested by deleting a user, group. Verified entry is removed upon refresh * Show Creator on Group Page (#428) * the owner is visible, and we cannot change the owner in the table * showing group creator on top * creator link is wrong, need to fix * bold text for word 'creator' * using more conditionals to reduce duplicate code * missing modal added creator name matches other names --------- Co-authored-by: Chen Wang <[email protected]> * Fixed bug where error detail might be empty (#478) * Fixed bug where error detail might be empty * Added null check to the detail string to prevent errors when detail is not set * Second check to validate the body field * filter the option without group owner * filter group owner out * Made the updaterole function async, and added a call to fetch roles to refresh the list of roles in state * Updated remove role logic to automatically refresh the roles list * Executed eslint * stub for feeds * add basic Feed support * various updates * introduce listener views * update config model * More updates to metadata models * Update datasets.py * update metadata usage * formatting * replace db["datasets"] * Update metadata.py * ObjectID & response cleanups * syntax fix * author -> creator * formatting * consistent syntax * fix init of listener views --------- Co-authored-by: Chen Wang <[email protected]> Co-authored-by: toddn <[email protected]> Co-authored-by: Aruna Parameswaran <[email protected]> Co-authored-by: Todd Nicholson <[email protected]>
* users fixed to use beanie * methods throw exceptions groups * token uses BaseModel and Document UserDB used in authentication routes * user_out uses dict * checking against Max's branch to avoid conflicts * matching example from Chen on new db get and find * black formatting * rename methods * returning None, not sure why * routes tested for users still working on groups * fixing groups need to use different replace * fix key save * more key deletion * fixing replace * consistent syntax, regex fixes * simplify syntax --------- Co-authored-by: Max Burnette <[email protected]>
* import container (#462) * 446 gui to manage api keys (#465) * add new routes placeholder * add list and delete endpoint; inline docs * codegen and pytest * ugly ui? * onstart clear user keys * delete works but pytest doesn't work yet * pytest all works * codegen * redux * reducer and types * write the table * correctly wire in the apikey and error handling * wire in the delete modal of apikeys * wire in the creation api key * everything working in the gui * formatting --------- Co-authored-by: toddn <[email protected]> * Sharing tab cleanup (#430) * fix bug where users not being fetched * simplifying role query pt 1 * refactor tables and API calls * cleanup * start moving GroupAndRole to separate table * add expanding sub table * remove AddGroup buttons for now * formatting * codegen * add response model * codegen * remove container * fix bug with Roles return object and autocomplete on groups * codegen * Fix reload bug (#451) * 461 fix library version in pipfile (#468) * fix pipfile version * regenerate the piplock file * 443 frontend need to display more verbose backend error (#458) * Updated frontend error message to be more verbose * Backend returns verbose logs, frontend displays it as generic messages depending on the HTTP status code * Updated the error message logic to include original backend logs wherever possible * Fixed report button issue * Rootcause: The onClick event for the report button has a semantic error, which is causing the issue reason string to be replaced with an object * Also added encode for the reason * Fixing issue with error message * Revert "Updated frontend error message to be more verbose" This reverts commit 7d230d3. * Fixing issue with error message * 469 create profile page (#471) * profile page exists * new route for user profile profile page includes layout * codegen new route for get current user profile * we now get the profile, but nothing shows yet * page has fake data * we see the profile now * formatting * Implemented role delete in sharing tab (#472) * Tested by deleting a user, group. Verified entry is removed upon refresh * Show Creator on Group Page (#428) * the owner is visible, and we cannot change the owner in the table * showing group creator on top * creator link is wrong, need to fix * bold text for word 'creator' * using more conditionals to reduce duplicate code * missing modal added creator name matches other names --------- Co-authored-by: Chen Wang <[email protected]> * Fixed bug where error detail might be empty (#478) * Fixed bug where error detail might be empty * Added null check to the detail string to prevent errors when detail is not set * Second check to validate the body field * filter the option without group owner * filter group owner out * Made the updaterole function async, and added a call to fetch roles to refresh the list of roles in state * Updated remove role logic to automatically refresh the roles list * Executed eslint * remove _beanie * wire in folder db * download folder * refactored everything in file/folder * reformat * missed a spot * codegen * forget to add FileVersionDB * add await * fix more merge conflict * duplicate * fix inc * black fromat * codegen * fix inconsistency * black * fix frontend author/creator * fix detail * fix some of the async bug * download works * init & use TokenDB everywhere * fix files/submit endpoint * remove manual index creation * fix extractor submission --------- Co-authored-by: toddn <[email protected]> Co-authored-by: Max Burnette <[email protected]> Co-authored-by: Aruna Parameswaran <[email protected]> Co-authored-by: Todd Nicholson <[email protected]>
* fixing mongomodel * deleting unused mongomodel
* revert id * remove unused import * codegen * fix user token * remove all the mentioning of db * fix more inconsistencies * fix more to_mongo * add error db model * remove all the to mongo * force list of dataset out object to have .dict so id can show correctly * black formatting --------- Co-authored-by: Max Burnette <[email protected]>
* remove PydanticObjectId * begin converting IDs * major updates to db calls, id support * replace Outs with dict returns * add missing awaits
* fix api key and dataset tests * test fixes for extractors * fix job view definitions * minor fixes * fix files, folders, listener tests * fix remaining tests
|
I can't get |
|
Edit medata fails with |
* make heartbeat listener async * update heartbeat listener * update message_listener to async * fix typo * update Dockerfiles * update Dockerfiles
* make heartbeat listener async * update heartbeat listener * update message_listener to async * fix typo * update Dockerfiles * update Dockerfiles * WIP * clean up dockerfiles * remove unused config * revert config to localhost * update RabbitMQ connection info for services * revert localhost IP change for docker
* various metadata fixes * try/except on ES update calls * Fix search, remove console logs * use insert over save * properly await listener insert
backend/app/routers/groups.py
Outdated
| GroupDB.creator == user_id, | ||
| GroupDB.users.user.email == user_id, | ||
| ), | ||
| sort=("created", DESCENDING), |
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.
might also see sort=(-GroupDB.created)




Example of how to use benie to list datasets (using mongo views). There is new objects for
DatasetsDBandAuthorizationDB. Both have been replaced in most places (not all). I left the old code there for comparison but it should be removed before it is merged.I couldn't figure out a way to return
idfrom fastapi instead of_idso for now we replace_idwithidin the javascript after the ajax call. If we decided to adopt benie we could change frontend to use_id.To test migrations you have to provide database flag with
-db. If you put it in the URI it will not work:beanie migrate -uri "mongodb://localhost" -db clowder2 -p app/models/migrationsMigrations are explained here https://beanie-odm.dev/tutorial/migrations/.