Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$125] Index bug #416

Closed
jmgasper opened this issue Jul 8, 2021 · 10 comments
Closed

[$125] Index bug #416

jmgasper opened this issue Jul 8, 2021 · 10 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Jul 8, 2021

@afrisalyp - I think we may have a bug related to the new indices added, and the git access links.

We saw one report of a user unable to use a Gitlab link, which normally has been working fine. Their user mapping record was never properly added.

We attempted to add it manually, and were unable to because the GithubUsernameIndex was requiring a value.

We need to make sure that the indices aren't causing problems with adding records for new users.

Screen Shot 2021-07-08 at 5 59 54 PM

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 8, 2021

Challenge https://www.topcoder.com/challenges/c1083fbb-1c8d-46c5-93f6-685a7ac8e911 has been created for this ticket.

This is an automated message for ghostar2020 via Topcoder X

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 8, 2021

Challenge https://www.topcoder.com/challenges/c1083fbb-1c8d-46c5-93f6-685a7ac8e911 has been assigned to afrisalyp.

This is an automated message for ghostar2020 via Topcoder X

@afrisalyp
Copy link
Collaborator

@jmgasper

Sorry just noticed that we haven't test this functionality.

We put connection between topcoderUsername -> github and gitlab account in the same table (UserMapping)

But at some cases, only one connection available (topcoderUsername -> github) or (topcoderUsername -> gitlab).

Since we define indexes on all of the fields, we need to fill them all.

We have three options here.

  1. Remove indexes and change query to scan for table UserMapping.
  2. Fill not applicable required fields with dummy string.
  3. Separate table into two tables (GithubUserMapping and GitlabUserMapping).

Any thoughts on this?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 9, 2021

Let's split into two tables. That'll make more sense, I think, and will allow us to avoid both dummy data and the removal of indices.

@jmgasper jmgasper changed the title [$40] Index bug [$125] Index bug Jul 9, 2021
@afrisalyp
Copy link
Collaborator

@jmgasper

Sure, thanks.

We will need to migrate the contents of UserMapping table into GithubUserMapping and GitlabUserMapping.
Which one do you prefer?

  1. We will create a migration script.
  2. We will handle migration seamlessly in runtime. So when the process needs to query but can't find the data, it will query in the old table (UserMapping), if it found, it will be stored in the new tables.

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jul 9, 2021

Let's do a migration script, thanks. That way we won't have data in two places and a deprecated table sitting around.

@afrisalyp
Copy link
Collaborator

@jmgasper

Please do npm run create-tables to create the added tables and npm run migrate-user-mapping to migrate the UserMapping table to the new tables.

@jmgasper
Copy link
Collaborator Author

@afrisalyp - I'm still working on testing this. Some of the IAM permissions are a bit wonky on the dev env, so I'm reaching out to Topcoder for some help. The migration worked properly though, so that piece looks good.

@afrisalyp
Copy link
Collaborator

@jmgasper

Okay. Thanks for the update.

@jmgasper
Copy link
Collaborator Author

Payment task has been updated: https://www.topcoder.com/challenges/c1083fbb-1c8d-46c5-93f6-685a7ac8e911
Payments Complete
Winner: afrisalyp
Copilot: ghostar2020
Challenge c1083fbb-1c8d-46c5-93f6-685a7ac8e911 has been paid and closed.

This is an automated message for ghostar2020 via Topcoder X

@jmgasper jmgasper added this to the Version 1.1 milestone Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants