Skip to content

Conversation

hdefazio
Copy link

@hdefazio hdefazio commented Oct 1, 2025

Description

RHOAIENG-35146

  • Add a more robust check for the check-container-tool make target to catch empty CONTAINER_TOOL values
  • Change the run_e2e.sh script to use the CONTAINER_TOOL value, defaulting to docker if it is unset

How Has This Been Tested?

$ make check-container-tool 
✅ Container tool 'podman' found.

(this is correct for my system)

$ make test-e2e
✅ Container tool 'podman' found.
==== Building Docker image ghcr.io/llm-d/llm-d-inference-scheduler:dev ====
podman build \

Other cases:
Manually set CONTAINER_TOOL := ""

$ make check-container-tool 
❌ Error: No container tool detected. Please install docker or podman.
make: *** [Makefile:297: check-container-tool] Error 1

Manually set CONTAINER_TOOL := "docker"

$ make check-container-tool 
❌ Error: 'docker' is not installed or not in your PATH.
🔧 Try: sudo apt install docker OR brew install docker
make: *** [Makefile:297: check-container-tool] Error 1

(this is correct for my system)

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Summary by CodeRabbit

  • New Features

    • Allow selection of container tool via CONTAINER_TOOL, propagated to sub-commands.
    • Added check-builder target to validate and report the selected builder.
  • Improvements

    • Enhanced container tool checks with clearer validation and guidance when the tool is missing or not in PATH.
  • Tests

    • E2E script now honors CONTAINER_TOOL (defaulting to docker), prints the chosen tool, and uses it for image operations.

@openshift-ci openshift-ci bot requested review from israel-hdez and pierDipi October 1, 2025 00:54
Copy link

openshift-ci bot commented Oct 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hdefazio

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

coderabbitai bot commented Oct 1, 2025

Walkthrough

Exports CONTAINER_TOOL in Makefile, enhances check-container-tool to validate CONTAINER_TOOL presence and PATH availability with explicit messages, adds a new check-builder target, and updates test/scripts/run_e2e.sh to parameterize container operations via CONTAINER_TOOL (default docker) for image listing and pulls.

Changes

Cohort / File(s) Summary of changes
Build validation (Makefile)
Makefile
export CONTAINER_TOOL; reworked check-container-tool to perform multi-branch validation (empty check, PATH lookup with explicit success/failure messages); added .PHONY: check-builder and new check-builder target that validates and reports BUILDER.
E2E script container tool parametrization
test/scripts/run_e2e.sh
Introduced CONTAINER_TOOL (default docker) and logs selection; replaced hardcoded docker invocations with ${CONTAINER_TOOL} for image listing and pulling (SIMTAG determination and pulling inference-sim, inference-scheduler, routing-sidecar), preserving existing control flow and error handling.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant Make as make
  participant Env as Environment
  participant PATH as System PATH

  Dev->>Make: make check-container-tool
  Make->>Env: Read CONTAINER_TOOL
  alt CONTAINER_TOOL unset
    Make-->>Dev: Error: CONTAINER_TOOL not set
  else CONTAINER_TOOL set
    Make->>PATH: which $CONTAINER_TOOL
    alt Tool found
      Make-->>Dev: OK: container tool available
    else Tool missing
      Make-->>Dev: Error: tool not in PATH (guidance)
    end
  end

  Dev->>Make: make check-builder
  Make->>Env: Read BUILDER
  alt BUILDER unset
    Make-->>Dev: Message: BUILDER not set
  else BUILDER set
    Make-->>Dev: Selected builder: $BUILDER
  end
Loading
sequenceDiagram
  autonumber
  participant User as Runner
  participant E2E as run_e2e.sh
  participant Env as Environment
  participant CT as $CONTAINER_TOOL (default docker)
  note over E2E: Initialize CONTAINER_TOOL (default docker) and print selection
  User->>E2E: Execute script
  E2E->>Env: Read/Default CONTAINER_TOOL
  E2E->>CT: List images to compute SIMTAG
  E2E->>CT: Pull inference-sim image
  E2E->>CT: Pull inference-scheduler image
  E2E->>CT: Pull routing-sidecar image
  CT-->>E2E: Success/Failure per operation
  E2E-->>User: Continue or exit based on results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop and check the tool I choose,
A builder named, no need to lose.
Containers listed, images drawn near,
Scripts now nimble, logs loud and clear.
I twitch my nose—CI carrots appear. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely conveys the two main modifications: validating the CONTAINER_TOOL value and applying it in the e2e test script. It accurately summarizes the purpose of the updated Makefile and run_e2e.sh changes without including file lists or extraneous details. It is clear and specific enough for a team member scanning the history to understand the primary change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot added the approved label Oct 1, 2025
Copy link

github-actions bot commented Oct 1, 2025

Cannot approve the pull request: Error: openshift-ci[bot] is not included in the approvers role in the OWNERS file

@hdefazio hdefazio force-pushed the check_container_tool branch from 5e690c7 to cb07c97 Compare October 1, 2025 00:59
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
test/scripts/run_e2e.sh (3)

16-18: Consider quoting variables for robustness.

The CONTAINER_TOOL variable should be quoted when used in command substitution, and VLLM_SIMULATOR_TAG should be quoted in the grep command to prevent word splitting and globbing issues.

Apply this diff to add proper quoting:

-SIMTAG=$(${CONTAINER_TOOL} images | grep ghcr.io/llm-d/llm-d-inference-sim | awk '{print $2}' | grep ${VLLM_SIMULATOR_TAG})
+SIMTAG=$("${CONTAINER_TOOL}" images | grep ghcr.io/llm-d/llm-d-inference-sim | awk '{print $2}' | grep "${VLLM_SIMULATOR_TAG}")
 if [[ "${SIMTAG}" != "${VLLM_SIMULATOR_TAG}" ]]; then
-  ${CONTAINER_TOOL} pull ghcr.io/llm-d/llm-d-inference-sim:${VLLM_SIMULATOR_TAG}
+  "${CONTAINER_TOOL}" pull ghcr.io/llm-d/llm-d-inference-sim:${VLLM_SIMULATOR_TAG}

25-27: Consider quoting variables for robustness.

Similar to the SIMTAG section, CONTAINER_TOOL and EPP_TAG should be quoted to prevent word splitting and globbing issues.

Apply this diff to add proper quoting:

-EPPTAG=$(${CONTAINER_TOOL} images | grep ghcr.io/llm-d/llm-d-inference-scheduler | awk '{print $2}' | grep ${EPP_TAG})
+EPPTAG=$("${CONTAINER_TOOL}" images | grep ghcr.io/llm-d/llm-d-inference-scheduler | awk '{print $2}' | grep "${EPP_TAG}")
 if [[ "${EPPTAG}" != "${EPP_TAG}" ]]; then
-  ${CONTAINER_TOOL} pull ghcr.io/llm-d/llm-d-inference-scheduler:${EPP_TAG}
+  "${CONTAINER_TOOL}" pull ghcr.io/llm-d/llm-d-inference-scheduler:${EPP_TAG}

34-36: Consider quoting variables for robustness.

Similar to the previous sections, CONTAINER_TOOL and ROUTING_SIDECAR_TAG should be quoted to prevent word splitting and globbing issues.

Apply this diff to add proper quoting:

-SIDECARTAG=$(${CONTAINER_TOOL} images | grep ghcr.io/llm-d/llm-d-routing-sidecar | awk '{print $2}' | grep ${ROUTING_SIDECAR_TAG})
+SIDECARTAG=$("${CONTAINER_TOOL}" images | grep ghcr.io/llm-d/llm-d-routing-sidecar | awk '{print $2}' | grep "${ROUTING_SIDECAR_TAG}")
 if [[ "${SIDECARTAG}" != "${ROUTING_SIDECAR_TAG}" ]]; then
-  ${CONTAINER_TOOL} pull ghcr.io/llm-d/llm-d-routing-sidecar:${ROUTING_SIDECAR_TAG}
+  "${CONTAINER_TOOL}" pull ghcr.io/llm-d/llm-d-routing-sidecar:${ROUTING_SIDECAR_TAG}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e690c7 and cb07c97.

📒 Files selected for processing (2)
  • Makefile (2 hunks)
  • test/scripts/run_e2e.sh (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: lint-and-test
🔇 Additional comments (1)
test/scripts/run_e2e.sh (1)

3-5: LGTM!

The CONTAINER_TOOL variable declaration with a sensible default and informative echo statement is well-implemented.

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

Can we go upstream first for this PR?

@hdefazio
Copy link
Author

hdefazio commented Oct 1, 2025

closed in favor of llm-d#364

@hdefazio hdefazio closed this Oct 1, 2025
brettmthompson pushed a commit to brettmthompson/llm-d-inference-scheduler that referenced this pull request Oct 16, 2025
…lis-patch-1

Update sha and generic fetcher added for zip file download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants