Skip to content

NO-JIRA: build: use uv to run python tools with pip fallback#8508

Open
cblecker wants to merge 1 commit into
openshift:mainfrom
cblecker:worktree-temporal-mapping-quilt
Open

NO-JIRA: build: use uv to run python tools with pip fallback#8508
cblecker wants to merge 1 commit into
openshift:mainfrom
cblecker:worktree-temporal-mapping-quilt

Conversation

@cblecker
Copy link
Copy Markdown
Member

@cblecker cblecker commented May 13, 2026

Summary

  • When uv is detected on PATH, codespell, gitlint, and pyyaml are invoked via uv run --with <pkg>==<ver> instead of being installed into hack/tools/bin/ with pip install --target
  • When uv is not available, the existing pip-based install targets are used unchanged (full fallback, no behaviour change for CI or contributors without uv)
  • All conditional logic is confined to a single ifneq variable block; the verify-codespell, run-gitlint, and verify-docs-nav targets themselves have zero conditionals

Test plan

  • With uv on PATH: make verify-codespell, make run-gitlint, make verify-docs-nav — confirm each uses uv run
  • Without uv: UV= make verify-codespell (and the other two) — confirm pip fallback still works
  • make -j verify-parallel — confirm parallel execution works with both paths
  • Custom override: UV=/custom/uv make verify-codespell — confirm override is respected

Summary by CodeRabbit

  • Chores
    • Updated build system to support the uv package manager with automatic fallback to traditional tooling when unavailable.
    • Enhanced verification commands for documentation navigation, spell-checking, and linting to use dynamic tool detection.

Prefer `uv run --with` over `pip install --target` for codespell,
gitlint, and pyyaml when uv is available, falling back to the existing
pip approach when it is not. Targets remain unconditional by confining
all branching to variable definitions.

Assisted-by: Claude:claude-sonnet-4-6[1m]
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 13, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@cblecker: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

  • When uv is detected on PATH, codespell, gitlint, and pyyaml are invoked via uv run --with <pkg>==<ver> instead of being installed into hack/tools/bin/ with pip install --target
  • When uv is not available, the existing pip-based install targets are used unchanged (full fallback, no behaviour change for CI or contributors without uv)
  • All conditional logic is confined to a single ifneq variable block; the verify-codespell, run-gitlint, and verify-docs-nav targets themselves have zero conditionals

Test plan

  • With uv on PATH: make verify-codespell, make run-gitlint, make verify-docs-nav — confirm each uses uv run
  • Without uv: UV= make verify-codespell (and the other two) — confirm pip fallback still works
  • make -j verify-parallel — confirm parallel execution works with both paths
  • Custom override: UV=/custom/uv make verify-codespell — confirm override is respected

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-area labels May 13, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 839a64f9-6009-4d84-847e-6bb27873f92a

📥 Commits

Reviewing files that changed from the base of the PR and between 674d92a and b7b4960.

📒 Files selected for processing (1)
  • Makefile

📝 Walkthrough

Walkthrough

The Makefile has been updated to support conditional execution of Python-based tooling using uv (when available) or falling back to locally installed tools via pip. A new UV variable detects the presence of the uv package manager. Three command variables (CODESPELL_CMD, GITLINT_CMD, DOCS_NAV_CMD) are now defined to run with uv run --with or via locally installed executables. Corresponding dependency variables (CODESPELL_DEPS, GITLINT_DEPS, DOCS_NAV_DEPS) are set to empty when uv is available or reference existing tool artifacts otherwise. Three targets—verify-docs-nav, verify-codespell, and run-gitlint—have been updated to use these conditional command and dependency variables instead of hardcoded paths or direct executable references.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: introducing conditional use of the 'uv' tool for running Python tools with pip as fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed This PR only modifies the Makefile to use uv run for Python tools when available. No test files or Ginkgo tests were changed, making the "Stable and Deterministic Test Names" check inapplicable.
Test Structure And Quality ✅ Passed This PR contains no Ginkgo test code. It only modifies the Makefile to add uv support for Python tools. The custom check for test structure and quality is not applicable.
Microshift Test Compatibility ✅ Passed This PR only modifies the Makefile for Python tool execution (uv with pip fallback). No Ginkgo e2e tests are added, so the MicroShift test compatibility check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added. This PR only modifies the Makefile to support using the uv package manager for Python tools. SNO compatibility check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only modifies build system (Makefile) to use uv for Python tools. No deployment manifests, operator code, or controllers are changed. Check is not applicable.
Ote Binary Stdout Contract ✅ Passed Not applicable. PR only modifies Makefile for Python tool execution. Check is for Go binaries with JSON stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR modifies only the Makefile to configure uv-based Python tool execution. No Ginkgo e2e tests are added or modified, so the custom check is not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@cblecker cblecker marked this pull request as ready for review May 13, 2026 21:55
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cblecker

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2026
@cblecker
Copy link
Copy Markdown
Member Author

/area ci-tooling

@openshift-ci openshift-ci Bot added the area/ci-tooling Indicates the PR includes changes for CI or tooling label May 13, 2026
@openshift-ci openshift-ci Bot requested review from csrwng and muraee May 13, 2026 21:56
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.00%. Comparing base (674d92a) to head (b7b4960).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8508   +/-   ##
=======================================
  Coverage   40.00%   40.00%           
=======================================
  Files         751      751           
  Lines       92838    92838           
=======================================
  Hits        37137    37137           
  Misses      53014    53014           
  Partials     2687     2687           
Flag Coverage Δ
cmd-support 34.09% <ø> (ø)
cpo-hostedcontrolplane 40.56% <ø> (ø)
cpo-other 40.14% <ø> (ø)
hypershift-operator 50.53% <ø> (ø)
other 31.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cblecker
Copy link
Copy Markdown
Member Author

/pipeline required
/verified by e2e

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 13, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@cblecker: This PR has been marked as verified by e2e.

Details

In response to this:

/pipeline required
/verified by e2e

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@cblecker
Copy link
Copy Markdown
Member Author

/retest-required

@cwbotbot
Copy link
Copy Markdown

cwbotbot commented May 14, 2026

Test Results

e2e-aks

e2e-aws

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 14, 2026

@cblecker: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ci-tooling Indicates the PR includes changes for CI or tooling jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants