-
Notifications
You must be signed in to change notification settings - Fork 364
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
feat: async the logic for cloning feature states into a cloned environment #4005
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Ephemeral Environment
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4005 +/- ##
=======================================
Coverage 96.28% 96.28%
=======================================
Files 1143 1144 +1
Lines 36992 37010 +18
=======================================
+ Hits 35618 35636 +18
Misses 1374 1374 ☔ View full report in Codecov by Sentry. |
Note that this PR is only marked as draft as we need to discuss with the FE team how to implement the 'pending creation' logic. I don't want to review / merge this PR before then as it includes a migration that might need to change. |
# Conflicts: # api/environments/models.py
423d264
to
2a662af
Compare
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
This PR utilises the task processor to handle the cloning of feature states when cloning an environment. This stemmed from work I did to handle the cloning of an environment that is using v2 versioning, however, even the cloning of an environment on the old versioning system is pretty intensive.
This PR also adds a new field
is_creating
to the environment model which can be used by the frontend to determine when an environment has been successfully cloned.Before merging this, we will need to get the FE to use the
is_creating
field to show some indication that the environment is not yet ready for use.Related issue: #4489
How did you test this code?
Since we're enforcing synchronous running of tasks in the test suite, the existing tests on the
Environment.clone
method cover the behaviour. I added an extra assertion to a couple of existing tests for the newis_creating
field that I added to the environment model.