-
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
91 pydantic v2 #203
91 pydantic v2 #203
Conversation
Updating 91-pydantic-v2 from main
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.
I cloned this branch as well as the associated branch in the hydroserver-sensorthings repo and tested each endpoint manually through the DataManagement web app. Here's all the endpoints that have errors:
Things
Backend throws 404 error trying to remove a secondary owner from site
Backend throws 500 error trying to transfer primary ownership to a secondary owner
When adding a secondary owner from the site details page, the new owner doesn't get populated in the 'current owners' field. Is new owner being returned in the response?
Photos
Create a thing with a photo
Go to site details page
Photo doesn't show & the following error is thrown
GET https://dev.hydroserver2.org/photos/cacecb32-ed60-4824-9091-120774f45f3d/photo_name.png net::ERR_NAME_NOT_RESOLVED
HydroShare Archive
Backend throws a 500 error when trying to create a new resource
Couldn't test the other Archive endpoints since I couldn't create an archive
Datastream
Backend throws a 404 error when trying to delete a datastream
@daniel-slaugh I've fixed the issues related to the Thing ownership endpoints for you to test again. I wasn't able to recreate the Delete Datastream issue, but the error suggests that the test user didn't have permission to delete the resource, or the wrong UUID got passed somehow. Let me know which datastream/user you're testing with. I had to reconnect to HydroShare from my test account, but after doing so archival seems to be working fine on my end. If it's still not working after reconnecting your HydroShare account, send me the logs for that error. Photos can only be downloaded by the frontend if you're using Docker or AWS since api-services doesn't serve the photos directly. You should still be able to verify those endpoints are working if you can see the blank placeholders for the photos on the frontend. The download links, even though they won't work locally without Docker, should have the following pattern: {PROXY_BASE_URL}/photos/{THING_ID}/{PHOTO_ID}.{EXT} |
@kjlippold Adding a secondary owner now updates the screen properly and transferring primary ownership now works, but I still get a 404 when trying to remove a user: API Response Not OK: User with the given email not found. I also dug into why the access control's 'Remove' button for secondary users removing themselves from a site isn't showing and it's because the owner.email is just the user's first name so the check for 'if owner.email === user.email always fails. I disconnected my account from HydroShare but when I tried to reconnect, I was redirected to a screen that said: Deleting a datastream works - I think I probably tried to delete it as a secondary owner. |
@daniel-slaugh The issues related to the email field being incorrect should be fixed now. |
@kjlippold As the primary owner, I can successfully remove a secondary owner or transfer ownership to another user, and now the owner.email returns correctly, but I still get a 404 'Thing not found' error when trying to remove myself as a secondary owner of a site. Steps to reproduce: PATCH http://localhost:8000/api/data/things/0c04fcdc-3876-429e-8260-14b7baca0231/ownership 404 (Not Found) |
@daniel-slaugh This endpoint should be working correctly now, can you please check again? |
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.
Looks good
Updated Pydantic from v1 to v2 and several other minor dependencies.
Updated structure of accounts app to match core app more closely.