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

Feat/GitHub 677/identity migration #728

Merged
merged 18 commits into from
Feb 8, 2022

Conversation

gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Feb 2, 2022

Add support for migrating the identity data to dynamo db using the following two ways:

  1. With a Django admin command: python manage.py migrate_to_edge <project_id>
  2. Using a button on sales dashboard

UI:
image

Also implements: #726

Deployment Notes: Create a dynamodb table with id(Number) as partition key and use it's name for PROJECT_METADATA_TABLE_NAME_DYNAMO Env vairable.

@gagantrivedi gagantrivedi linked an issue Feb 2, 2022 that may be closed by this pull request
3 tasks
@gagantrivedi gagantrivedi marked this pull request as ready for review February 2, 2022 10:45
@gagantrivedi gagantrivedi force-pushed the feat/github-677/identity-migration branch from 1058e81 to 887b92a Compare February 3, 2022 09:25
from .types import DynamoProjectMetadata


class DynamoProjectMetadataWrapper:
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like the logic in this wrapper can absorbed into the DynamoProjectMetadata dataclass itself? We can use a classmethod to get a given metadata record from dynamo and load it into the dataclass.

@dabeeeenster dabeeeenster linked an issue Feb 7, 2022 that may be closed by this pull request
Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

Some minor changes remaining.

api/sales_dashboard/views.py Outdated Show resolved Hide resolved
@gagantrivedi gagantrivedi merged commit 5529f3f into main Feb 8, 2022
@gagantrivedi gagantrivedi deleted the feat/github-677/identity-migration branch February 8, 2022 12:10
gagantrivedi added a commit that referenced this pull request Feb 11, 2022
 Add command to migrate identity to edge

Add migrate identity to sales dashboard

 tests(command): add test for migrate_to_edge command

* tests(sales-dashboard): Add tests for migrate identity
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.

Sales dashboard DynamoDB migrator tooling Batch copy Identities from Postgres to DynamoDB
2 participants