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

chore(github-growth): stop writing to commitfilechange language column #56491

Merged

Conversation

cathteng
Copy link
Member

@cathteng cathteng commented Sep 19, 2023

The original premise for writing to the CommitFileChange table to store the language associated with a change made in a commit was so that we could see the languages being used by organizations.

We could instead save the languages associated with commits in the Repository table, so we wouldn't need to write to CommitFileChange rows -- we also aren't interested in the number of changes that are being made in a particular language, just that folks are working in some language. The CommitFileChange table is also massive (1 billion plus rows) and querying is very slow.

This PR removes writes to the language column in the CommitFileChange model in preparation for removing the column. Undoes #55880

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 19, 2023
@cathteng cathteng requested a review from a team September 19, 2023 20:08
@cathteng cathteng marked this pull request as ready for review September 19, 2023 20:08
@cathteng cathteng requested a review from a team as a code owner September 19, 2023 20:08
Copy link
Contributor

@schew2381 schew2381 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For existing rows in CommitFileChange, will you migrate the language to Repository or delete it outright?

@cathteng
Copy link
Member Author

cathteng commented Sep 19, 2023

@schew2381 i'm going to delete the column from CommitFileChange entirely

edit: and add a column to Repository that will store an array of languages

@cathteng cathteng merged commit 65e5743 into master Sep 20, 2023
53 checks passed
@cathteng cathteng deleted the cathy/github-growth/stop-writing-to-commitfilechange-language branch September 20, 2023 15:21
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants