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

[RFC] GitHub Duplication #957

Closed
iamYashSinha opened this issue Mar 16, 2023 · 7 comments · May be fixed by #1044
Closed

[RFC] GitHub Duplication #957

iamYashSinha opened this issue Mar 16, 2023 · 7 comments · May be fixed by #1044
Assignees

Comments

@iamYashSinha
Copy link

iamYashSinha commented Mar 16, 2023

Issue - #929

Possible solutions

  1. Backend-solution: fetch github_id from the API and store it to the new variable called github_user_id;

  2. What if we make a separate page for individuals who have recently changed their github_userName and require them to visit it in order to merge their document (old+new)? We can update the user's document using their previous github_userName and new github_newUserName.

Problems with the solutions

  1. problem with 1st solution - the variable called github_id which is actually storing the github_Username, the dependencies are everywhere, hence it is difficult to change that variable from github_id to github_username, I think for now we should stick to the temporary plan like creating another variable and fetch the github_id from the github_api.

  2. problem with 2nd solution - How will people know that they have multiple documents in the RDS database, secondly, it is a manual process in which people must visit the website and provide information such as old GitHub username and new username.

  3. When comparing these two potential solutions, the first is a type of automated service, while the second is manual.

Note:

  1. I've included all possible dependencies of "github_id" from all repositories.

  2. Please refer to the doc and give your valuable comments

  3. doc link - https://docs.google.com/document/d/1w5hYUaJgFG71d8GgzcTxA3irkiTzFX6YtLtAuBHEi7I/edit

  4. Requesting other devs to give your comments on this @ankushdharkar @RitikJaiswal75 @prakashchoudhary07 @satyam73 @pallabez @TanishqSingla

@RitikJaiswal75 RitikJaiswal75 changed the title (RFC) Github Duplication [RFC] Github Duplication Mar 16, 2023
@iamYashSinha
Copy link
Author

Important!

  1. Apart from that, there is one more parameter that is unchangeable by changing the github_username and as we know, we must have to find relevant parameters that are relevant to both documents in order to update the document.
  2. Screenshot from 2023-03-16 21-34-35

Solution:

  1. a parameter called node_id which remains constant on changing the github_username, I've verified this as well.

  2. The node_id is different from the id property, which is also a unique identifier for GitHub objects, but it is an integer and is not guaranteed to be unique across different types of objects.

  3. The node_id is designed to be a stable and secure identifier that can be used to access an object's data via the GraphQL API, and it remains consistent even if the object's other properties, such as its name or description, are changed.

@satyam73
Copy link
Member

image
It is already mentioned here that it is not unique across all the different types of object. Then how we will use this?

@prakashchoudhary07
Copy link
Contributor

prakashchoudhary07 commented Mar 17, 2023

What is the difference between id and nodeId here?

@prakashchoudhary07
Copy link
Contributor

And after changing the GitHub username, let's say we are storing some GitHub unique key, How will we know that we have to update the user details from GitHub to be re-fetched in RDS so that we are in sync with GitHub details?
At what point will we do this?

@prakashchoudhary07
Copy link
Contributor

By the where do we use the GitHub username in RDS?

@iamYashSinha
Copy link
Author

Answering the 1st question - Node IDs are used in the GitHub API to specify a specific resource when making requests. For example, if you wanted to retrieve information about a specific repository, you could use the repository's node_id in your API request to retrieve the relevant data. It's important to note that the node_id is not the same as the repository's id or other identifiers used by GitHub hence We can't use this on the other hand we have "github_id" to know more I've already created a document on this click here

Answering the 2nd question- for that, I've already suggested a possible solution like GitHub API providing the "github_id" which is unchangeable or remains constant even after changing the GitHub username, so when a user comes to the RDS website he/she has to register again, afterward a new or duplicated document is created in the RDS with the help of github_id parameter provided by Github API we can then update the user.

Answering the 3rd question- We can use it by creating another field in the database so that we can store the user's "gtihub_id".

Sorry for the late comment I was OOO till the 10th of April.

@prakashchoudhary07
Copy link
Contributor

Closing this, as it has been completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants