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

build: only build amd64 image for CentOS #3784

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Apr 23, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

briansmith/ring#1728

What's changed and what's your intention?

https://github.com/GreptimeTeam/greptimedb/actions/runs/8778537946/job/24085145007

While building dev builder image on CentOS we got the following error

error: failed to run custom build command for `ring v0.17.8`

cargo:warning=include/ring-core/arm_arch.h:82:2: error: #error "ARM assembler must define __ARM_ARCH"
#22 163.9   cargo:warning=ToolExecError: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-I" "/tmp/cargo-installlVctJw/release/build/ring-d3e8df3d499b101a/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/tmp/cargo-installlVctJw/release/build/ring-d3e8df3d499b101a/out/ca5a6bd8bd60c5f6-chacha-armv8-linux64.o" "-c" "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/pregenerated/chacha-armv8-linux64.S" with args "cc" did not execute successfully (status code exit status: 1).cargo:warning=In file included from /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/pregenerated/chacha20_poly1305_armv8-linux64.S:4:0:
#22 163.9   cargo:warning=include/ring-core/asm_base.h:73:2: error: #error "ARM assembler must define __ARM_ARCH"
#22 163.9   cargo:warning= #error "ARM assembler must define __ARM_ARCH"
#22 163.9   cargo:warning=  ^
#22 163.9   cargo:warning=In file included from /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/pregenerated/chacha20_poly1305_armv8-linux64.S:7:0:
#22 163.9   cargo:warning=include/ring-core/arm_arch.h:82:2: error: #error "ARM assembler must define __ARM_ARCH"
#22 163.9   cargo:warning= #error "ARM assembler must define __ARM_ARCH"
#22 163.9   cargo:warning=  ^
#22 163.9 
#22 163.9   exit status: 1

Version 0.17 of ring doesn't support CentOS arm64. Since we don't provide arm64 binary for CentOS, I removed the arm64 image for CentOS in this PR.

BUILDX_MULTI_PLATFORM_BUILD now has three possible value

  • all: builds images for both amd64 and arm64 platform
  • amd64: builds amd64 image only
  • false: builds image for current platform

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@evenyag evenyag requested a review from zyy17 April 23, 2024 13:23
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 23, 2024
@evenyag evenyag marked this pull request as ready for review April 23, 2024 13:23
@evenyag evenyag requested a review from a team as a code owner April 23, 2024 13:23
@evenyag evenyag changed the title build: only build amd64 for CentOS build: only build amd64 image for CentOS Apr 23, 2024
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.27%. Comparing base (924c52a) to head (4cbd9df).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3784      +/-   ##
==========================================
- Coverage   85.59%   85.27%   -0.33%     
==========================================
  Files         946      946              
  Lines      159955   159955              
==========================================
- Hits       136921   136402     -519     
- Misses      23034    23553     +519     

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

@killme2008 killme2008 added this pull request to the merge queue Apr 23, 2024
Merged via the queue into GreptimeTeam:main with commit 0aaf762 Apr 23, 2024
24 of 34 checks passed
@tisonkun
Copy link
Collaborator

To be clear, once ring supports Linux arm64 again, we'd revert this change? Or we just no longer provide arm64 image.

@evenyag
Copy link
Contributor Author

evenyag commented Apr 24, 2024

To be clear, once ring supports Linux arm64 again, we'd revert this change? Or we just no longer provide arm64 image.

ring supports arm64, but not on CentOS 7 arm64. We also have other issues while compiling on CentOS 7 arm64 so we only provide binary for CentOS 7 x64.

@tisonkun
Copy link
Collaborator

Make sense. CentOS 7 will be end of life at June 30, 2024. I suppose we provide such an image for certain user cases, and thus if no users need CentOS 7 arm64 explicitly, we can provide only CentOS 7 x64.

@evenyag
Copy link
Contributor Author

evenyag commented Apr 24, 2024

I suppose we provide such an image for certain user cases, and thus if no users need CentOS 7 arm64 explicitly, we can provide only CentOS 7 x64.

It only builds an image for compiling the database (dev-builder), not for serving the database. We didn't use that image in the release action.

So this PR fixes an unexpected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants