Skip to content
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

✨ Load instance settings with edge function #848

Merged
merged 19 commits into from
Sep 9, 2024
Merged

Conversation

Koncopd
Copy link
Member

@Koncopd Koncopd commented Sep 6, 2024

@Koncopd Koncopd marked this pull request as draft September 6, 2024 10:17
Copy link

github-actions bot commented Sep 6, 2024

@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 11:27 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 12:09 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 12:23 Inactive
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.56%. Comparing base (ce27649) to head (cbebc2c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lamindb_setup/core/_hub_core.py 84.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #848   +/-   ##
=======================================
  Coverage   83.55%   83.56%           
=======================================
  Files          43       43           
  Lines        3320     3346   +26     
=======================================
+ Hits         2774     2796   +22     
- Misses        546      550    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 12:58 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 13:09 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 13:49 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 15:07 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 6, 2024 16:27 Inactive
@Koncopd Koncopd marked this pull request as ready for review September 8, 2024 09:35
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 10:23 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 11:11 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 11:20 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 12:40 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 12:51 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 13:05 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 14:30 Inactive
@Koncopd
Copy link
Member Author

Koncopd commented Sep 9, 2024

@@ -49,6 +49,7 @@ def system_storage_settings_file():


class InstanceSettingsStore(BaseSettings):
api_url: Optional[str] = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need the schema_id, here, don't we?

For laminr (WP).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@falexwolf
Copy link
Member

This looks great to me!

It'd be nice though if this was starting to go live for the lamin team so that we build confidence in it. We could check for whether a user handle is in sunnyosun, Koncopd, zethson, falexwolf and then call the new connect function instead of the old one. Can you make this change.

Note: For laminr, we'll need to document how to call this edge function from within R. But that's probably for Notion.

@@ -367,6 +367,61 @@ def _connect_instance(
return instance, storage # type: ignore


def _connect_instance_remote(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you call it _connect_instance_new() instead?

And then we'll delete the existing _connect_instance function once we spend 1-2 weeks testing it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@falexwolf falexwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Sergei! 3 small changes, please.

@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 15:28 Inactive
@Koncopd
Copy link
Member Author

Koncopd commented Sep 9, 2024

It'd be nice though if this was starting to go live for the lamin team so that we build confidence in it. We could check for whether a user handle is in sunnyosun, Koncopd, zethson, falexwolf and then call the new connect function instead of the old one. Can you make this change.

This i will add to ln.connect in a new PR when the edge function is deployed.

@falexwolf
Copy link
Member

Ok! Agreed!

@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 15:53 Inactive
@Koncopd Koncopd merged commit e74ec53 into main Sep 9, 2024
11 checks passed
@Koncopd Koncopd deleted the load_instance_edge branch September 9, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants