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

create Feature db record in constructor, not just in check_value() #363

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matt-codecov
Copy link
Contributor

@matt-codecov matt-codecov commented Sep 19, 2024

the Feature record has to be created before you can set overrides, create variants, and set the identifier type. if we make sure that happens in the Feature constructor, then you will be able to configure your feature as soon as it's deployed and not have to wait for check_value() to be called (which you might not actually be ready to do)

@matt-codecov matt-codecov requested a review from a team September 19, 2024 19:14
@matt-codecov matt-codecov marked this pull request as draft September 19, 2024 21:57
@matt-codecov matt-codecov removed the request for review from a team September 19, 2024 21:57
@matt-codecov
Copy link
Contributor Author

making it a draft because the test failures are a pain to resolve

@Swatinem
Copy link
Contributor

I think the problem is that you are not supposed to run queries directly when loading the module.
How about collecting all the features into a global, and then initializing them explicitly with a fn called from main after django and all the DB is initialized?

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