pantheon-systems / quicksilver-pushback

Push any commits made on the Pantheon dashboard back to the original GitHub repository.
MIT License
14 stars 13 forks source link

Getting Error on pushback to bitbucket. #14

Open jdelon02 opened 4 years ago

jdelon02 commented 4 years ago

I am hitting an issue whenever I commit to pantheon and the workflow tries to push changes back to Bitbucket. I have tokens.json setup as recommeded by Aaron Bauman using user/pass because Bitbucket does not allow token. The error I am getting is:

------ Operation: Push changes back to BitBucket if needed finished in 60s (dev) ------ Operation exceeded maximum execution time of 120 seconds.

I edited pantheon.yml to change from saying github -> bitbucket, but that was the only file I was changing for testing.

ioskevich commented 4 years ago

I traced this issue to file_put_contents("$fullRepository/.gitignore", $gitignore_contents); - Was never able to get any further steps working past this function call. File: lean-repo-utils.php, push_back() function.

DrupalPhil commented 4 years ago

I'm getting this error with github, actually.

terminus build:secrets:list <site>.<env> returns the token as expected.

Based on other comments, I assumed github can rely on tokens exclusively.

ioskevich commented 4 years ago

Well, I am having time out with with push back to Github, so probably wrong place to report. But symptoms are exactly the same as described in the original issue.

I checked Github connection (by stopping script at certain points) - it was able to fetch GH repo, but was never able to pass file_put_contents("$fullRepository/.gitignore", $gitignore_contents) step - sometimes timing out at one of the passthru commands before it, sometime exactly at file_put_contents().

And my push-back.php is actually exactly the same as in this repo, I was just adding some debug statements here and there to be able to see the output.

I would definitely believe that the script itself is doing what is expected to do, it's just can't do this in 60 seconds Pantheon allows php to run. If it was called via cli, it would probably run OK and would complete its job in 2 minutes or so.

ioskevich commented 4 years ago

Here is my QuickSilver scripts folder.

pmu-289-quicksilver.zip