Skip to content

SPIKE - come up with rough auth flows to use with tombstone migration flow #32484

@argush3

Description

@argush3

There is a need to provide the option of performing auth related operations that is separate from the tombstone flow. In this ticket, we want to figure out which auth prefect flows are required and what each prefect flow will do in the context of migrating corporations to the modernized system.

The tombstone flow already provides the ability to do most of the functionality that we need in the separate auth flows we are looking at building. The auth functionality currently available in the tombstone flow include:

  • create an entity
  • create entity contact
  • create affiliation to one or more accounts
  • deletion of entity + affiliations

The reason why we are looking at providing an option to perform auth operations outside of the tombstone flow include the following:

  • From testing larger migration batches with parallel tombstone pipelines running, the auth api is timing out from the number of calls. This might be mitigated a bit if we talk to auth team. There is still a need to have separate flows so we have more control over auth operations.
  • Calling auth as part of the corp migration slows down the tombstone pipeline. This does not mattter that much for smaller batches but is problematic for larger batches.
  • Separating auth specific operations provides more flexibility in how we hit auth api and how we package the different auth api calls
  • Ability to potentially run auth flows a bit ahead of migration depending on the requirements of batch
  • Ability to perform one off auth operations more easily. This is something we need to do quite frequently in dev/test environments and sometimes in prod.

The new auth flows will need to be able to handle the following use cases. Note that all flows should be able to work as manual mode or with USE_MIGRATION_FILTER:

  • Creating an auth entity and any of the following: entity contact, affiliation and send uninvited email(can’t add if affiliation is being added). Note that we should be able to turn things on/off with the minimal being just creating the auth entity. Can probably leverage a lot of logic in tombstone flow. The send uninvited email logic is currently being implemented in tombstone flow via Tombstone pipeline - Add option to send unaffiliated email #32437.
  • Deleting auth info. Can probably leverage a lot of logic in batch delete flow. We will probably want to have it such that we can delete just the unaffiliated invites or affiliations for specific businesses. Or if we want, everything associated with an entity in auth.
  • Ability to just send an unaffiliated email with the assumption that the auth entity and auth entity contact info is in auth already. This is a possible case where we migrate the auth entity and entity contact info a bit before the migration and right after the migration we hit the the unaffiliated email endpoint

Note that we still intend to keep the existing auth operations we have in place via the tombstone and batch delete flows. These are useful for loading of small batches, one off migrations and loading small test datasets for QA purposes.

Tasks

  • Come up with required auth flows detailing what each flow does
  • Think about how the flows will track info. Reference how tombstone flow uses corp_processing and colin freeze flow uses colin_tracking. It probably makes sense that all auth flows reference an auth specific tracking table. Maybe colin_tracking is a good starting point.
  • Review suggested auth flows with team
  • Cut placeholder tickets for dev work

Metadata

Metadata

Labels

Entities - Data MigrationA label to filter on the tickets for the Entities based team that David is PO for.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions