Skip to content

Commit f661fdc

Browse files
committed
Fix checkout tree check
Let's skip for now checking branch/tree. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent a9c8ae4 commit f661fdc

1 file changed

Lines changed: 27 additions & 8 deletions

File tree

orchestrator.py

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -536,19 +536,38 @@ async def process_checkout_wait_step(
536536
# KernelCI API returns nodes in "items" array, not "data"
537537
nodes = data.get("items", [])
538538

539-
# Look for a node with submitter: "service:pipeline" and matching tree
539+
# Look for a node with submitter: "service:pipeline"
540+
print(
541+
f"DEBUG: Found {len(nodes)} checkout nodes, searching for tree: {staging_run.kernel_tree}"
542+
)
540543
for node in nodes:
541544
if node.get("submitter") == "service:pipeline":
542545
data_obj = node.get("data", {})
543546
kernel_revision = data_obj.get("kernel_revision", {})
544547
tree = kernel_revision.get("tree")
545-
546-
# Check if tree matches the kernel_tree from staging_run
547-
# For "auto" we need to match the actual selected tree
548-
if tree == staging_run.kernel_tree or (
549-
staging_run.kernel_tree == "auto"
550-
and tree in ["next", "mainline", "stable"]
551-
):
548+
branch = kernel_revision.get("branch")
549+
550+
print(
551+
f"DEBUG: Checking node - tree: {tree}, branch: {branch}, submitter: {node.get('submitter')}"
552+
)
553+
554+
# TODO: Improve tree/branch matching logic
555+
# The current implementation doesn't properly match tree names.
556+
# Based on KernelCI API response, nodes have:
557+
# - tree: "kernelci", branch: "staging-mainline" (for mainline)
558+
# - tree: "kernelci", branch: "staging-stable" (for stable)
559+
# - tree: "kernelci", branch: "staging-next" (for next)
560+
# We should match based on branch name containing the selected tree
561+
# For now, just match any node with submitter: "service:pipeline"
562+
563+
# Commented out old tree matching logic:
564+
# if tree == staging_run.kernel_tree or (
565+
# staging_run.kernel_tree == "auto"
566+
# and tree in ["next", "mainline", "stable"]
567+
# ):
568+
569+
# Temporary: Accept any service:pipeline checkout node
570+
if True:
552571
# Found matching checkout node!
553572
treeid = node.get("id")
554573
if treeid:

0 commit comments

Comments
 (0)