- Issue created by @catch
- Status changed to Needs review
19 days ago 8:23am 28 August 2024 - First commit to issue fork.
- ๐ฌ๐งUnited Kingdom catch
As well as the project ID being different, we're also running into both the yarn lint and phpstan caches using absolute paths.
Tried a rewrite as part of the pipeline process and it partially helps (i.e. phpstan fails to use the cache, but gives less criteria it failed by), but not enough:
https://git.drupalcode.org/issue/drupal-3470641/-/jobs/2585012
https://git.drupalcode.org/issue/drupal-3470641/-/jobs/2585008
Possible workaround mentioned here is to use bind mounts:
https://github.com/phpstan/phpstan/issues/8599#issuecomment-2059227168
e.g. we'd bind mount the current directory to /tmp/build, cd, do the composer install + run the linting jobs there both for the cache warming job and for the individual linting jobs - that way everything runs in the same directory as far as yarn and phpstan are concerned.
However to fully test that we'd need to commit the change to HEAD so that the cache warming job runs with the bind mount, then see what the effect on pipelines is after that. Can probably hack the API URLs to point to the pipeline instead of core just to make sure it doesn't break things, but not easy to demonstrate it actually works.
- Status changed to Needs work
19 days ago 7:16am 29 August 2024 - ๐ฌ๐งUnited Kingdom catch
Tried a bind mount but the user in the pipeline doesn't have permission to create one. This might need some help from infrastructure, i.e. can our k8s runner setup allow the bind mount, or can we do something there to have a consistent directory name?
- ๐บ๐ธUnited States cmlara
Since weโre on docker runners an over simplified possibility
mkdir /build; cp -Ria $CI_BUILD_DIR /build cd /build <execute as normal> cp -Ria anything_you_need_to_archive $CI_PROJECT_DIR