Automattic / wp-e2e-tests

Automated end-to-end tests for WordPress.com

Home Page:https://github.com/Automattic/wp-calypso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate magellan permissions error in CircleCI

alisterscott opened this issue · comments

See: https://circleci.com/gh/Automattic/wp-e2e-tests-for-branches/7681

env: ./node_modules/.bin/magellan: Permission denied Exited with code 126

@hoverduck would you have any hints to what this may be:

#!/bin/bash -eo pipefail
cd wp-e2e-tests && ./run.sh -R ${testFlag--C} $RUN_ARGS
env: ./node_modules/.bin/magellan: Permission denied
Exited with code 126

I've only seen it on CircleCI and only sometimes: https://circleci.com/gh/Automattic/wp-e2e-tests-for-branches/7758

No idea...is it only on the wrapper repos? The core repo should have node_modules stored in its cache, which I would hope would avoid this issue.

The only thing I can think is to add more logging. Print out your current directory, a long listing of node_modules/.bin.

If it is just the wrapper repos you could also explore caching the node_modules directory on those projects as well to see if that helps.

126 is the shell code for "this thing isn't executable". Seems like somehow the magellan script isn't getting a chmod +x when it gets installed?

You might try invoking it with npx --no-install magellan, which might work around the lack of an executable bit? Or node node_modules/.bin/magellan ..., which is mostly the same.

Thanks for the suggestion @blowery

I think caching the node_modules which you've done may help, otherwise if we see it again I will try your suggestions

I've tried directly making this file executable in CircleCI and the runs so far seem ok: Automattic/wp-e2e-tests-canary#13