Skip to content

Fix ENVTESTPATH arch decided at Makefile-parse time on cold bin/ - #2379

Open
kaovilai wants to merge 1 commit into
openshift:oadp-1.4from
kaovilai:fix-envtest-cold-bin-arch-oadp-1.4
Open

Fix ENVTESTPATH arch decided at Makefile-parse time on cold bin/#2379
kaovilai wants to merge 1 commit into
openshift:oadp-1.4from
kaovilai:fix-envtest-cold-bin-arch-oadp-1.4

Conversation

@kaovilai

Copy link
Copy Markdown
Member

Fixes #2377

ifeq evaluates its $(shell ...) condition at Makefile-parse time, before any target's prerequisites run. On a cold bin/ (setup-envtest not yet installed), $(ENVTEST) list fails silently, the grep finds nothing, and ENVTESTPATH gets permanently redefined to force --arch=amd64 — regardless of host arch — even though setup-envtest is correctly installed for the host's native arch by the time the test recipe actually runs.

Moves the fallback entirely into the shell expression itself (still a recursively-expanded variable, so it's only evaluated when referenced in the test recipe, after envtest has installed the right arch).

Kept separate from #2368 (already approved) since that PR's body explicitly scoped this exact bug out on purpose ("tracked as #2377, not fixed here... out of scope rather than a reason to expand this PR's diff a third time") — not reopening that scope decision here.

oadp-1.5/oadp-1.6/oadp-dev already use a different envtest resolution mechanism (--bin-dir) and don't have this bug. oadp-1.3 has the same bug but the fix doesn't cherry-pick cleanly (predates the go-install-tool-versioned refactor from #2368), so it's fixed separately in #2378 rather than via cherry-pick bot.

Note

Responses generated with Claude

ifeq evaluates its $(shell ...) condition at parse time, before any
target's prerequisites run. On a cold bin/ (setup-envtest not yet
installed), `$(ENVTEST) list` fails silently, the grep finds nothing,
and ENVTESTPATH gets permanently redefined to force --arch=amd64 --
regardless of host arch -- even though setup-envtest is correctly
installed for the host's native arch by the time the `test` recipe
actually runs.

Move the fallback entirely into the shell expression itself (still a
recursively-expanded variable, so it's only evaluated when referenced
in the `test` recipe, after `envtest` has installed the right arch).

Fixes openshift#2377

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 812a3806-c65e-492e-ba57-6777120643eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai

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 Aug 12, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.47%. Comparing base (1dfe2da) to head (1b26fb6).

⚠️ Current head 1b26fb6 differs from pull request most recent head 96a505d

Please upload reports for the commit 96a505d to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##           oadp-1.4    #2379   +/-   ##
=========================================
  Coverage     38.47%   38.47%           
=========================================
  Files            30       30           
  Lines          5113     5113           
=========================================
  Hits           1967     1967           
  Misses         2949     2949           
  Partials        197      197           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

@kaovilai: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.18-e2e-test-aws 96a505d link true /test 4.18-e2e-test-aws

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants