Skip to content

poc(issues): first-parent next checkout (#2092) - #2134

Draft
felipebergamin wants to merge 4 commits into
kernelci:mainfrom
profusion:poc/2092-first-parent-next-checkout
Draft

felipebergamin wants to merge 4 commits into
kernelci:mainfrom
profusion:poc/2092-first-parent-next-checkout

Conversation

@felipebergamin

Copy link
Copy Markdown
Member

Summary

Test plan

  • poetry run pytest -n 0 kernelCI_app/tests/unitTests/queries/issues_queries_test.py -k next_checkout
  • poetry run pytest -n 0 --use-local-db kernelCI_app/tests/integrationTests/issue_next_checkout_test.py
  • Confirm linear history picks the first-parent descendant, not an earlier unrelated start_time neighbour
  • Confirm merge checkouts follow first parent only
  • Confirm two first-parent children of H are disambiguated by later checkouts on the same tree
  • Confirm missing commits row falls back to start_time

alanpeixinho and others added 4 commits September 9, 2026 16:43
* Add `Commits` model: unique `git_commit_hash`, nullable author/committer/subject/message/`fetched_from_url`
* Add `CommitParents` model: FKs to `commits.id`, `ord` with 0 = first parent, unique `(commit_id, ord)`
* Add migration `0021_commits_and_commit_parents` (`commits`, `commit_parents` tables and indexes)
* Join from `checkouts.git_commit_hash` without new checkout columns

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Dump commits and commit_parents in full so git ancestry survives restore.

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
…ci#2089)

Keep commits rows narrow: unique git name/email in commit_identity, subject plus UTF-8 body in commit_message as bytea. update_db dumps and restores the new tables and still accepts a flat legacy commits CSV.
Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>

This branch has not been deployed

No deployments
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 this pull request may close these issues.

2 participants