Fix ENVTESTPATH arch decided at Makefile-parse time on cold bin/ - #2379
Fix ENVTESTPATH arch decided at Makefile-parse time on cold bin/#2379kaovilai wants to merge 1 commit into
Conversation
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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
@kaovilai: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Fixes #2377
ifeqevaluates its$(shell ...)condition at Makefile-parse time, before any target's prerequisites run. On a coldbin/(setup-envtestnot yet installed),$(ENVTEST) listfails silently, the grep finds nothing, andENVTESTPATHgets permanently redefined to force--arch=amd64— regardless of host arch — even thoughsetup-envtestis correctly installed for the host's native arch by the time thetestrecipe 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
testrecipe, afterenvtesthas 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 thego-install-tool-versionedrefactor from #2368), so it's fixed separately in #2378 rather than via cherry-pick bot.Note
Responses generated with Claude