Comments (5)
I am sure this is the race condition as I initially described. Here is the log output of another run that worked:
PHP version is 7.2.34-21+ubuntu18.04.1+deb.sury.org+1
Operating system is linux
Cache primary key is linux-php-7.2.34-21+ubuntu18.04.1+deb.sury.org+1-locked-bac6c14ffff580a04a4fea1394e68aa862bb682755fbc9d2277682591500a408-
Cache restore keys are: linux-php-7.2.34-21+ubuntu18.04.1+deb.sury.org+1-locked-bac6c14ffff580a04a4fea1394e68aa862bb682755fbc9d2277682591500a408-, linux-php-7.2.34-21+ubuntu18.04.1+deb.sury.org+1-locked-
/usr/local/bin/composer install --no-interaction --no-progress --ansi
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Received 49209747 of 49209747 (100.0%), 123.8 MBs/sec
Cache Size: ~47 MB (49209747 B)
/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/bba28022-b2f5-403f-9ceb-305964208faf/cache.tzst -P -C /home/runner/work/REPO/REPO
Cache restored successfully
Cache restored from key: linux-php-7.2.34-21+ubuntu18.04.1+deb.sury.org+1-locked-bac6c14ffff580a04a4fea1394e68aa862bb682755fbc9d2277682591500a408-
Package operations: 186 installs, 0 updates, 0 removals
- Syncing webfactory/wfdynamic (3.1.0) into cache
You can see that /usr/local/bin/composer install --no-interaction --no-progress --ansi
comes before Cache restored successfully
, but this time, the cache was quick enough to be restored before Composer did any git clone
operations.
I have no experience with TypeScript or asynchronous programming in JavaScript.
That being said, here is the code from https://github.com/actions/cache that you require()
in src/cache/factory.ts
:
The run()
call seems to trigger the actual cache restore code; but since that is async, it might take a while to complete. Does run()
return a promise in this case, but that promise is never exported from the module?
If that is the case, what does this code here
composer-install/src/cache/factory.ts
Line 5 in 22e6d1c
from composer-install.
I have no experience with TypeScript or asynchronous programming in JavaScript.
My experience is also limited, but I think calling attention to the fact that there's absolutely asynchronous operations going on here points to a likely smoking gun.
In the code you pointed out, I thought the await
told it to wait, but that does seem in conflict with the async
keyword. I'll check with some folks who know more about how JS works so I can get this to be more synchronous.
Thanks!
from composer-install.
Awesome. IMHO the run()
in the restore.js
file from actions/Core
looks suspicious, since it seems to return a promise that we never get hold of.
That might be very difficult to fix, since it would require tweaking upstream code.
Looking forward to hearing from you 👨🏻💻
from composer-install.
we are also running in spurious errors which look like race-conditions to me. any progress on this front?
from composer-install.
This is fixed in v2, please upgrade using ramsey/composer-install@v2
or ramsey/[email protected]
. Details are available on the release announcement and the README.
Thanks!
from composer-install.
Related Issues (20)
- Heads-up: upcoming (helpful) change in setupPHP HOT 1
- Do not depend on awk and perl
- CI `run` job only tests with lock files HOT 5
- Support `composer-bin` commands like `composer bin [folder] install` HOT 4
- failed to open stream HOT 1
- Cannot find composer.json HOT 4
- Yaml is invalid? HOT 5
- Error: The process '/usr/local/bin/composer' failed with exit code 1 HOT 4
- Add `retries:` input HOT 2
- Add `--no-audit` to default options used ? HOT 1
- Better cache busting when using `dependency-versions: 'highest'` HOT 3
- `set-output` function is deprecated HOT 1
- "Could not authenticate against github.com" HOT 2
- Ability to swap out actions/cache for the faster alternative buildjet/cache HOT 1
- Failure to restore cache causes the GitHub Action step to run indefinitely HOT 8
- File "./composer.json" cannot be found in the current directory HOT 2
- locked version vs. missing lock file HOT 1
- Misleading error message when validate_composer fails due to missing HOME/COMPOSER_HOME HOT 1
- Switch to actions/cache@v4
- [support] Create new tagged release HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composer-install.