Skip to content

fix/trees report same url branch hash#1999

Open
alanpeixinho wants to merge 1 commit into
kernelci:mainfrom
profusion:fix/trees-report-same-url-branch-hash
Open

fix/trees report same url branch hash#1999
alanpeixinho wants to merge 1 commit into
kernelci:mainfrom
profusion:fix/trees-report-same-url-branch-hash

Conversation

@alanpeixinho

@alanpeixinho alanpeixinho commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What it is

Tree-report could return the wrong tree when several tree_names share the same git url/branch/hash (e.g. fedora-eln vs c10s on ark-latest). Accept optional tree_name and use it in head selection and the checkout join.

How to test

  • Production ark examples are older than LIMIT_MAX_AGE_HOURS (720). Temporarily set it to a higher value (>4800) in treeReport.py. (Alternativelly you can produce checkouts that have origin, git_url, git_branch and hash in common, but different tree name).
  • Run fetches with examples:
ORIGIN=redhat MIN_AGE_IN_HOURS=4000 MAX_AGE_IN_HOURS=4800 \
GIT_URL=https://gitlab.com/cki-project/kernel-ark.git GIT_BRANCH=ark-latest \
TREE_NAME=fedora-eln ./tree-report-get.sh
ORIGIN=redhat MIN_AGE_IN_HOURS=4000 MAX_AGE_IN_HOURS=4800 \
GIT_URL=https://gitlab.com/cki-project/kernel-ark.git GIT_BRANCH=ark-latest \
TREE_NAME=c10s ./tree-report-get.sh
  • Check each dashboard_url matches the requested tree_name.
  • Revert LIMIT_MAX_AGE_HOURS to 720.
  • Run integration test pytest backend/kernelCI_app/tests/integrationTests/treeReport_test.py.

Closes #1460

Trees that share git_url and branch could return the wrong checkout when they also share a commit hash, because tree_name was not applied in head selection or the
join back to checkouts. Accept tree_name on the tree-report API and thread it through get_checkout_summary_data.

Closes kernelci#1460

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
@alanpeixinho
alanpeixinho force-pushed the fix/trees-report-same-url-branch-hash branch from ccbfc42 to fe69fe8 Compare July 17, 2026 20:42

@felipebergamin felipebergamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

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.

Bug(tree-report): trees with same branch/git_url/hash return wrong data

2 participants