roam/daily/2021-09-28.org
2021-09-28 17:12:10 -04:00

6.2 KiB

2021-09-28

User Management Issue

An issue was found with a user logging into and using their account. Rob and Steve had determined that the user was missing an association with their account ID and added it (621d5ff1-cec6-4ac6-b0fc-bf41819ee9bb).

GET http://user-management.service.production.consul/users/tee@pipsovermoney.com?expand=account
  {
    "id": "ed8a68a9-3fc7-496c-850e-d25292152d40",
    "given_name": "Tee",
    "surname": "POM",
    "display_name": "Tee POM",
    "login": "tee@pipsovermoney.com",
    "security_questions": [],
    "accounts": [
      {
        "account": {
          "account": "2843971d-f44b-433f-b161-1c756f8b6b5a",
          "name": "Pips Over Money",
          "active": false
        },
        "role": "owner",
        "is_account_owner": true,
        "created_at": "2019-07-24T01:25:38Z",
        "updated_at": "2019-07-24T01:25:38Z"
      },
      {
        "account": {
          "account": "7c73d2c0-fe0e-4a14-a4fd-637489864f00",
          "name": "Tee POM's Company",
          "active": true
        },
        "role": "owner",
        "is_account_owner": true,
        "created_at": "2019-09-01T00:31:22Z",
        "updated_at": "2019-09-01T00:31:22Z"
      },
      {
        "account": {
          "account": "621d5ff1-cec6-4ac6-b0fc-bf41819ee9bb",
          "name": "Tee POM's Company",
          "active": true
        },
        "role": "owner",
        "is_account_owner": true,
        "created_at": "2021-09-28T18:30:39Z",
        "updated_at": "2021-09-28T18:30:39Z"
      }
    ],
    "created_at": "2019-07-24T01:25:38Z",
    "updated_at": "2021-06-27T06:53:49Z",
    "last_logged_in_at": "2021-08-29T16:35:17Z",
    "reset_password": false
  }

I investigated the mappings for the account UUIDS to check on the related account information, and determined that they both referenced the same numeric AID (1423829).

  GET https://mapping.aweberprod.com/7c73d2c0-fe0e-4a14-a4fd-637489864f00
HTTP/2 200 
date: Tue, 28 Sep 2021 18:43:05 GMT
content-type: application/json; charset="utf-8"
content-length: 83
server: mapping/2.2.5
correlation-id: 4fa82382-7796-449b-b1a0-4344150d8168
cache-control: public, max-age=2592000
vary: Accept,Accept, Accept-Encoding
last-modified: Thu, 02 Apr 2020 22:09:23 +0000

{"id": "7c73d2c0-fe0e-4a14-a4fd-637489864f00", "type": "account", "value": 1423829}
  GET https://mapping.aweberprod.com/621d5ff1-cec6-4ac6-b0fc-bf41819ee9bb
HTTP/2 200 
date: Tue, 28 Sep 2021 18:42:20 GMT
content-type: application/json; charset="utf-8"
content-length: 83
server: mapping/2.2.5
correlation-id: c2997b37-424a-4737-8c7e-3ef0b354de94
warning: Returning mapped value for invalid ID
cache-control: public, max-age=2592000
vary: Accept,Accept, Accept-Encoding
last-modified: Thu, 02 Apr 2020 22:09:23 +0000

{"id": "7c73d2c0-fe0e-4a14-a4fd-637489864f00", "type": "account", "value": 1423829}
  GET http://account.service.production.consul/v1/accounts/1423829
{
  "status": "Paid",
  "account_id": 1423829,
  "url": "",
  "company": "Tee POM's Company",
  "phonenum": "3103630374",
  "lname": "POM",
  "package_id": 67,
  "is_analytics": true,
  "fname": "Tee",
  "date_opened": "2019-08-31T20:31:19.945092-04:00",
  "login": null,
  "is_closed": false,
  "addresses": [
    {
      "city": "Brentwood",
      "address_id": null,
      "address1": "8816 Manchester",
      "address2": "",
      "country_id": 2,
      "zipcode": "63114",
      "state": "MO",
      "country_name": "USA",
      "is_billing": true
    },
    {
      "city": "Scottsdale",
      "address_id": 982879,
      "state": "Arizona",
      "address1": "14455 N. Hayden Road",
      "address2": "",
      "country_id": 2,
      "zipcode": "85260",
      "address_verified_at": "2020-06-30T20:03:28.575601-04:00",
      "country_name": "USA",
      "is_billing": false
    },
    {
      "city": "Jefferson",
      "address_id": 982852,
      "state": "Missouri",
      "address1": "PO BOX 537",
      "address2": "",
      "country_id": 2,
      "zipcode": "63020",
      "address_verified_at": "2020-06-30T18:31:29.446071-04:00",
      "country_name": "USA",
      "is_billing": false
    },
    {
      "city": "St. Louis",
      "address_id": 940602,
      "state": "MO",
      "address1": "3124 Olive St #4",
      "address2": null,
      "country_id": 2,
      "zipcode": "63103",
      "address_verified_at": "2020-03-13T17:57:24.591486-04:00",
      "country_name": "USA",
      "is_billing": false
    }
  ]
}

I was able to refer to old notes from a mapping correction performed on this account on [2020-04-02 Thu]: https://correlr.gitlab.aweber.io/org/worklog.html#2020-04-02-thursday-account-mapping-issue. I determined that 7c73d2c0-fe0e-4a14-a4fd-637489864f00 is the "correct" UUID for this account, per the fix performed at that time, and the results returned by mapping.

Looking at appdb, since making the accounts table the source of truth for account UUIDs in the time between that mapping fix and now, the account was set to use the erroneous UUID:

  app-txn=> select a_id, account from accounts where a_id = 1423829;
    a_id   |               account
  ---------+--------------------------------------
   1423829 | 621d5ff1-cec6-4ac6-b0fc-bf41819ee9bb
  (1 row)

Steve updated the account UUID in AppDB and removed the additional association in user management. This appears to have resolved the issue.

Modeling the new Search DSL

Started work on Translating the search DSL.

Understanding issues with dashboard broadcast reporting

The new broadcast endpoint is omitting a significant number of messages that do show up in the old broadcasts report.

This issue is visible on the staging autotest account, “Broadcast Regression” list.