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

feat: e2e Docker OS support #3341

Merged
merged 26 commits into from
Jan 3, 2023
Merged

feat: e2e Docker OS support #3341

merged 26 commits into from
Jan 3, 2023

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Jan 3, 2023

Follow-up of #3340, pointing to the dev branch.

Contributes to prisma/prisma#14017, #3332, prisma/prisma#16962, prisma/docs#4303

This PR adds Dockerised OS Support tests for in the ./docker folder. In particular, it tries to run Prisma Client (both binary and library) in the following systems:

  • alpine-3.16-amd64-openssl-1.1.x
  • alpine-3.17-amd64-openssl-3.0.x
  • alpine-latest-amd64-openssl-3.0.x
  • debian-bullseye-amd64-openssl-1.1.x
  • debian-buster-amd64-openssl-1.1.x
  • debian-latest-amd64-openssl-1.1.x
  • opensuse-tumbleweed-amd64-openssl-1.1.x
  • ubuntu-20.04-amd64-openssl-1.1.x
  • ubuntu-22.04-amd64-openssl-3.0.x
  • ubuntu-latest-amd64-openssl-3.0.x
  • ubuntu-latest-arm64-openssl-3.0.x

Additionally, for each Dockerised system, we assert the binaryTarget selected by Prisma (i.e., the Current platform value in prisma -v). If a major Docker image suddenly introduces a new OpenSSL version we don't support, or switches to another architecture by default, we will receive a Slack notification.

Multiarchitecture support (amd64, arm64) works via QEMU (docker/setup-qemu-action@v2) and Docker Buildx (docker/setup-buildx-action@v2).

Review Helpers

TODOs

From these tests, I have opened the following issues:

We should:

@jkomyno jkomyno requested a review from Jolg42 January 3, 2023 16:48
@jkomyno jkomyno marked this pull request as ready for review January 3, 2023 16:48
@Jolg42 Jolg42 added this to the 4.9.0 milestone Jan 3, 2023
@jkomyno jkomyno mentioned this pull request Jan 3, 2023
4 tasks
@jkomyno jkomyno merged commit 8194892 into dev Jan 3, 2023
@jkomyno jkomyno deleted the feat/e2e-docker-os-support branch January 3, 2023 16:53
- OpenSSL location: `/lib/libssl.so.1.1`
- Binary target: `linux-musl`

Although Linux Alpine 3.17+ upgraded to OpenSSL 3, this example uses the `openssl1.1-compat` package to install OpenSSL 1.1.
Copy link
Member

Choose a reason for hiding this comment

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

Is the folder name then not incorrect/misleading?

# Update system dependencies.
# OpenSSL is missing in the base image, so we install it
RUN apt-get update -y \
&& apt-get install -y openssl
Copy link
Member

Choose a reason for hiding this comment

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

Does this reliably pin to OpenSSL 1.1?

@@ -0,0 +1,17 @@
{
"name": "@prisma/debian-buster-amd64-openssl-undefined",
Copy link
Member

Choose a reason for hiding this comment

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

Long term Prisma should throw an installation when no OpenSSL is found I assume instead of failing later?

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.

None yet

3 participants