Problem/Motivation

Daily jobs and spell checking has got in a bit of mess since #3612933: Only run cspell on main and MRs that target main and #3620707: Skip the download caches job on weekly/daily pipelines. There is no way daily 11.x and 11.5.x can be green.

Currently 12.0.x daily "Write lint caches" job is passing because #3620707 partially reverted #3612933.

Daily 11.x and 11.5.x "Write lint caches" jobs are broken because the cspell cache is not created.

See:

Proposed resolution

Ensure the cspell job only runs on main and fix the write lint caches job to only upload the cspell cache when on the main branch.

Remaining tasks

None

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3631912

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

alexpott created an issue. See original summary.

alexpott’s picture

Title: There is no way daily 11.x and 11.5.x can be green » Fix spell checking only on main and the write lint caches job
Issue summary: View changes
alexpott’s picture

Issue summary: View changes

alexpott’s picture

Status: Active » Needs review

With this change we can see that the write lint caches job is green on 11.x - https://git.drupalcode.org/project/drupal/-/jobs/12982657 - yes we get a warning about cspell cache not existing but that's correct - it does not.

alexpott’s picture

Issue summary: View changes
alexpott’s picture

This is a different fix for #3625788: Fix failing "Write lint caches" jobs on 11.x that I feel is more correct.

alexpott’s picture

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

I see the .cspellcache being uploaded correctly to the artifacts on the main MR: https://git.drupalcode.org/project/drupal/-/jobs/12982505

$ if [ ! -f core/phpstan-tmp/resultCache.php ]; then exit 1; fi
$ if [ "$CI_COMMIT_BRANCH" = "main" ] || [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" = "main" ]; then # collapsed multi-line command
$ if [ ! -f core/.eslintcache ]; then exit 1; fi
$ if [ ! -f core/.stylelintcache ]; then exit 1; fi
$ if [ ! -f core/.phpcscache ]; then exit 1; fi
$ if [ ! -f core/.twigcsfixercache ]; then exit 1; fi
$ if [ -d vendor ]; then tar -czf vendor.tar.gz vendor; fi
$ if [ ! -f vendor.tar.gz ]; then exit 1; fi
Uploading artifacts for successful job
00:03
Uploading artifacts...
core/phpstan-tmp/resultCache.php: found 1 matching artifact files and directories 
core/.cspellcache: found 1 matching artifact files and directories 
core/.eslintcache: found 1 matching artifact files and directories 
core/.stylelintcache: found 1 matching artifact files and directories 
core/.phpcscache: found 1 matching artifact files and directories 
core/.twigcsfixercache: found 1 matching artifact files and directories 
vendor.tar.gz: found 1 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  correlation_id=2697633800 id=12982505 status=201 token=69_pTMLbC

On 11.x/12.0.x, the .cspellcache is not uploaded, because it doesn't exist. There is a warning, but it does not cause the job to fail
12.0.x

Uploading artifacts for successful job
00:02
Uploading artifacts...
core/phpstan-tmp/resultCache.php: found 1 matching artifact files and directories 
WARNING: core/.cspellcache: no matching files. Ensure that the artifact path is relative to the working directory (/builds) 
core/.eslintcache: found 1 matching artifact files and directories 
core/.stylelintcache: found 1 matching artifact files and directories 
core/.phpcscache: found 1 matching artifact files and directories 
core/.twigcsfixercache: found 1 matching artifact files and directories 
vendor.tar.gz: found 1 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  correlation_id=2700577816 id=12982823 status=201 token=69_1KctCM

11.x

$ if [ ! -f core/phpstan-tmp/resultCache.php ]; then exit 1; fi
$ if [ "$CI_COMMIT_BRANCH" = "main" ] || [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" = "main" ]; then # collapsed multi-line command
$ if [ ! -f core/.eslintcache ]; then exit 1; fi
$ if [ ! -f core/.stylelintcache ]; then exit 1; fi
$ if [ ! -f core/.phpcscache ]; then exit 1; fi
Uploading artifacts for successful job
00:02
Uploading artifacts...
core/phpstan-tmp/resultCache.php: found 1 matching artifact files and directories 
WARNING: core/.cspellcache: no matching files. Ensure that the artifact path is relative to the working directory (/builds) 
core/.eslintcache: found 1 matching artifact files and directories 
core/.stylelintcache: found 1 matching artifact files and directories 
core/.phpcscache: found 1 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  correlation_id=149529471 id=12982657 status=201 token=69_8kuDLx
Cleaning up project directory and file based variables

Also looks like this may need a backport to 11.5.x: https://git.drupalcode.org/project/drupal/-/pipelines/1009196

lgtm.

  • catch committed 69d79039 on 11.5.x
    fix: #3631912 Fix spell checking only on main and the write lint caches...

  • catch committed dea404cb on 12.0.x
    fix: #3631912 Fix spell checking only on main and the write lint caches...

  • catch committed e0107674 on main
    fix: #3631912 Fix spell checking only on main and the write lint caches...
catch’s picture

Version: main » 11.5.x-dev
Status: Reviewed & tested by the community » Fixed

This looks fine to me, let's get the pipelines back to green. If we want to tweak exactly which branches cspell runs against we can do that in another issue another time etc.

Committed/pushed to main and cherry-picked back through to 11.5.x.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed a12e9745 on 11.x
    fix: #3631912 Fix spell checking only on main and the write lint caches...
catch’s picture

Version: 11.5.x-dev » main
Status: Fixed » Active

This doesn't appear to have fixed things, can't yet tell if it's the same issue unfixed or a new issue, e.g. https://git.drupalcode.org/project/drupal/-/pipelines/1019860

alexpott’s picture

Status: Active » Needs work

Oh of course... we're not running spell-checking jobs on main when it is scheduled... and we need to. Creating an MR...

alexpott’s picture

Status: Needs work » Needs review
alexpott’s picture

I'd merged the latest MR to main and 12.0.x to keep .gitlab-ci.yml in sync to make things easier.

  • catch committed 74c96651 on main
    fix: #3631912 Fix spell checking only on main and the write lint caches...

  • catch committed 331057c9 on 12.0.x
    fix: #3631912 Fix spell checking only on main and the write lint caches...
catch’s picture

Version: main » 12.0.x-dev
Status: Needs review » Fixed

Committing this from needs review to get scheduled pipelines back up and running again since it's trivial, thanks!

edit: and we're green (at least on the write lint caches job)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.