-
Notifications
You must be signed in to change notification settings - Fork 9
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
✨ Enable sharing dobjects & instances in the hub #69
Conversation
Codecov Report
@@ Coverage Diff @@
## main #69 +/- ##
===========================================
- Coverage 93.12% 74.10% -19.03%
===========================================
Files 33 29 -4
Lines 524 421 -103
===========================================
- Hits 488 312 -176
- Misses 36 109 +73
Help us with your feedback. Take ten seconds to tell us how you rate us. |
lamindb/do/_push.py
Outdated
from ..admin.db import get_engine | ||
|
||
|
||
def push(dobject_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.
One of the checks that will fail is that you didn't write a docstring! 😅
I don't know why the test isn't picked up by coverage. It all looks correct to me. Some subtle aspect of the coverage setup. |
I created a push function for dobject.
We can either test it directly on the supabase prod workspace or create a proper dev branch that work with the supabase dev workspace.
If we choose to create a dev branch, we just need to specify an other file than
https://lamin-site-assets.s3.amazonaws.com/connector.env
when we create the hub.For the moment I tested it on the prod supabase workspace.
It works only if I create a policy that allow every user to insert into the dobject table, without checking if the lnid belong really to them. Which is not what we want.
We have to discuss about this because it seems that the only way to get a session in order to do
hub.postgrest.auth(session.access_token)
is to do a sign_in.Maybe I'm wrong, but if i not we could create an Auth object that will store session after sing_in, so that we can access it from other part of the project.
EDIT:
I finally understood that it was not a problem at all to do a sign_in, so i implemented the same logic as you to enable row level security.
I also manage to connect directly with the supabase dev, it was easier for me to test that everything appear in the frontend (lamin hub).