opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

Add ARM64 Support

Open odidev opened this issue 2 years ago • 11 comments

Hi Team,

I'm working on testing opentelemetry js language library for arm64 platform.

Is your feature request related to a problem? Please describe.

The js language library doesn’t have arm64 platform support.

Describe the solution you'd like

I have explored the repository and CI being used in this library, arm64 builds can be added in the GitHub actions CI to enable test in the library for arm64.

Describe alternatives you've considered

As discussed on the issue, I have added support in GitHub actions to add builds for testing the library although some tests are failing. Please have a look at the logs for different test scenarios:

Integration tests: https://github.com/odidev/opentelemetry-js/actions/runs/2388984732

Peer Api Dependency: https://github.com/odidev/opentelemetry-js/actions/runs/2381843134

Unit Test: https://github.com/odidev/opentelemetry-js/actions/runs/2389251841

Additional context

As shown in the above logs only unit test scenarios ( node-tests ) are failing for arm64 in GitHub actions please find below the reason for the same:

  1. Unit Tests (node-tests): There are test failures in GitHub actions although when I ran the tests in my local arm64 machine all the test cases are passing. Please have a look at the logs: node-14-arm64-unit-tests-logs.txt and node-16-arm64-unit-tests-logs.txt

  2. Unit Tests (browser-tests , webworker-tests): I have not added builds for these tests as circleci/node:16-browsers image is not available for arm64 platform. Please have a look: circleci/circleci-images#537

Do you have any plans for supporting the arm64 platform? It will be very helpful if arm64 support is available in the library.

Please share your thoughts on this.

odidev avatar Jun 01 '22 11:06 odidev

I'm not sure to understand why running those tests in arm64 would change anything, node itself support amd64 so running tests on amd64 doesn't change anything AFAIK

vmarchaud avatar Jun 01 '22 12:06 vmarchaud

I'm not sure to understand why running those tests in arm64 would change anything, node itself support amd64 so running tests on amd64 doesn't change anything AFAIK

While I agree with this in principle, there is always the chance that we have pulled in a dependency with a native component for an exporter or something like that. Also, there could be node bugs that affect only some architectures. I don't see harm in testing it on multiple platforms as long as the tests are parallel with existing tests and don't increase our test time too much. I don't think we need to run browser or webworker tests in ARM because those environments don't support binary components anyway.

dyladan avatar Jun 01 '22 13:06 dyladan

@vmarchaud @dyladan Thanks for the quick response. I am interested in adding support for arm64 in opentelemetry-js and raising PR for the same too. I just need your suggestions in resolving the node-tests issues in CI.

odidev avatar Jun 15 '22 04:06 odidev

I'm not sure. I haven't had time to look into it as I've been busy with other things related to metrics GA.

dyladan avatar Jun 15 '22 12:06 dyladan

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 15 '22 06:08 github-actions[bot]

This issue was closed because it has been stale for 14 days with no activity.

github-actions[bot] avatar Aug 29 '22 06:08 github-actions[bot]

@dyladan are you still working on this? @odidev are you still interested in working on this? If so maybe @dyladan can assign this to @odidev instead.

legendecas avatar Aug 29 '22 16:08 legendecas

Sure I assigned them. The problem is that github actions doesn't support ARM so you can only run the tests in a QEMU emulation environment which I believe will be slow. I also looked at his branch and he converted all tests and actions to arm, not just adding a single unit test so I think that could be contributing to the issues.

dyladan avatar Aug 29 '22 20:08 dyladan

Hi @dyladan

Since Github action doesn’t support arm64 that’s why I used qemu emulation environment to run the test’s although we can also do ARM64 testing in GitHub actions using self-hosted arm64 runners.

If interested, we can get access to ARM H/W through WorksOnArm.

Please share your thoughts on this.

odidev avatar Sep 09 '22 11:09 odidev

For now I think qemu is fine. I wonder how SIGs with compiled languages like go or cpp are handling this

dyladan avatar Sep 09 '22 14:09 dyladan

Hi @dyladan

As per your suggestion, I have used qemu and added arm64 support in unit-test.yml (node tests only) although I am getting failure while running the builds, please have a look:

Commit link: https://github.com/odidev/opentelemetry-js/commit/52be00c312f368aa6107a0429daf2085c96ec692

Logs: https://github.com/odidev/opentelemetry-js/actions/runs/3097956613

I can raise PR if interested but it would be helpful if you could share some pointers for the above issue.

odidev avatar Sep 21 '22 13:09 odidev

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jul 10 '23 06:07 github-actions[bot]

This issue was closed because it has been stale for 14 days with no activity.

github-actions[bot] avatar Feb 19 '24 06:02 github-actions[bot]