Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

isholgueras created an issue. See original summary.

wim leers’s picture

Priority: Normal » Critical
Issue tags: +DX (Developer Experience)

This is very disruptive.

penyaskito’s picture

For the MRs I'm working on this is failing like 90%. Pretty annoying.

penyaskito’s picture

Status: Active » Needs review

I think we should run prettier and eslint on tests, but as a separate job (which might be allowed to fail?)

penyaskito’s picture

Assigned: isholgueras » justafish
penyaskito’s picture

Please review. Do you agree we should spin-off prettier/eslint from this job?

wim leers’s picture

Title: Some playwright jobs are failing with test:prettier error. » Some playwright jobs are failing with `test:prettier` error
Status: Needs review » Reviewed & tested by the community

Posted my thoughts. Let's let @justafish decide.

What's certain: the CI results in HEAD are definitely not clear enough. I understand how @isholgueras ended up believing that playwright was broken in HEAD. It requires a very careful reading, because:

… all successes here!
  ✓  58 [firefox] › tests/src/Playwright/globalElements.spec.ts:52:7 › Global elements › Breadcrumbs (8.8s)
  ✓  59 [webkit] › tests/src/Playwright/globalElements.spec.ts:52:7 › Global elements › Breadcrumbs (9.4s)
  59 passed (1.3m)
ERROR: "test:prettier" exited with 1.

… it's really just that one ERROR: … line, that isn't even in red!

Perhaps the better alternative solution is to run prettier first, and hence refuse to run the tests altogether unless the code style requirements are met. Then at least there isn't an ocean of "yay"s followed by a tiny "nay".

Doing a separate job would also allow reporting the code style checking results in a way that GitLab CI presents them correctly. Quoting the UI eslint CI job:

    - node_modules/.bin/eslint . --format=junit --output-file=$CI_PROJECT_DIR/ui-eslint-junit.xml --max-warnings=0
  artifacts:
    expose_as: junit
    expire_in: 6 mos
    when: always
    name: artifacts-$CI_PIPELINE_ID-$CI_JOB_NAME_SLUG
    paths:
      - ui-eslint-junit.xml
    reports:
      junit: ui-eslint-junit.xml

👆 That's what's missing. And we can't combine that into the playwright CI job, because it already needs to report actual test results; code style results are a different consideration.

wim leers’s picture

Title: Some playwright jobs are failing with `test:prettier` error » The `playwright` CI job is also checking code style, but a failure is easily missed
lauriii’s picture

Perhaps the better alternative solution is to run prettier first, and hence refuse to run the tests altogether unless the code style requirements are met. Then at least there isn't an ocean of "yay"s followed by a tiny "nay".

It doesn't seem right that the tests shouldn't run due to prettier errors. There's nothing more annoying than to not get test results because of a silly code style error. Having a separate job would solve this.

wim leers’s picture

#10: I know, I agree, which is what I wrote immediately after what you quoted 😉 I was merely acknowleding the infrastructure (and hence ecological) impact.

justafish’s picture

Thanks for opening and fixing this so quickly!

However, we have already split these jobs up in https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...

If you're happy with the implementation above I'll close this one

justafish’s picture

and also for a bit of background, it's because prettier and eslint in those forms (i.e. from the top level package.json) were only running on the Playwright tests as we have yet to reconcile this with the ui folder. However in the MR above it's now running on the new cli workspace too.

penyaskito’s picture

I'd still merge this as it fixes the prettier error + HEAD is actually broken while that MR has a larger scope + draft MR + needs reviews.
Let's unblock merging the beta blockers 🙏🏽

wim leers’s picture

#14++

wim leers’s picture

Assigned: justafish » Unassigned
Issue summary: View changes

Got @justafish's +1 to go ahead and get HEAD green again, because

wim leers’s picture

Status: Reviewed & tested by the community » Fixed
wim leers’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.