Skip to content

Tombstone pipeline - Add ability to affiliate to multiple accounts for a given migration batch #29457

Closed

Description

@argush3

For early adopters, the migration of businesses have been done in batches. We have also been doing the auth affiliation to the early adopter’s account ids. As the tombstone pipeline only supports affiliating to one account id at a time, if a given batch being migrated has more than one law firm, we migrate each law firm’s businesses in separate runs so we can affiliate to the right account id.

With group 1 involving more law firms and likely more batches, we will want to update tombstone pipeline to support the ability to use multiple account ids. Whatever we come up with will need to tie into the migration tables.

image.png

Tasks

  • Update tombstone pipeline to support affiliate to more than one account id for a given migration batch
  • Update extract ddl as required

Activity

  1. added
    Entities - Data Migration
    on Jul 9, 2025
  2. added theissue type on Jul 9, 2025
  3. argush3 commented on Jul 9, 2025

    @argush3
    ContributorAuthor
  4. self-assigned this
    on Jul 23, 2025
  5. argush3 commented on Aug 25, 2025

    @argush3
    ContributorAuthor

    @vishnup0422 to test this, you'll want to download the latest COLIN extract.

    Please ping me if you have any questions. Note that the delete flow also now works when you USE_MIGRATION_FILTER = True.

    .env values that work for Dev

    ...
    UPDATE_ENTITY=True
    AFFILIATE_ENTITY=True
    AFFILIATE_ENTITY_ACCOUNT_ID=2671
    ...
    USE_MIGRATION_FILTER=True
    MIG_GROUP_IDS=28
    MIG_BATCH_IDS=
    ...
    

    Reference PR description for more details

  6. vishnup0422 commented on Sep 9, 2025

    @vishnup0422
    Collaborator

    QA Validations:
    .env file setup

    AFFILIATE_ENTITY_ACCOUNT_ID=2671
    USE_MIGRATION_FILTER=True
    MIG_GROUP_IDS=28
    MIG_BATCH_IDS=

    COLIN Dev:
    SELECT * FROM public.corp_processing where environment = 'test' and corp_num in (SELECT corp_num FROM public.mig_corp_batch where mig_batch_id in (89,90,91))

    image.png

    14:49:56.324 | INFO    | Task run '3-Corp-Tombstone-Migrate-Task-Async-46d' - 👷 Start migrating BC1110805...
    14:49:56.329 | INFO    | Task run '3-Corp-Tombstone-Migrate-Task-Async-c95' - 👷 Start migrating BC1126747...
    14:49:56.423 | INFO    | Task run '3-Corp-Tombstone-Migrate-Task-Async-20c' - 👷 Start migrating BC0944660...
    14:49:56.424 | INFO    | Task run '3-Corp-Tombstone-Migrate-Task-Async-7dd' - 👷 Start migrating BC0806861...
    
    

    Validated on UI with specific account that business is available for that account

    As expected, 2610 should not have this business
    image.png

    image.png

    Account 2671 validations
    image.png

    Delete Migration batch :

    make run-corps-delete
    . venv/bin/activate && \
    	python flows/batch_delete_flow.py
    14:56:09.108 | INFO    | Flow run 'hopping-mandrill' - Beginning flow run 'hopping-mandrill' for flow 'batch-delete-flow'
    14:56:09.111 | INFO    | Flow run 'hopping-mandrill' - View at http://127.0.0.1:4200/runs/flow-run/8fb021ef-dd8e-44f6-b435-9aad23dc6704
    14:56:09.215 | INFO    | Task run 'get_config-946' - Finished in state Completed()
    14:56:09.504 | INFO    | Task run 'check_postgres_connection-2e7' - ✅ Connected to Postgres database: colin-mig-corps-test
    14:56:09.505 | INFO    | Task run 'check_postgres_connection-2e7' - Finished in state Completed()
    14:56:09.506 | INFO    | Task run 'colin_extract_init-b39' - Finished in state Completed()
    14:56:10.932 | INFO    | Task run 'check_postgres_connection-8e3' - ✅ Connected to Postgres database: business
    14:56:11.012 | INFO    | Task run 'check_postgres_connection-8e3' - Finished in state Completed()
    14:56:11.014 | INFO    | Task run 'lear_init-f63' - Finished in state Completed()
    14:56:11.042 | INFO    | Task run 'get_mig_corp_candidates-449' - 👷 MIG corp candidates found: 4
    14:56:11.043 | INFO    | Task run 'get_mig_corp_candidates-449' - Finished in state Completed()
    14:56:11.064 | INFO    | Task run 'count_corp_num-ae1' - Finished in state Completed()
    14:56:11.071 | INFO    | Flow run 'hopping-mandrill' - 👷 Going to delete 4 businesses with batch size of 5...
    14:56:11.072 | INFO    | Flow run 'hopping-mandrill' - 👷 Auth delete enabled.
    14:56:11.416 | INFO    | Task run 'get_selected_corps_mig-df6' - Finished in state Completed()
    14:56:11.439 | INFO    | Flow run 'hopping-mandrill' - Finished in state Completed()
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Entities - Data Migration

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions