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

[Investigation] roles without resources #3540

Closed
2 tasks
cielf opened this issue Apr 16, 2023 · 3 comments · Fixed by #3550
Closed
2 tasks

[Investigation] roles without resources #3540

cielf opened this issue Apr 16, 2023 · 3 comments · Fixed by #3550
Assignees
Labels
core team Groomed but likely needs expert knowledge

Comments

@cielf
Copy link
Collaborator

cielf commented Apr 16, 2023

Summary

On production, a number of roles point to non-existent partners. Figure out how this happened, and recommend a course of action.

Details

See Human Essentials Support, thread starting Wednesday April 5, 4:42 PM "When I try to log in any browser it gives me a internal 500 error code"
Initial digging reveals that that user (#15) has a role (#30) that points to a partner (#2) that does not exist.
See below for creation and update times

Image

There seem to be several cases of this problem, but this is the first time it has been brought to our attention.

Criteria for completion

  • Figure out what is going on
  • Recommended actions
@cielf cielf added the core team Groomed but likely needs expert knowledge label Apr 16, 2023
@dorner
Copy link
Collaborator

dorner commented Apr 21, 2023

Findings:

  • 89 users have roles that don't point to an actual partner (this only affects partners, not organizations)
  • The IDs of 82 of these actually point to partner profiles - I'm about 95% sure we had a period of time where we were saving the wrong IDs when we did the roles and this is likely a remnant of that
  • 6 of the remaining 7 have never logged in and probably can be safely deleted
  • The last one (user ID 15) is just plain weird and I think we need to manually munge the data

Will put up a PR with a migration to fix what we can.

@dorner
Copy link
Collaborator

dorner commented Apr 21, 2023

Correction - 18 of them don't have valid IDs, because for 11 of them, although the partner_profile exists, it references a partner that doesn't. 🤦 There might still be some bad partner profile data as well, which sucks.

@cielf
Copy link
Collaborator Author

cielf commented Apr 23, 2023

@dorner Hrm. I'm going to add data-cleanup -- profiles without partners -- to the proto-issue list . 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.

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