cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1.02k stars 380 forks source link

feat: update to Debian 12 (bookworm) #1057

Closed MikeMcC399 closed 4 months ago

MikeMcC399 commented 4 months ago

Issue

Cypress Docker Images are currently built based on debian:bullseye-slim (Debian 11) from https://hub.docker.com/_/debian

https://github.com/cypress-io/cypress-docker-images/blob/b9525720b9e4e44ee7ded7f974dae89cc0dfd6f3/factory/.env#L7-L8

The Cypress Docker images need to transition to using the Debian stable release 12 (bookworm).

Changes

In factory/.env:

  1. FACTORY_VERSION is updated to 4.0.0 since it is a major change moving from Debian 11 (bullseye) to Debian 12 (bookworm).
  2. BASE_IMAGE is updated to debian:12-slim (long-term equivalent to debian:bookworm-slim, current equivalent to debian:12.5-slim)
  3. FACTORY_DEFAULT_NODE_VERSION is updated to 20.13.1 LTS, released May 9, 2024 Edit: This update is already done.
  4. Git version check updated to 2.39.2 for Debian 12

Verification

On Ubunu 22.04.4 LTS, Node.js v20.13.1 LTS

Execute:

cd factory
docker compose build factory
docker compose build

and confirm that all images are built without errors or warnings.

Continue with

cd test-project
set -a && . ../.env && set +a
docker compose run test-factory-all-included

and confirm that the image builds without errors or warnings and runs successfully.

References

cypress-app-bot commented 4 months ago
MikeMcC399 commented 4 months ago
Version mismatch, git package version: git version 2.30.2 != git version 2.39.2

https://packages.debian.org/search?keywords=git

shows

bullseye (oldstable) (vcs): fast, scalable, distributed revision control system
1:2.30.2-1+deb11u2: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x
bookworm (stable) (vcs): fast, scalable, distributed revision control system
1:2.39.2-1.1: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x

Bump expected git version for Debian 12 to 2.39.2.

MikeMcC399 commented 4 months ago

Tests exhibit flake

test-image-medium-browsers-test-browsers-edge failed once with the following error. On re-run, it passed.

  Running:  2-advanced-examples/querying.cy.js                                            (13 of 20)
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: XDG_RUNTIME_DIR is invalid or not set in the environment.

Timed out waiting for the browser to connect. Retrying...
Missing browserCriClient in connectToNewSpec
Error: Missing browserCriClient in connectToNewSpec
    at Object.connectToNewSpec (<embedded>:4407:48611)
    at Object.connectToNewSpec (<embedded>:4407:27043)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async v.relaunchBrowser (<embedded>:4492:37697)

Exited with code exit status 1
MikeMcC399 commented 4 months ago

Should we proceed with this PR? Are there any other tests needed?

jennifer-shehane commented 4 months ago

@MikeMcC399 We're going to have @AtofStryker take a look if he has some time this iteration.

MikeMcC399 commented 4 months ago

@jennifer-shehane

We're going to have @AtofStryker take a look if he has some time this iteration.

Very good!

I'm going to be pushing through a few clean-up PRs in the meantime. They should not affect the Debian 12 PR in content though.

MikeMcC399 commented 4 months ago
MikeMcC399 commented 4 months ago
MikeMcC399 commented 4 months ago
  Running:  2-advanced-examples/storage.cy.js                                             (15 of 20)

  Local Storage / Session Storage

Too long with no output (exceeded 10m0s): context deadline exceeded
MikeMcC399 commented 4 months ago

@AtofStryker

What do you think about merging this PR?

AtofStryker commented 4 months ago

@AtofStryker

What do you think about merging this PR?

I should be able to give it a thorough review today. Sorry for the delay!

MikeMcC399 commented 4 months ago

@AtofStryker

Thanks for your tests and the merge! It was good to see that the merge into master went without error!