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

Release performance tests are failing since v14.8.0 #48920

Closed
WunderBart opened this issue Mar 8, 2023 · 6 comments · Fixed by #49068
Closed

Release performance tests are failing since v14.8.0 #48920

WunderBart opened this issue Mar 8, 2023 · 6 comments · Fixed by #49068
Assignees
Labels
GitHub Actions Pull requests that update GitHub Actions code [Type] Bug An existing feature does not function as intended [Type] Performance Related to performance efforts

Comments

@WunderBart
Copy link
Member

The release performance tests have been failing since 14.8.0 RC (Dec 14). Let's fix that.

/cc @youknowriad @dmsnell

@WunderBart WunderBart added [Type] Performance Related to performance efforts GitHub Actions Pull requests that update GitHub Actions code labels Mar 8, 2023
@WunderBart WunderBart self-assigned this Mar 8, 2023
@WunderBart
Copy link
Member Author

Looks like the manual dispatch (custom perf comparison) jobs are failing as well: https://github.com/WordPress/gutenberg/actions/workflows/performance.yml?query=event%3Aworkflow_dispatch

@dmsnell
Copy link
Member

dmsnell commented Mar 9, 2023

I'm getting these errors when running the tests but I'm not certain if those are because I'm running them over an SSH connection to my laptop. I'll confirm later.

Failed to fire hook: while creating logrus local file hook: user: Current requires cgo or $USER set in environment
WARNING: Some service image(s) must be built from source by running:
    docker compose build %s wordpress

@dmsnell
Copy link
Member

dmsnell commented Mar 9, 2023

On a separate server I don't see those errors, but the tests in trunk fail here:

Error: ENOENT: no such file or directory, copyfile '/tmp/ef9cab1c-9634-4822-99ef-5db9b93a8751/tests/packages/e2e-tests/specs/performance/post-editor.test.results.json' -> './__test-results/tests/measure-perf-test-runtimes_post-editor_run-0.results.json'
    at Object.copyFileSync (node:fs:2884:3)
    at runTestSuite (/home/exouser/gutenberg/bin/plugin/commands/performance.js:208:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runPerformanceTests (/home/exouser/gutenberg/bin/plugin/commands/performance.js:414:33)
    at async Command.<anonymous> (/home/exouser/gutenberg/bin/plugin/cli.js:11:4) {
  errno: -2,
  syscall: 'copyfile',
  code: 'ENOENT',
  path: '/tmp/ef9cab1c-9634-4822-99ef-5db9b93a8751/tests/packages/e2e-tests/specs/performance/post-editor.test.results.json',
  dest: './__test-results/tests/measure-perf-test-runtimes_post-editor_run-0.results.json'
}

@WunderBart
Copy link
Member Author

I'm getting these errors when running the tests but I'm not certain if those are because I'm running them over an SSH connection to my laptop. I'll confirm later.

Failed to fire hook: while creating logrus local file hook: user: Current requires cgo or $USER set in environment
WARNING: Some service image(s) must be built from source by running:
    docker compose build %s wordpress

Did you get to resolve it? I'm actually facing the same issue

@WunderBart
Copy link
Member Author

WunderBart commented Mar 13, 2023

I've triggered a release job manually from the refactor/perf-test-results-path branch (PR #48684) and got more info about the issue:

FAIL packages/e2e-tests/specs/performance/post-editor.test.js (219.513 s)


  ● Test suite failed to run

    ENOENT: no such file or directory, open '/home/runner/work/gutenberg/gutenberg/artifacts/post-editor_wp/6.1_run-0.performance-results.json'

      26 | 		path.basename( testFilename, '.js' ) + '.performance-results.json';
      27 |
    > 28 | 	return writeFileSync(
         | 	       ^
      29 | 		path.join( process.env.WP_ARTIFACTS_PATH, resultsFilename ),
      30 | 		JSON.stringify( results, null, 2 )
      31 | 	);

Looks like it's caused by branch names like release/15.2 that break the filename because the slash is not escaped. I'll see if kebab-casing it will suffice.

@WunderBart
Copy link
Member Author

WunderBart commented Mar 14, 2023

Sanitizing the branch name to be used in a path did the trick.

Let me know if we should extract that fix from #48684. It is related to other changes in that PR, so it wouldn't be unreasonable to keep it there, IMO.

/cc @youknowriad

Edit: also added the fix in #49068

@WunderBart WunderBart added the [Type] Bug An existing feature does not function as intended label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Actions Pull requests that update GitHub Actions code [Type] Bug An existing feature does not function as intended [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants