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

fix(edge-migrator): add call to migrate to v2 #4983

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/environments/dynamodb/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from features.models import FeatureState
from features.multivariate.models import MultivariateFeatureStateValue
from projects.models import Project
from projects.tasks import migrate_project_environments_to_v2
from util.queryset import iterator_with_prefetch

from .types import DynamoProjectMetadata, ProjectIdentityMigrationStatus
Expand Down Expand Up @@ -81,4 +82,5 @@ def migrate(self):
)
)
identity_wrapper.write_identities(iterator_with_prefetch(identities))
migrate_project_environments_to_v2(project_id)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will need more work since it won't work unless we set the read capacity budget against the project. We should therefore just write the identity overrides directly to the flagsmith_environments_v2 table but this requires a larger refactor of the logic.

self.project_metadata.finish_identity_migration()
Loading