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

fastly CLI support for ARM macOS ? #458

Closed
yusukebe opened this issue Nov 1, 2021 · 11 comments · Fixed by fastly/Viceroy#88
Closed

fastly CLI support for ARM macOS ? #458

yusukebe opened this issue Nov 1, 2021 · 11 comments · Fixed by fastly/Viceroy#88
Labels
bug Something isn't working

Comments

@yusukebe
Copy link

yusukebe commented Nov 1, 2021

Version

Fastly CLI version 0.43.0 (7172a30)
Built with go version go1.17.2 linux/amd64

What happened

I have been installed fastly CLI by using homebrew tap command and tried to do fastly compute serve. Then the command threw the error message below:

ERROR: error downloading latest Viceroy release: no asset found for your OS (darwin) and architecture (arm64).

Does fastly CLI support for ARM macOS?

My environment is:

Darwin 21.1.0 arm64 arm
@yusukebe yusukebe added the bug Something isn't working label Nov 1, 2021
@Integralist
Copy link
Collaborator

Hi @yusukebe

Thanks for raising this issue.

The actual issue here is related to the viceroy binary (which is what is called to support the fastly compute serve feature) not having a corresponding release asset: https://github.com/fastly/Viceroy/releases/tag/v0.2.5

Looks like only AMD64 is being produced. I'll reach out to the Viceroy team about this.

@yusukebe
Copy link
Author

yusukebe commented Nov 1, 2021

Hi @Integralist

OK, I see. Thank you for your reply and creating the issue on fastly/Viceroy/issues project!

@voxpelli
Copy link

voxpelli commented Nov 2, 2021

Any way to force it to use the AMD64 for now?

@Integralist
Copy link
Collaborator

Integralist commented Nov 2, 2021

Hi @voxpelli unfortunately there isn't at the moment.

There's a few ways we could side-step this issue...

  1. Provide a flag to skip the logic to check viceroy is available (this will allow you to manually install AMD Viceroy).
  2. Provide flags for setting the viceroy os/arch that the CLI is otherwise expecting.
  3. Provide env vars to override the viceroy os/arch that the CLI is otherwise expecting.

I'll chat with my team about these options and any other workarounds while we wait for Viceroy to support ARM.

@voxpelli
Copy link

voxpelli commented Nov 2, 2021

I think I can compile Viceroy myself and it should find it locally if it's in my path, right?

@voxpelli
Copy link

voxpelli commented Nov 2, 2021

I double checked and did cargo install viceroy and viceroy --version now I get viceroy 0.2.5, yet the cli tool still tries to download it.

I'm sure this worked before when I installed it manually 🤔

@Integralist
Copy link
Collaborator

The CLI will try to install or update the Viceroy asset that matches the CLI's own OS/Arch (e.g. it uses runtime.GOOS and runtime.GOARCH).

@Integralist
Copy link
Collaborator

yet the cli tool still tries to download it.

This will likely be because the CLI installs the Viceroy binary into either os.UserConfigDir or os.UserHomeDir and so the cargo install viceroy is likely placing the binary in a different directory.

@voxpelli
Copy link

voxpelli commented Nov 2, 2021

Right, would it be possible to at least optionally have it use whatever compatible one that’s in my PATH?

@Integralist
Copy link
Collaborator

Yup, that's definitely another option. Lookup in ConfigDir then HomeDir and failing that try the standard os.LookPath

@thiagopnts
Copy link

in the meantime this is how I'm getting it to work(assuming viceroy is installed and in your PATH)

ln -s $(which viceroy) $HOME/Library/Application\ Support/fastly/viceroy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants