Random patch-package failures on CI
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 325
- PR merge metrics
- No merged PRs in 30d
Description
I've tried the tips described in the readme and in one of the issues about creating a checksum of the `patches` folder but to no luck, I still keep getting random failures from `patch-package` on CircleCI. It's always the same package that fails, which is weird as well.
Any tips? I feel like I've tried everything, changing cache keys, trying to create a new patch file, the checksums..
The CircleCI config looks something like this with custom commands for loading/saving the cache
```
commands:
save_yarn_cache:
steps:
- save_cache:
key: &yarn_cache_key modules-v8-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
paths:
- ~/.cache/yarn
- node_modules
yarn_install:
description: 'Restore cache, run yarn install, and save cache'
steps:
- run:
name: Create patched package checksum
command: md5sum patches/* > patches.hash
- restore_yarn_cache
- run:
name: Yarn Install
command: yarn install --frozen-lockfile
- save_yarn_cache
```
The error:
```
**ERROR** Failed to apply patch for package apollo-server-cache-redis at path
node_modules/apollo-server-cache-redis
This error was caused because patch-package cannot apply the following patch file:
patches/apollo-server-cache-redis+1.2.2.patch
Try removing node_modules and trying again. If that doesn't work, maybe there was
an accidental change made to the patch file? Try recreating it by manually
editing the appropriate files and running:
patch-package apollo-server-cache-redis
If that doesn't work, then it's a bug in patch-package, so please submit a bug
report. Thanks!
********github.com/ds300/patch-package/issues
error Command failed with exit code 1.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.