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

No Docker mode fails intermittently on CI #136

Open
g-elwell opened this issue Jul 4, 2024 · 1 comment
Open

No Docker mode fails intermittently on CI #136

g-elwell opened this issue Jul 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@g-elwell
Copy link
Member

g-elwell commented Jul 4, 2024

Describe the bug
When using the No Docker mode introduced in #109 CI can sometimes fail during the soft-reset which appears to be related to the database import not completing successfully.

I've tried several approaches to attempt to resolve this, the most promising is to run wp db reset prior to attempting to import a database during the soft-reset. However, CI still fails intermittently even when this is the case.

This issue does not affect running WP Cypress locally or in Docker on CI, it's limited to the No Docker mode which is likely not being widely used outside of Big Bite at the moment.

To Reproduce
Steps to reproduce the behavior:

  1. Follow steps outlined in Add No Docker Mode #109 to configure No Docker mode on a project
  2. Run the CI process
  3. If successful, re-trigger the process
  4. You should see intermittent failures

Expected behavior
No Docker mode should have consistent results when running on CI

Additional context
Contents of WP Cypress debug.log:

[2024-07-03T15:42:50.925Z] stdout: 6.5.4
 
[2024-07-03T15:42:51.752Z] stdout: Success: Current User set to admin
 
[2024-07-03T15:42:52.514Z] stdout: Success: Database reset.
 
[2024-07-03T15:42:53.178Z] stderr: ERROR 1062 (23000) at line 211 in file: '/tmp/db.sql': Duplicate entry '0' for key 'wp_options.PRIMARY'
 
[2024-07-03T15:42:53.249Z] stderr: ERROR 1062 (23000) at line 425 in file: '/tmp/db.sql': Duplicate entry '0' for key 'wp_posts.PRIMARY'
 
[2024-07-03T15:42:53.407Z] stderr: ERROR 1062 (23000) at line 714 in file: '/tmp/db.sql': Duplicate entry '0' for key 'wp_usermeta.PRIMARY'
 
[2024-07-03T15:42:53.420Z] stderr: ERROR 1062 (23000) at line 829 in file: '/tmp/db.sql': Duplicate entry '0' for key 'wp_users.PRIMARY'
 
[2024-07-03T15:42:53.425Z] stdout: Success: Imported from '/tmp/db.sql'.
 
[2024-07-03T15:42:53.805Z] stderr: Error: One or more database tables are unavailable. The database may need to be repaired.
 
[2024-07-03T15:42:53.811Z] Exited with code 1 

The tmp/db.sql file can be uploaded to CircleCI as an artifact by adding the following to .circleci/config.yml:

  - store_artifacts:
      when: always
      path: /tmp/db.sql
@g-elwell g-elwell added the bug Something isn't working label Jul 4, 2024
@ampersarnie
Copy link
Member

May be related to #81.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants