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

chore: add ubuntu 24 image #1041

Merged
merged 5 commits into from Apr 30, 2024
Merged

chore: add ubuntu 24 image #1041

merged 5 commits into from Apr 30, 2024

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Apr 25, 2024

since Nobel Numbat is available, we should add the image under test in the cypress repo since we test the last two major versions unofficially of ubuntu. See related cypress-io/cypress#29412

@AtofStryker AtofStryker marked this pull request as ready for review April 25, 2024 17:31
@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Apr 26, 2024

@AtofStryker

It seems that python3.11 is not yet available from https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa for the Ubuntu 24.04 LTS release, although I did have it working on Ubuntu 24.04 beta. Cypress needs python3.11 to fully build correctly.

Also I found that the issue I mentioned in cypress-io/cypress#29319, that yarn start fails with FATAL:setuid_sandbox_host is still occurring on the Ubuntu 24.04 LTS release.

@AtofStryker
Copy link
Contributor Author

@AtofStryker

It seems that python3.11 is not yet available from https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa for the Ubuntu 24.04 LTS release, although I did have it working on Ubuntu 24.04 beta. Cypress needs python3.11 to fully build correctly.

Sounds like we will need to wait for the distribution to be available before updating any of the machine executors in our pipeline that are using Ubuntu 20.

Also I found that the issue I mentioned in cypress-io/cypress#29319, that yarn start fails with FATAL:setuid_sandbox_host is still occurring on the Ubuntu 24.04 LTS release.

@MikeMcC399 does this happen in global mode only with Cypress? I'm not sure I have fully groked the issue yet.

@MikeMcC399
Copy link
Collaborator

@AtofStryker

Sounds like we will need to wait for the distribution to be available before updating any of the machine executors in our pipeline that are using Ubuntu 20.

I hope this might sort itself out in the next days. Anyway it will probably take quite a while before Ubuntu 24.04 actually becomes available through CI providers who will also need some ramp-up time.

does this happen in global mode only with Cypress? I'm not sure I have fully groked the issue yet.

It's not exactly global mode which is causing the issue.

npx cypress open --global # works with the npm module Cypress 13.8.1 not running in a clone of the cypress repo

the failure is with yarn start which is

yarn cypress open --dev --global # fails in a clone of the cypress repo after running yarn install on Ubuntu 24.04

@MikeMcC399
Copy link
Collaborator

@MikeMcC399
Copy link
Collaborator

@AtofStryker

I have Cypress running now using yarn start on Ubuntu 24.04.

Python issue

Use

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install g++ make python3.11
echo "export NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11" >> ~/.bashrc
. ~/.bashrc

Security issue

@MikeMcC399
Copy link
Collaborator

@AtofStryker

sudo apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb

According to the Ubuntu 24.04 release notes in the section Year 2038 support for the armhf architecture

More than a thousand packages have been updated to handle time using a 64-bit value rather than a 32-bit one, making it possible to handle times up to 292 billion years in the future.

@AtofStryker
Copy link
Contributor Author

@MikeMcC399 good to know. It sounds like we need to update the Cypress Contributing documentation to get Cypress running locally on Ubuntu 24.04 (captured in cypress-io/cypress#29319) , as well as the Linux prerequisites in cypress-documentation (Which you have outlined in cypress-io/cypress-documentation#5816 ). It sounds like the only unsolved issue currently is for contributors running yarn start where the SUID binary helper aborts due to misconfiguration referenced in cypress-io/cypress#29319? Is there anything I am missing here?

@AtofStryker
Copy link
Contributor Author

Im going to update the image to include the python 3.11 install as well as updated libs to run cypress

@MikeMcC399
Copy link
Collaborator

@AtofStryker

Is there anything I am missing here?

It sounds like you missed the comment to use

echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

@AtofStryker
Copy link
Contributor Author

@MikeMcC399 glad to see there is a workaround! Did you want to PR the updates into Cypress' contributing docs and Cypress documentation or would you like one of us to handle the updates?

@MikeMcC399
Copy link
Collaborator

@AtofStryker

glad to see there is a workaround!

👍🏻 🙂

Did you want to PR the updates into Cypress' contributing docs and Cypress documentation or would you like one of us to handle the updates?

I'm fine either way. If I'm going to submit any PRs about this I would probably wait a little for the dust to settle to see if there are any additional points to be covered. I haven't seen anybody else rushing to use Cypress with Ubuntu 24.04 so far, so I don't think that there will be many people going astray and if they look in the issues they will see the workarounds anyway.

So, please go ahead with PRs if you want, or let me know if you want me to submit PRs for review.

@AtofStryker
Copy link
Contributor Author

@AtofStryker

glad to see there is a workaround!

👍🏻 🙂

Did you want to PR the updates into Cypress' contributing docs and Cypress documentation or would you like one of us to handle the updates?

I'm fine either way. If I'm going to submit any PRs about this I would probably wait a little for the dust to settle to see if there are any additional points to be covered. I haven't seen anybody else rushing to use Cypress with Ubuntu 24.04 so far, so I don't think that there will be many people going astray and if they look in the issues they will see the workarounds anyway.

@MikeMcC399 I believe this is the correct approach. We can wait for the dust to settle and then update our documentation in cypress-documentation and our contributing docs.

I would say cypress-io/cypress-documentation#5816 is a higher priority than the contributing documentation updates mentioned in cypress-io/cypress#29319 since it is a direct blocker for those running Cypress.

So, please go ahead with PRs if you want, or let me know if you want me to submit PRs for review.

If you are willing to own this, then please proceed when you feel the dust has settled. However, I don't want to put more on your plate if you are unable to PR the updates. You already do quite a lot as an OSS contributor to our projects! So if it's an issue, just let us know!

@MikeMcC399
Copy link
Collaborator

@AtofStryker

I would say cypress-io/cypress-documentation#5816 is a higher priority than the contributing documentation updates mentioned in cypress-io/cypress#29319 since it is a direct blocker for those running Cypress.

Good point!

So, please go ahead with PRs if you want, or let me know if you want me to submit PRs for review.

apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb

I checked this on Ubuntu 24.04 Desktop running under VMware Workstation. The commands ran without issue and Cypress 13.8.1 also ran without issue. Several of the packages were already installed by default on the Desktop edition.

I also ran it on Ubuntu 24.04 Server under VMware Workstation. The package installation commands also ran without issue and showed that on the server edition these packages are not installed by default. Cypress did run successfully however I saw some minor issues like missing a font for the check-box symbol. I haven't followed this up. It would be great if you cross-checked with the Docker image instead of me trying to get the server working error-free under VMware Workstation.

If you are willing to own this, then please proceed when you feel the dust has settled. However, I don't want to put more on your plate if you are unable to PR the updates. You already do quite a lot as an OSS contributor to our projects! So if it's an issue, just let us know!

That's fine. I'll hang back with submitting a PR for changes for the Contributors' document. I could submit this first as draft and let it soak for a week or two.

I'm reading in https://github.com/actions/runner-images that GitHub plans to have a beta version of a Ubuntu 24.04 runner available mid May 2024 with GA in August 2024 which gives a rough idea of their schedules.

@AtofStryker
Copy link
Contributor Author

I also ran it on Ubuntu 24.04 Server under VMware Workstation. The package installation commands also ran without issue and showed that on the server edition these packages are not installed by default. Cypress did run successfully however I saw some minor issues like missing a font for the check-box symbol. I haven't followed this up. It would be great if you cross-checked with the Docker image instead of me trying to get the server working error-free under VMware Workstation.

@MikeMcC399 was this in open or run mode in docker? I'm guessing run mode since you would need to attach a display. From my end npx cypress run looks as expected in the terminal. Is this what you are referring to?

@MikeMcC399
Copy link
Collaborator

@AtofStryker

was this in open or run mode in docker? I'm guessing run mode since you would need to attach a display. From my end npx cypress run looks as expected in the terminal. Is this what you are referring to?

I was using the kitchensink repo and npm run local:run which uses Cypress run mode.
I didn't use Docker and I didn't have any display attached, so it was pure Ubuntu.

If you are running correctly using Docker, then that's good enough for me!

CONTRIBUTING.md Outdated
@@ -65,6 +65,8 @@ In general, `factory/.env` master should contain the latest versions we official

![](https://github.com/cypress-io/cypress/assets/1271364/85507060-acc3-48b5-bc16-4160c4620e1e)

If you need to test that the image works with Cypress, you can follow this [gist](https://gist.github.com/AtofStryker/da2e94e8535cffeebf676b6399f96b47) if on a MacOS machine which might prove helpful when debugging image dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we move the gist to a more official location? Or add the contents in here directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think gists can only be created by users, but we can add the contents directly here if we think thats the right direction. I'll go ahead and do that since i'm fine with either

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in a3aab3e

@AtofStryker AtofStryker merged commit 2ec8ae0 into master Apr 30, 2024
31 checks passed
@AtofStryker AtofStryker deleted the chore/add_ubuntu_24_image branch April 30, 2024 19:22
@MikeMcC399
Copy link
Collaborator

PRs submitted for documentation are:

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

4 participants