-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
ci(test): Add 32-bit & ARM CI tests #2126
Conversation
Note Reviews pausedUse the following commands to manage reviews:
WalkthroughThe project introduces a new 32-bit testing workflow and modifies existing GitHub Actions and Docker configurations. Key changes include adding a new job to the build workflow for running tests on different platforms, simplifying the linting process, and upgrading the Docker setup for multi-platform builds. Additionally, the Makefile now includes race condition testing for supported platforms, enhancing robustness. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
Dockerfile (1)
Line range hint
2-26
: Optimize Dockerfile configuration and address static analysis warnings.The multi-stage build setup is well-structured and enhances the maintainability of the Dockerfile. However, there are a few improvements and fixes needed:
- Pinning Versions in
apk add
- It's recommended to pin versions of packages to ensure reproducibility and avoid unexpected updates. Modify theapk add
command to include specific versions of the packages.- Avoid Platform Flags in Base Images - The use of
--platform
flag withFROM
is flagged by Hadolint (DL3029). It's advisable to ensure that the platform is appropriately handled without explicitly setting it in the base image to avoid potential build issues on different architectures.- Tag Versions Explicitly in Images - Always specify explicit versions for base images to avoid pulling unintended updates that could break the build.
- RUN apk add --no-cache make git + RUN apk add --no-cache make=4.3-r0 git=2.32.0-r0 - FROM --platform=windows/amd64 mcr.microsoft.com/windows/nanoserver:ltsc2022 AS gomplate-windows + FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 AS gomplate-windows
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/build.yml (1 hunks)
- .github/workflows/lint.yml (1 hunks)
- Dockerfile (2 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/lint.yml
Additional context used
Hadolint
Dockerfile
[warning] 9-9: Pin versions in apk add. Instead of
apk add <package>
useapk add <package>=<version>
(DL3018)
[warning] 63-63: Do not use --platform flag with FROM (DL3029)
[warning] 69-69: Always tag the version of an image explicitly (DL3006)
Additional comments not posted (1)
.github/workflows/build.yml (1)
30-44
: Review of the newlinux-32bit-build
job configuration.The job setup looks appropriate for testing on 32-bit platforms using QEMU. The use of matrix strategy to test across multiple platforms (
linux/386, linux/armhf
) is a good practice to ensure broader compatibility.However, ensure that the Docker image
test32bit
used in the testing step is correctly configured to handle the 32-bit architecture, as issues can arise when running 32-bit applications on 64-bit architectures without proper setup.
e59ad1d
to
71f431e
Compare
@coderabbitai ignore |
71f431e
to
cb4f950
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- .github/workflows/build.yml (1 hunks)
- .github/workflows/lint.yml (1 hunks)
- Dockerfile.test32bit (1 hunks)
- Makefile (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- .github/workflows/build.yml
- .github/workflows/lint.yml
Additional context used
Hadolint
Dockerfile.test32bit
[warning] 8-8: Pin versions in apk add. Instead of
apk add <package>
useapk add <package>=<version>
(DL3018)
Additional comments not posted (3)
Dockerfile.test32bit (2)
6-6
: Environment variables set correctly.The environment variables
GOOS
,GOARCH
, and potentiallyGOARM
are set correctly based on the build arguments, which is essential for cross-compilation.
10-16
: Proper project setup in Docker.The working directory is set correctly, and project files are properly copied to the Docker image. This setup is crucial for subsequent operations like dependency management and builds.
Makefile (1)
150-158
: Enhanced testing with race condition detection.The addition of race condition detection for supported platforms is a significant improvement. It helps in identifying potential concurrency issues in the code.
@coderabbitai ignore Actions performedReviews paused. |
cb4f950
to
4097609
Compare
This comment was marked as resolved.
This comment was marked as resolved.
beb364f
to
b360e90
Compare
8e97c23
to
d049f01
Compare
88813e6
to
0b35c00
Compare
Signed-off-by: Dave Henderson <[email protected]>
0b35c00
to
7a3db27
Compare
#2121 only popped up because the Alpine build runs tests on all platforms. I should at least run tests on 32-bit platforms in CI to make sure I don't hit errors like this again.
Also adding emulated tests (with QEMU) for ARM64 and ARMv7. They take a bit longer (because of the crypto differences), but it'll probably be worth it.
Summary by CodeRabbit
New Features
Dockerfile.test32bit
) for 32-bit build environments.Refactor
Makefile
with race detection for supported platforms.Chores