`contributor_repo` table does not relate to `repo`

未关闭
#551 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
活跃
技术栈
python, sql
领域
databases

调研方向

The contributor_repo table is filled by the contributor breadth worker; inspect that worker and the database schema to see how repo_git and gh_repo_id are written. First read the worker code and any migration scripts, then discuss with maintainers whether to link to repo via repo_src_id. Done means an agreed plan to reclaim space and add the foreign key before multi-forge support.

由索引模型根据 Issue 内容生成。

描述

database discussion needs-plan tech debt

the contributor_repo table does not have a foreign key to the repo table.

It has its own repo_git column and repo_name column which i dont believe is getting updated when repos move/get renamed. it appears to store events from the github events api (such as PushEvent and CreateEvent). Do we want to keep storing the historical names as they were when the data was collected? the urls seem likely redundant.

We do also have a gh_repo_id column so we can maybe associate this table with repo using the repo_src_id - this would be best to do before we move over to supporting other forges, otherwise this migration may be more difficult

In our 42k repo instance, this table is ~120GB

This table seems to be filled in by the contributor breadth worker.

The unique key on this table seems to be up to ~1.4 billion (im pretty sure its an autoincrement integer)

I suspect this table also has not been the target of any deletion queries we have ever run on this database

This table does not appear to be used by 8Knot but may be used by DSWG notebooks (and some internal stuff)

What should we do to make this table a more sensible use of space?

主要语言
Python
星标
17
派生
30
平均合并
6 小时 16 分钟
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

chaoss/CollectOSS 的其他 Issue

查看 chaoss/CollectOSS 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。