Skip to content

Add support for linux riscv64 platform #18156

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

Merged
merged 1 commit into from
Apr 30, 2025
Merged

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Apr 30, 2025

Description

This PR adds support for linux riscv64 platform.

Cross building on x86_64 linux should be fine.
Building directly on riscv64 linux requires user to bring their own protoc executable because the maven repository does not ship prebuilt protoc executables for riscv64.

Related Issues

Resolves #2341

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

❌ Gradle check result for 46d7454: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kxxt
Copy link
Contributor Author

kxxt commented Apr 30, 2025

It appears that the Jenkins CI is successful but github workflow reports it as unsuccessful because jq failed to parse the response: https://github.com/opensearch-project/OpenSearch/actions/runs/14744106685/job/41388124137?pr=18156#step:7:635

I am not sure what's going on here.

@peterzhuamazon
Copy link
Member

Re-triggered, force merge sometimes can mess up the gradle check logic.

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Apr 30, 2025

Seems like cross-compile from x86_64 is available then core is fine.
k-NN/PA unlikely support this, more so for knn as it has native code.

Copy link
Contributor

✅ Gradle check result for 46d7454: SUCCESS

Copy link

codecov bot commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.49%. Comparing base (a6724d3) to head (5f52ee0).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
.../java/org/opensearch/gradle/VersionProperties.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18156      +/-   ##
============================================
- Coverage     72.53%   72.49%   -0.04%     
- Complexity    67207    67253      +46     
============================================
  Files          5476     5476              
  Lines        310436   310445       +9     
  Branches      45121    45121              
============================================
- Hits         225179   225065     -114     
- Misses        66894    67089     +195     
+ Partials      18363    18291      -72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reta
Copy link
Contributor

reta commented Apr 30, 2025

LGTM, thank you @kxxt , could you please resolve the conflicts? thank you

@kxxt kxxt requested a review from a team as a code owner April 30, 2025 12:01
@kxxt
Copy link
Contributor Author

kxxt commented Apr 30, 2025

LGTM, thank you @kxxt , could you please resolve the conflicts? thank you

Thanks! I have resolved the conflict.

@kxxt
Copy link
Contributor Author

kxxt commented Apr 30, 2025

Looks like the CI is experiencing some network problem: https://github.com/opensearch-project/OpenSearch/actions/runs/14754049968/job/41419085283?pr=18156#step:3:14

Copy link
Contributor

✅ Gradle check result for 5f52ee0: SUCCESS

Copy link
Contributor

@reta reta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @kxxt , @peterzhuamazon anything from your side?

kxxt added a commit to kxxt/archriscv-packages that referenced this pull request Apr 30, 2025
- Add support for riscv64 linux, upstreamed: opensearch-project/OpenSearch#18156
- Backport patch to 2.19.1
- Vendor protoc becuase prebuilts are not available for riscv64 in maven
  repository
- Tested basic functionalities.
@peterzhuamazon
Copy link
Member

Thank you @kxxt , @peterzhuamazon anything from your side?

Since this only exist in core not for bundle, I have no issues with the merge.

@peterzhuamazon
Copy link
Member

And I would say remove the backport 3.0 label so that it will only affect starting 3.1.0.

@reta
Copy link
Contributor

reta commented Apr 30, 2025

@andrross @peterzhuamazon seems like approval check is broken ... :(

@peternied
Copy link
Member

@peterzhuamazon Looks like the Minimum approval count is still expected, can you update the branch protections settings to remove it?

@peterzhuamazon
Copy link
Member

@peterzhuamazon Looks like the Minimum approval count is still expected, can you update the branch protections settings to remove it?

Checking.

@peterzhuamazon
Copy link
Member

Hi @andrross @reta @peternied I have removed that check from every branch rule, then enable require code owner review for each.

Thanks.

@andrross andrross merged commit 2b3eb26 into opensearch-project:main Apr 30, 2025
32 checks passed
felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this pull request May 3, 2025
- Add support for riscv64 linux, upstreamed: opensearch-project/OpenSearch#18156
- Backport patch to 2.19.1
- Vendor protoc becuase prebuilts are not available for riscv64 in maven
  repository
- Tested basic functionalities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Libraries & Interfaces enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RISC-V 64 Support
5 participants