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: update to Debian 12 (bookworm) #1057

Merged
merged 1 commit into from
May 30, 2024

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented May 20, 2024

Issue

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

# The debian image the factory is based on
BASE_IMAGE='debian:bullseye-slim'

  • This relies on using Debian 11 codenamed bullseye which is the oldstable release
  • Debian 12 codenamed bookworm is the current stable release and it was originally released almost one year ago on June 10th, 2023.

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
Copy link

@MikeMcC399

This comment was marked as resolved.

@MikeMcC399
Copy link
Collaborator Author

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 MikeMcC399 marked this pull request as ready for review May 20, 2024 14:57
@MikeMcC399
Copy link
Collaborator Author

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

@mschile mschile requested a review from AtofStryker May 21, 2024 15:59
@jennifer-shehane
Copy link
Member

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

@MikeMcC399
Copy link
Collaborator Author

@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 MikeMcC399 marked this pull request as draft May 21, 2024 19:03
@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Collaborator Author

  • I've opened a separate issue XDG_RUNTIME_DIR error in Debian 12.x headless cypress#29554 regarding the test flakiness. I don't expect that this can be solved by doing anything with Docker. Possibly an Electron update may help, since this is only happening in a headless environment where Xvfb comes into play.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Collaborator Author

@AtofStryker

What do you think about merging this PR?

@AtofStryker
Copy link
Contributor

@AtofStryker

What do you think about merging this PR?

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

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

gave the factory a build, along with all other images in the docker-compose on my amd64 Ubuntu 22.04.4 machine and ran the included docker image in addition. Everything works as expected. Thank you @MikeMcC399

Updated:
* Debian base image to debian:12-slim (codename bookworm)
* git version to 2.39.2
@AtofStryker AtofStryker merged commit b32255e into cypress-io:master May 30, 2024
31 checks passed
@MikeMcC399 MikeMcC399 deleted the debian-12 branch May 30, 2024 13:05
@MikeMcC399
Copy link
Collaborator Author

@AtofStryker

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

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

Successfully merging this pull request may close these issues.

Update from Debian 11 bullseye to Debian 12 bookworm
5 participants