openverse-frontend
openverse-frontend copied to clipboard
Playwright logs are too verbose
Description
Currently, it is very difficult to read through the CI Playwright logs because they are too verbose.
- There are talkback proxy logs for each tape that is found. Unfortunatly, it is not possible to only log the not-found tapes, so all of the tapes are being logged. It is much easier to run the tests with
update_tapesset to true to see which tapes were added than it is to see which tapes are missing from the logs. We should setsilent: truein the talkback options. - There are lots of warnings about authentication requests failing. I'm not sure what the best way of silencing them is, but they take up a lot of vertical space in the CI logs.
Request exception
``` [WebServer] playwright_1 | WARN $sentry.captureException() called, but Sentry plugin is disabled. Arguments: [ playwright_1 | [AxiosError: Unable to retrieve API token. Request failed with status code 401] { playwright_1 | code: 'ERR_BAD_REQUEST', playwright_1 | config: { playwright_1 | transitional: [Object], playwright_1 | adapter: [Function: httpAdapter], playwright_1 | transformRequest: [Array], playwright_1 | transformResponse: [Array], playwright_1 | timeout: 30000, playwright_1 | xsrfCookieName: 'XSRF-TOKEN', playwright_1 | xsrfHeaderName: 'X-XSRF-TOKEN', playwright_1 | maxContentLength: -1, playwright_1 | maxBodyLength: -1, playwright_1 | env: [Object], playwright_1 | validateStatus: [Function: validateStatus], playwright_1 | headers: [Object], playwright_1 | baseURL: 'http://localhost:49153/v1/', playwright_1 | method: 'post', playwright_1 | url: 'auth_tokens/token/', playwright_1 | data: 'client_id=Reproduction
Look at the CI Playwright logs.
Screenshots
Resolution
- [ ] 🙋 I would be interested in resolving this bug.
What I resolved to do locally was to comment out the console.error of the request in api-token.server.ts file.
https://github.com/WordPress/openverse-frontend/blob/5f9cecc1530fe230e8eabbb93f4474bd0fe2920c/src/plugins/api-token.server.ts#L101
And also stop the logs from explicit calls to Sentry when is disabled, it's an annoying message too because is not actionable. I'll create a PR for this in a moment.
For the first, it would be nice if we could stop the api-token logs in dev mode with an environment variable or something like that.
The logs are much more concise now, so we can close this issue.