Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make bundle does not work on MacOS #1564

Open
appiepollo14 opened this issue Oct 14, 2024 · 3 comments
Open

make bundle does not work on MacOS #1564

appiepollo14 opened this issue Oct 14, 2024 · 3 comments

Comments

@appiepollo14
Copy link
Contributor

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!

  1. open a cmd
  2. execute: make bundle

Expected behavior
Execute make bundle without an error caused by sed

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

appiepollo14 added a commit to appiepollo14/argocd-operator that referenced this issue Oct 14, 2024
@appiepollo14
Copy link
Contributor Author

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 added a commit to appiepollo14/argocd-operator that referenced this issue Oct 14, 2024
* Adds volumes and volumeMounts to argocd types
* Adds e2e test

* Updates generated files
* Updates docs
* Adds unit tests

Fixes argoproj-labs#1564 using `make bundle` on MacOS

Signed-off-by: appiepollo14 <[email protected]>
@anandf
Copy link
Collaborator

anandf commented Oct 17, 2024

@appiepollo14 Could you try installing gnu-sed in mac and try using the command brew install gnu-sed should work.

@appiepollo14
Copy link
Contributor Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants