Open appiepollo14 opened 2 weeks ago
I've closed the PR as there is no generic approach to sed
which will work on both MacOS and Linux. Hence why my followup question is: why is there the need in the first place to replace these labels in the bundle? Can we set the value of those labels directly via any other input for operator-sdk?
@appiepollo14 Could you try installing gnu-sed
in mac and try using the command brew install gnu-sed
should work.
@anandf that off course solves the issue. However, this feels like an undocumented workaround to me. The core of this issue is the request to make the bundle target cross-platform compatible. So what was the purpose of replacing those labels and can't that be done in another fashion?
Describe the bug When running
make bundle
on MacOS, it exits premature with an error statement:sed: 1: "bundle/manifests/argocd ...": undefined label 'undle/manifests/argocd-operator-webhook-service_v1_service.yaml' make: *** [bundle] Error 1
This causes the generated bundle to not complete. Which led to a PR not passing CI, as the bundle is different than when it is generated on Linux in CI.
The rootcause is that there are some
sed
statements in the make statement which have unexpected behavior on MacOS exiting make.To Reproduce Steps to reproduce the behavior: use a MacOS system!
make bundle
Expected behavior Execute
make bundle
without an error caused bysed
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Solution / explanation of the difference between sed on systems is posted here: https://stackoverflow.com/questions/12272065/sed-undefined-label-on-macos