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

Clean up profiles without partners #3590

Closed
1 task
cielf opened this issue May 14, 2023 · 11 comments · Fixed by #3842
Closed
1 task

Clean up profiles without partners #3590

cielf opened this issue May 14, 2023 · 11 comments · Fixed by #3842
Assignees
Labels
core team Groomed but likely needs expert knowledge

Comments

@cielf
Copy link
Collaborator

cielf commented May 14, 2023

Summary

data-cleanup -- partner profiles without partners

Why address

A kindness to future supporters/devs

Details

There are a number of profiles without partners. These appear to be a holdover from partnerbase days. Let's clean them up!

Notes

Original commentary from investigation phase.

I don't think you could access any of these at this point, but check. (you might be able to get at it some weird way as a bank, you know, by entering the profile id if you are the right bank, but probably not through the normal UI)

This is likely a carry forward from some long long ago issue that was brought forward when the dbs were combined,. I expect none of these have been accessed in ahem some time.

Let's take a look at whether this is affecting any banks that are active, first.

Initial investigation indicates there are 141 profiles without partners? some of which are clearly bogus (partner 999,999 seems suspect, for instance.)

Criteria completion

  • Script that will clean up the profiles, tested against production copy to ensure only disconnected profiles are deleted.
@cielf cielf added the core team Groomed but likely needs expert knowledge label May 14, 2023
@dorner
Copy link
Collaborator

dorner commented Jun 9, 2023

So there is definitely something relatively recent going on here - but my hunch is it's benign.

Partner profile ID: 3682

belongs to organization ID: 224 (which was only created in January).

It also belongs to partner ID 3812, which does not exist. This seems to indicate that the partner was deleted, but the profile wasn't.

There is a dependent: :destroy option on the profile, meaning if you actually call destroy on the partner, it should also destroy the profile.

Long story short, it's very hard to figure out what happened here without accessing app logs. And unfortunately we don't keep the app logs for the period of time we'd need to figure this out.

We really need something like Logstash or Flume to be able to view and search our older logs.

@cielf
Copy link
Collaborator Author

cielf commented Jun 9, 2023

Adding that need as a topic for Sunday's meeting.

@cielf
Copy link
Collaborator Author

cielf commented Jun 9, 2023

@dorner That profile has the same name as 3811, which is suspiciously close to 3812

@cielf
Copy link
Collaborator Author

cielf commented Jun 9, 2023

There are two cases in the immediate vicinity that have doubled names. It may be "when you have a hammer everything looks like a nail", but I'm wondering if this is another double-click situation.

@dorner
Copy link
Collaborator

dorner commented Jun 11, 2023

Interesting! Wondering if it's a double-click plus race condition where it creates two partners, rolls back one of them (since there is a uniqueness validation on name) but leaves the profile as is. Not sure how that's possible since the partner + profile creation is inside a transaction.

In any case, since we've fixed double clicks across the board with #3612 we can monitor this to see if it happens again. My hunch is no, and it seems like these profiles are basically just garbage data in any case.

@github-actions
Copy link
Contributor

This issue has been inactive for 249 hours (10.38 days) and will be automatically unassigned after 111 more hours (4.63 days).

@github-actions
Copy link
Contributor

This issue has been inactive for 369 hours (15.38 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.

@dorner
Copy link
Collaborator

dorner commented Jul 7, 2023

@cielf any further action needed here?

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

@dorner There are still 141, so the problem hasn't gotten any worse. How do we feel about cleaning them out?

@dorner
Copy link
Collaborator

dorner commented Jul 30, 2023

Sounds good to me! Want to change this from an investigation to a cleanup ticket?

@cielf
Copy link
Collaborator Author

cielf commented Aug 13, 2023

Yes. Changing in place.

@dorner dorner changed the title [Investigation] profiles without partners Clean up profiles without partners Aug 18, 2023
@dorner dorner self-assigned this Aug 18, 2023
dorner added a commit that referenced this issue Aug 27, 2023
#3590: Clean up partner profiles without a partner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core team Groomed but likely needs expert knowledge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants