Skip to content

ci: add arm arch runner in github actions#5187

Merged
cheyang merged 6 commits intofluid-cloudnative:masterfrom
TrafalgarZZZ:enhancement/add_arm_runner_in_gha
Nov 20, 2025
Merged

ci: add arm arch runner in github actions#5187
cheyang merged 6 commits intofluid-cloudnative:masterfrom
TrafalgarZZZ:enhancement/add_arm_runner_in_gha

Conversation

@TrafalgarZZZ
Copy link
Copy Markdown
Member

@TrafalgarZZZ TrafalgarZZZ commented Jul 24, 2025

Ⅰ. Describe what this PR does

Add arm arch runner in Fluid's github actions to check building in ARM.

  • build and unittest are separated into two Github Actions which can run in parallel

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@sonarqubecloud
Copy link
Copy Markdown

@cheyang cheyang marked this pull request as draft August 20, 2025 09:19
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
…y lingma

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
@TrafalgarZZZ TrafalgarZZZ force-pushed the enhancement/add_arm_runner_in_gha branch from f6362c8 to b716f34 Compare November 17, 2025 02:47
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.85%. Comparing base (334c267) to head (577aec9).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5187      +/-   ##
==========================================
- Coverage   56.96%   56.85%   -0.12%     
==========================================
  Files         442      442              
  Lines       30529    30461      -68     
==========================================
- Hits        17391    17318      -73     
- Misses      11522    11527       +5     
  Partials     1616     1616              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
Signed-off-by: TzZtzt <trafalgarz@outlook.com>
return "", "", errors.New("fail to run the command")
}

// 修复Windows环境下gomonkey.ApplyMethod的问题
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@xliuqq Would you like to have a double check here? I'm not sure if it may cause problems on Windows.

Copy link
Copy Markdown
Collaborator

@xliuqq xliuqq Nov 18, 2025

Choose a reason for hiding this comment

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

checked, no problems on windows.
It's generated by AI, you can delete it directly.

@TrafalgarZZZ TrafalgarZZZ marked this pull request as ready for review November 19, 2025 06:33
@TrafalgarZZZ
Copy link
Copy Markdown
Member Author

@cheyang Hi, the PR is now ready for review. Pls have a check when you are free. Thanks to #5337 contributed by @xliuqq

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds ARM architecture support to Fluid's GitHub Actions CI pipeline and updates test code for ARM compatibility.

  • Separates build and unit test workflows to enable ARM build testing while keeping unit tests on x86_64 (due to race detector limitations on ARM)
  • Updates gomonkey test mocking patterns to be ARM-compatible
  • Enhances Makefile for better cross-platform builds

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/project-check.yml Splits build and unittest into separate jobs; adds ARM runner (ubuntu-24.04-arm) to build job matrix
Makefile Makes GOOS dynamic, adds arm64 UNAME detection, and aligns LOCAL_FLAGS with GC_FLAGS for consistency
pkg/ddc/alluxio/operations/base.go Changes FindUnmountedAlluxioPaths to use pointer receiver for ARM-compatible mocking
pkg/ddc/alluxio/operations/base_test.go Updates TestAlluxioFileUtils_ExecMountScripts to use ARM-compatible gomonkey pattern with instance-based mocking
pkg/ddc/alluxio/ufs_test.go Updates TestFindUnmountedUFS to use ARM-compatible gomonkey pattern without reflect.TypeOf

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/ddc/alluxio/operations/base_test.go Outdated
Comment on lines +663 to +666
err = a.ExecMountScripts()
if err != nil {
t.Errorf("check failure, want nil, got err: %v", err)
}
defer patches.Reset()
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

[nitpick] The defer patches.Reset() statement is placed at the end of the function, which is unconventional. It would be more idiomatic to place the defer immediately after the assignment on line 661 where the patch is created, making the cleanup logic clearer and following Go best practices.

Suggested change
err = a.ExecMountScripts()
if err != nil {
t.Errorf("check failure, want nil, got err: %v", err)
}
defer patches.Reset()
defer patches.Reset()
err = a.ExecMountScripts()
if err != nil {
t.Errorf("check failure, want nil, got err: %v", err)
}

Copilot uses AI. Check for mistakes.
Comment thread pkg/ddc/alluxio/operations/base_test.go Outdated
Comment on lines +652 to +653
a := &AlluxioFileUtils{log: fake.NullLogger()}
patches := gomonkey.ApplyPrivateMethod(*a, "exec", ExecErr)
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Inconsistent test mocking approaches within the same file. Only TestAlluxioFileUtils_ExecMountScripts was updated to use the new ARM-compatible gomonkey approach (using instance instead of reflect.TypeOf), while all other tests in this file still use reflect.TypeOf(AlluxioFileUtils{}).

For consistency and to ensure all tests work correctly on ARM architecture, consider updating all tests in this file to use the same approach as TestAlluxioFileUtils_ExecMountScripts, or provide a justification for the partial update.

Copilot uses AI. Check for mistakes.
Signed-off-by: TzZtzt <trafalgarz@outlook.com>
Comment thread Makefile Outdated
- Consolidate aarch64 and arm64 architecture checks into a single condition

Signed-off-by: TzZtzt <trafalgarz@outlook.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Nov 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cheyang cheyang merged commit 256613e into fluid-cloudnative:master Nov 20, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants