Fix ENVTESTPATH arch decided at Makefile-parse time on cold bin/ - #2378
Fix ENVTESTPATH arch decided at Makefile-parse time on cold bin/#2378kaovilai 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 b8aed6c to get more accurate results. Additional details and impacted files@@ Coverage Diff @@
## oadp-1.3 #2378 +/- ##
=========================================
Coverage 34.35% 34.35%
=========================================
Files 30 30
Lines 4949 4949
=========================================
Hits 1700 1700
Misses 3063 3063
Partials 186 186 ☔ 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).Direct fix for oadp-1.3 — doesn't cherry-pick cleanly from the oadp-1.4 fix (oadp-1.3 predates the
go-install-tool-versionedrefactor), so opened separately rather than via cherry-pick bot.Note
Responses generated with Claude