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

ci: prevent detox E2E lock failure #11186

Merged
merged 3 commits into from
Sep 12, 2024
Merged

Conversation

cortisiko
Copy link
Member

@cortisiko cortisiko commented Sep 12, 2024

Description

The purpose of this PR is to address the recent flakiness we noticed in CI as it relates to detox failing with this type of error:

/Users/vagrant/git/node_modules/proper-lockfile/lib/lockfile.js:181
        onCompromised: (err) => { throw err; },
                                  ^
Error: Unable to update lock within the stale threshold
    at /Users/vagrant/git/node_modules/proper-lockfile/lib/lockfile.js:109:21
    at newFs.<computed> [as utimes] (/Users/vagrant/git/node_modules/proper-lockfile/lib/adapter.js:20:13)
    at Timeout._onTimeout (/Users/vagrant/git/node_modules/proper-lockfile/lib/lockfile.js:100:20)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7) {
  code: 'ECOMPROMISED'
}

This issue is on Detox's side. To remedy the issue I did two main things:

  1. I applied a patch to Detox's Node module to help reduce test failures caused by the above failure. I increased the lock timeout to 20 seconds.
  2. Before each run, I reset the detox lock file: detox reset-lock-file.

After three runs on Bitrise

, the pipeline seemed much more stable than the main branch, which failed on every run.

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@cortisiko cortisiko added No QA Needed Apply this label when your PR does not need any QA effort. Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 12, 2024
@cortisiko cortisiko self-assigned this Sep 12, 2024
Copy link

@cortisiko cortisiko marked this pull request as ready for review September 12, 2024 21:18
@cortisiko cortisiko requested review from a team as code owners September 12, 2024 21:18
@cortisiko cortisiko added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 12, 2024
Copy link
Contributor

github-actions bot commented Sep 12, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: dad1a5e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d656ca5a-d7b6-48d2-9a32-e085dc312210

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Lgtm

@cortisiko cortisiko merged commit 6dd3e43 into main Sep 12, 2024
44 of 47 checks passed
@cortisiko cortisiko deleted the ci/prevent-detox-lock-failure branch September 12, 2024 22:12
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
@metamaskbot metamaskbot added the release-7.32.0 Issue or pull request that will be included in release 7.32.0 label Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.32.0 Issue or pull request that will be included in release 7.32.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants