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

TestLangServer_workspaceExecuteCommand_modules_multiple fails on aarch64 #549

Closed
06kellyjac opened this issue Jun 11, 2021 · 4 comments · Fixed by #739
Closed

TestLangServer_workspaceExecuteCommand_modules_multiple fails on aarch64 #549

06kellyjac opened this issue Jun 11, 2021 · 4 comments · Fixed by #739
Labels
bug Something isn't working ci Continuous integration/delivery related

Comments

@06kellyjac
Copy link

Server Version

v0.18.0

Terraform Version

None

Client Version

None

Terraform Configuration Files

None

Log Output

Gist contains: Just the error section, full aarch64 failing build, and a full x86 passing build for comparison

https://gist.github.com/06kellyjac/a5699a23c1745911eaf981a28c14a467

Expected Behavior

Tests should pass

Actual Behavior

TestLangServer_workspaceExecuteCommand_modules_multiple fails but only on aarch64

Steps to Reproduce

Either run the tests normally from this repo on an aarch64 machine (go test ./... or go test github.com/hashicorp/terraform-ls/internal/langserver/handlers)
Or clone my nixpkgs repo and use branch terraform-ls on an aarch64 machine and run nix-build -A terraform-ls

@radeksimko
Copy link
Member

Hi @06kellyjac
Thanks for the report.

Unfortunately it seems that GitHub does not provide any ARM environment to run the tests in currently: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources which seems to be mostly blocked on lack of ARM support in Azure per actions/runner-images#2552 (comment)

We could in theory self host the ARM runners as per https://github.blog/changelog/2019-12-03-github-actions-self-hosted-runners-on-arm-architectures/ but that is obviously not as trivial (from ops perspective) as using GitHub-hosted runners.

I'm asking around internally (at HashiCorp) about that possibility, but generally until we have a way of testing this in CI it's unlikely that we'll find time to fix it.

That said if you can come up with a PR that fixes the test I'd be happy to review it!

@radeksimko radeksimko added bug Something isn't working ci Continuous integration/delivery related labels Jun 11, 2021
@06kellyjac
Copy link
Author

Might be able to set up the tests in actions using QEMU like deno does using this: https://github.com/denoland/rusty_v8/blob/main/.github/workflows/ci.yml#L81-L96

I imagine it'll need some adapting to work for golang rather than rust but I might play with it

@radeksimko
Copy link
Member

I had a spare moment today to reproduce this on my Raspberry Pi and I have a hunch of what the root cause is.

I believe it's merely test data being limited to 3 combinations of OS & architecture:

https://github.com/hashicorp/terraform-ls/tree/main/internal/terraform/module/testdata/main-module-multienv/env/dev/.terraform/plugins

I reckon the best way forward would be to turn this test into more E2E test which actually calls Terraform and runs init on whatever platform the test is running on and creates the cache relevant for that platform, instead of maintaining cache in-tree.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ci Continuous integration/delivery related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants