Skip to content

subscriptions: attempt to extract account number from username upon creation

Warren Gifford requested to merge jc/read-write-account-number into main

Created by: unknwon

CEs are currently (as the convention) including a Salesforce account number in the username (e.g. XYZ-11223344) that a product subscription is associated with. This PR adds the logic to attempt extracting this account number whenever possible and save it to the product_subscriptions.account_number column.

The value of the column will then be used to link up dotcom license keys and Salesforce accounts.

Notes:

  1. Existing subscriptions will be handled by an OOB migration that comes later.
  2. The IAM team has the plan to move off license management completely out of dotcom instance, therefore minimal effort to make existing license workflow easier.

Test plan

CI


Part of https://github.com/sourcegraph/sourcegraph/issues/38661

Merge request reports

Loading