Closed wtachau closed 1 year ago
FYI the debug logs are 50MB but I am happy to send them :)
@wtachau Is this an issue with running tests in Azure or in Github Actions?
Github Actions!
Oh sorry, I realize the title was confusing (I just copied it over from the previous issue). Updated it to be more accurate.
Ah gottchya! No worries. Can you please share you general CI setup? The debug logs without context to how this is set up and how you are running cypress don't help a ton by them selves.
Hi Emily, no problem. See below:
name: Integration Tests
on:
push:
branches:
- 'main'
pull_request:
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GOOGLE_OAUTH_CLIENT_ID: foo
GOOGLE_OAUTH_CLIENT_SECRET: bar
DATABASE_URL: postgresql://postgres:password@localhost/map_local_test?schema=public
DATABASE_TEST_URL: postgresql://postgres:password@localhost/map_local_test?schema=public
DIRECT_URL: postgresql://postgres:password@localhost/map_local_test?schema=public
jobs:
Cypress:
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: map_local_test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Checkout
uses: actions/checkout@v3
- name: Setup database
run: yarn && yarn migrate
- name: Cypress tests
uses: cypress-io/github-action@v4
with:
command: yarn cypress
record: false
FYI I confirmed that downgrading to cypress 12.5.1 fixed this for me
@wtachau
FYI I confirmed that downgrading to cypress 12.5.1 fixed this for me
Interesting you found a workaround!
- name: Cypress tests uses: cypress-io/github-action@v4 with: command: yarn cypress record: false
Just by the way: the latest version of the action is called with cypress-io/github-action@v5
. I don't expect that to change anything significant with regard to this issue, but new fixes only flow into the v5
version. v4
is effectively frozen.
Ah, good to know, thank you!
@wtachau
Did you check that the runner you are using fits the Cypress Hardware dimensioning recommendations?
If you are using a GitHub-hosted runner, you can find the specs on Supported runners and hardware resources.
Here is the runner information:
Current runner version: '2.303.0'
Operating System
Ubuntu
[2](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:2)2.04.2
LTS
Runner Image
Image: ubuntu-22.04
Version: 202[3](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:3)0326.2
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230326.2/images/linux/Ubuntu220[4](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:4)-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230326.2
Runner Image Provisioner
2.0.139.1
GITHUB_TOKEN Permissions
Actions: read
Checks: read
Contents: read
Deployments: read
Discussions: read
Issues: read
Metadata: read
Packages: read
Pages: read
PullRequests: read
RepositoryProjects: read
SecurityEvents: read
Statuses: read
Secret source: Dependabot
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/setup-node@v3' (SHA:64ed1c7eab4cce3362f8c340dee64e[5](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:5)eaeef8f7c)
Download action repository 'actions/checkout@v3' (SHA:8f4b7f848[6](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:7)4484a[7](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:8)bf31766abe9204da3cbe65b3)
Download action repository 'cypress-io/github-action@v4' (SHA:d79d2d530a66e641eb4a5f227e13bc9[8](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:9)5c60b[9](https://github.com/nemo-org/map/actions/runs/4599540148/jobs/8125030508#step:1:10)64)
Complete job name: Cypress
Since we're also running Postgres in a service container, perhaps we should have 3 CPUs? Otherwise it looks like the hardware specifications for Github are sufficient.
Even if that's the case, it seems undesirable for the upgrade from 12.5.1 to 12.9.0 to start causing all these logs with the out-of-the-box Github Actions configuration (runs-on: ubuntu-latest
).
@wtachau When these logs are occurring, are they just on start-up or throughout then entire test duration? Did you start to experience this issue after upgrading to 12.9.0 from 12.5.1 or what prompted looking at downgrading?
I am curious when this started because it looks like your Github Actions executor is using ubuntu-latest
which is updated weekly per the actions/runner-images release candace.
This error appear to be possibly related to https://bbs.archlinux.org/viewtopic.php?id=236020 given this is a linux distribution. It seems "harmless" and related to the linux setup, but not nice to hear it's slowing things down.
GPU acceleration is disabled for linux machines when launch Cypress, and should be disabled when launching the Electron browser, which is the default Cypress browser. Do you see these logs when testing in Chrome? (even if this isn't the long-term goal)
@wtachau
[3321:0403/230120.429185:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
Working to try and reproduce, but a simple project does not do it.
Since we're also running Postgres in a service container, perhaps we should have 3 CPUs? Otherwise it looks like the hardware specifications for Github are sufficient.
This is an operating system error rather than a Cypress error. If you can't reproduce it with a simple project and you are getting the error only on full load then it may be a dimensioning issue. It sounds like you are running with the default Ubuntu hardware:
Hardware specification for Windows and Linux virtual machines:
which is less than the recommended for your case, as you implied.
Do you have the possibility to use GitHub's Larger runners?
When these logs are occurring, are they just on start-up or throughout then entire test duration? They are throughout the entire test duration.
Did you start to experience this issue after upgrading to 12.9.0 from 12.5.1 or what prompted looking at downgrading? We actually started seeing this on an unrelated commit (a short front-end change), thought it was around the same time, which led to the speculation about downgrading Cypress. That seemed to have worked, though.
I have not tried running these tests in headless Chrome— I will try and report back.
We do have the ability to use Github's larger runners, though we haven't enabled them yet— we are trying to be cost-conscious, and until recently the standard runners were totally fine. It's also worth mentioning we have't added any Cypress tests recently, so I don't imagine running the tests has become more intensive.
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.
Current behavior
Running Cypress on Github Actions, I get a ton of errors like:
It does not fail the tests, but does appear to make them slower (because of all the logging).
Desired behavior
In this situation, Cypress should not show these logs.
Test code to reproduce
Working to try and reproduce, but a simple project does not do it.
Cypress Version
12.9.0
Node version
18
Operating System
Ubuntu 22.04.2
Debug Logs
Other
This is a follow-up to this issue: https://github.com/cypress-io/cypress/issues/23641