Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow create_project to rerun safely #453

Closed
woop opened this issue Feb 2, 2020 · 3 comments · Fixed by #596
Closed

Allow create_project to rerun safely #453

woop opened this issue Feb 2, 2020 · 3 comments · Fixed by #596
Labels
area/core good first issue Good for newcomers kind/feature New feature or request
Milestone

Comments

@woop
Copy link
Member

woop commented Feb 2, 2020

Is your feature request related to a problem? Please describe.
Having the create_project method on the Feast Client fail when a project exists is important, but its also a pain in development. It means one part of the code in a notebook should be skipped every time.

Describe the solution you'd like
It would be convenient to be able to run create_project multiple times without having the second call throw an exception.

Something like

client.create_project("my-project", skip_if_exists=True)

Describe alternatives you've considered
Alternatively we can use set_project and only create the project lazily when its needed.

@woop woop added area/core good first issue Good for newcomers kind/feature New feature or request labels Feb 2, 2020
@woop
Copy link
Member Author

woop commented Feb 2, 2020

On second thought, it might be better to use the alternative suggested above. So we could encourage users to almost always just use set_project. When they apply resources or run commands it will create the project if it doesnt exist. If it does exist it will try to use it.

@Joostrothweiler
Copy link
Contributor

@woop I would be happy to pick this up as a first issue.

I could change the signature to:
def set_project(self, project: str, create_if_not_exists : bool = True):

Would you say the preferred default value of create_if_not_exists is True or False in this case?

@woop woop added this to the v0.5.0 milestone Mar 10, 2020
@woop
Copy link
Member Author

woop commented Mar 10, 2020

@woop I would be happy to pick this up as a first issue.

I could change the signature to:
def set_project(self, project: str, create_if_not_exists : bool = True):

Would you say the preferred default value of create_if_not_exists is True or False in this case?

It would be awesome if you could pick this up @Joostrothweiler!

My thoughts on this topic have evolved a little bit. Here is what I am thinking

  • Projects should be invisible to the user if they don't want to use it. Meaning they should not have to create a project nor set a project.
  • If a user interacts with Feast without supplying a project, they are automatically assumed to be in a default project. I'd like to propose default for this project name, following the lead of Kubernetes having a default namespace.

For the purposes of this specific issue, I think the scope is a little bit more limited.

  • Set project should configure the local project, but not setting the project should keep the project string set to default
  • If a user creates a resource and a project does not exist, then the project should automatically be created for them. So it should run the creation in the background.

Hope that makes sense :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/core good first issue Good for newcomers kind/feature New feature or request
Projects
None yet
2 participants