-
Notifications
You must be signed in to change notification settings - Fork 85
fix: remove duplicated error message for cloud console #915
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Running backplane-cli on macOS Apple Silicon | ||
|
|
||
| The `ocm backplane console` command runs the console container locally using the same container image as the logged-in cluster, which is typically built for Linux/amd64. For better compatibility and performance on macOS with Apple Silicon (M1/M2/M3), you should configure Podman to use `Rosetta` instead of `QEMU` for x86_64 emulation. | ||
|
|
||
| ## Steps to Configure Podman with Rosetta | ||
|
|
||
| ### 1. Update Podman | ||
|
|
||
| Ensure you have the latest version of Podman installed: | ||
|
|
||
| ```bash | ||
| brew upgrade podman | ||
| ``` | ||
|
|
||
| Alternatively, download the latest installer from [podman.io](https://podman.io/). | ||
|
|
||
| ### 2. Configure Rosetta Support | ||
|
|
||
| Edit `~/.config/containers/containers.conf` to specify the provider and enable Rosetta: | ||
|
|
||
| ```ini | ||
| [machine] | ||
| provider = "applehv" | ||
| rosetta = true | ||
| ``` | ||
|
|
||
| ### 3. Recreate the Podman Machine | ||
|
|
||
| Remove the existing VM and create a new one. **Warning:** This will erase all existing container images and data. | ||
|
|
||
| ```bash | ||
| podman machine reset | ||
| podman machine init | ||
| podman machine start | ||
| ``` | ||
|
|
||
| ### 4. Verify Rosetta is Enabled | ||
|
|
||
| Check that Rosetta is properly configured: | ||
|
|
||
| ```bash | ||
| # Verify Rosetta is enabled in machine configuration | ||
| podman machine inspect --format '{{.Rosetta}}' | ||
| # Expected output: true | ||
|
|
||
| # Enable Rosetta activation | ||
| podman machine ssh "sudo touch /etc/containers/enable-rosetta" | ||
| podman machine ssh "sudo systemctl restart rosetta-activation.service" | ||
|
|
||
| # Verify Rosetta is available in binfmt | ||
| podman machine ssh "ls /proc/sys/fs/binfmt_misc/" | ||
| # Expected output should include 'rosetta' in the list | ||
| ``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks removing
TryPrintAPIErrorhere makes this path inconsistent with the rest of the CLI as I can see most other cli commands rely onTryPrintAPIErroras the standard way to parse and present bp-api errors.IIUC, the original intent (from PR #825) was to improve visibility for
non-JSONresponses (e.g. infra errors like 502), which is a valid. However, removingTryPrintAPIErrormeans we lose the structured/clean formatting for the common case (JSON errors from bp-api).Would it make sense to keep
TryPrintAPIErrorfor JSON responses, and only fall back to raw response body when parsing fails (non-JSON)? WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense. I will make a card for this instead as it requires some efforts to carefully change and test.