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

Add script for testing rubygem published package in alpine and debian. #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented Dec 4, 2024

We had a bug report from a customer about a failure to install inside an alpine and debian environments. The Ruby gems need to be prebuild in the multiplatform repository so this was not expected.

A script is needed to verify that we have coverage in these environments and bug reports can be reproduced.

👉 If there is a failure in this script that means the gem has not been pre-built in the environment.

➜  ruby-sdk-relay git:(lr/ff-3655/ruby-relay) ✗ ./test-rubygems-install.sh
Testing installation in alpine environment...
[+] Building 0.5s (11/11) FINISHED                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile.rubygems.alpine                                                                                                   0.0s
 => => transferring dockerfile: 455B                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/ruby:3.3-alpine                                                                                                     0.4s
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                        0.0s
 => [1/6] FROM docker.io/library/ruby:3.3-alpine@sha256:caeab43b356463e63f87af54a03de1ae4687b36da708e6d37025c557ade450f8                                               0.0s
 => [internal] load build context                                                                                                                                      0.0s
 => => transferring context: 231B                                                                                                                                      0.0s
 => CACHED [2/6] RUN apk add --no-cache bash                                                                                                                           0.0s
 => CACHED [3/6] RUN adduser -D testuser                                                                                                                               0.0s
 => CACHED [4/6] COPY test-gem.sh /home/testuser/                                                                                                                      0.0s
 => CACHED [5/6] RUN chmod +x /home/testuser/test-gem.sh &&     chown testuser:testuser /home/testuser/test-gem.sh                                                     0.0s
 => CACHED [6/6] WORKDIR /home/testuser                                                                                                                                0.0s
 => exporting to image                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                0.0s
 => => writing image sha256:395b687c891eb96e1b0e89d3804076a081e6b73e0a6c95f17cb6752e20b53b3d                                                                           0.0s
 => => naming to docker.io/library/rubygems-test-alpine                                                                                                                0.0s

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview
Successfully installed eppo-server-sdk-3.3.0-aarch64-linux-musl
1 gem installed
Installed version: 3.3.0
✅ Installation successful in alpine environment
Testing installation in debian environment...
[+] Building 0.2s (10/10) FINISHED                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile.rubygems.debian                                                                                                   0.0s
 => => transferring dockerfile: 418B                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/ruby:3.3-slim-bullseye                                                                                              0.2s
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                        0.0s
 => [1/5] FROM docker.io/library/ruby:3.3-slim-bullseye@sha256:c194f29a6188e77e878eb2cfa35e8f3d51936bc36c86878865a07c7a9a85f7bf                                        0.0s
 => [internal] load build context                                                                                                                                      0.0s
 => => transferring context: 70B                                                                                                                                       0.0s
 => CACHED [2/5] RUN useradd -m testuser                                                                                                                               0.0s
 => CACHED [3/5] COPY test-gem.sh /home/testuser/                                                                                                                      0.0s
 => CACHED [4/5] RUN chmod +x /home/testuser/test-gem.sh &&     chown testuser:testuser /home/testuser/test-gem.sh                                                     0.0s
 => CACHED [5/5] WORKDIR /home/testuser                                                                                                                                0.0s
 => exporting to image                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                0.0s
 => => writing image sha256:11841bba29e5563fcfc16ec289a750123479bc7c0c8aa18e5366ff4cb6c8e002                                                                           0.0s
 => => naming to docker.io/library/rubygems-test-debian                                                                                                                0.0s

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview
Successfully installed eppo-server-sdk-3.3.0-aarch64-linux
1 gem installed
Installed version: 3.3.0
✅ Installation successful in debian environment

For reviewers

What other platforms should we add here to get desired coverage? These are the versions we cross compile for? https://github.com/Eppo-exp/eppo-multiplatform/blob/main/.github/workflows/publish.yml#L77-L81

Give me a shout and I'll add them to this PR.

@leoromanovsky leoromanovsky marked this pull request as ready for review December 4, 2024 00:05
Copy link
Member

@felipecsl felipecsl left a comment

Choose a reason for hiding this comment

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

thanks!

@felipecsl
Copy link
Member

Should we add a github workflow action to trigger this?

Copy link
Contributor

@sameerank sameerank left a comment

Choose a reason for hiding this comment

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

Some others popular distributions are busybox, ubuntu, fedora if you're looking to test more, but I think alpine and debian are a good start for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants