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

On COE, avoid using the path "//tmp" #16

Open pcrm-karen opened 4 years ago

pcrm-karen commented 4 years ago

quicksilver-pushback has not worked for me since our site was upgraded to COE. I asked in the Pantheon Slack, and @greg-1-anderson suggested that the path //tmp/pushback-workdir may be failing.

He also mentioned referencing BUGS-3312.

Thanks!

KurtTrowbridge commented 4 years ago

Confirmed here as well, with the same error @pcrm-karen mentioned in Slack (thank you for raising that, by the way! I wouldn't have made the connection to COE at all without it) found when reviewing terminus workflow:info:logs:

::::::::::::::::: Info :::::::::::::::::
We are going to check out master from [redacted], branch from 1c04fca94f5e023e3e19604a06ab185ea2d8d662 and cherry-pick b372dfb28e991adf496f53ededc0bbf6c3701941 onto it
Cloning into '//tmp/pushback-workdir/scratchRepository'...
fatal: unable to access '[redacted]': Could not resolve host: [redacted]@bitbucket.org
git rev-parse HEAD
git fetch --unshallow
fatal: cannot change to '//tmp/pushback-workdir/scratchRepository': No such file or directory
Comment is '[my commit message]' and author is 'Kurt Trowbridge <kurt@[redacted]>' and date is '1597806689'
Creating a new branch, 'b372dmaster', because the master branch cannot be pushed to directly.
git checkout -B b372dmaster 1c04fca94f5e023e3e19604a06ab185ea2d8d662
fatal: cannot change to '//tmp/pushback-workdir/scratchRepository': No such file or directory

Warning: file_get_contents(//tmp/pushback-workdir/scratchRepository/.gitignore): failed to open stream: No such file or directory in /code/web/private/scripts/quicksilver/quicksilver-pushback/lean-repo-utils.php on line 202
::::::::::::::::: .gitignore :::::::::::::::::

git add .
FAILED with 128
'git commit' did not add a commits. Status code: 128
greg-1-anderson commented 4 years ago

I haven't tried this myself, but if anyone has a little time to do some testing, please try pulling in pantheon-systems/quicksilver-pushback:dev-fix-tmp-path and see if it resolves this problem.

greg-1-anderson commented 4 years ago

c.f. #17

pcrm-karen commented 4 years ago

I tried the fix and pushback is still not working. However, I'm now getting the following error:

Warning: mkdir(): No such file or directory in /code/web/private/scripts/quicksilver/quicksilver-pushback/push-back.php on line 35

It looks like the directory it's trying to create at line 35 has /tmp in the path twice.

greg-1-anderson commented 4 years ago

Whoops. Removed one of the /tmps

pcrm-karen commented 4 years ago

The error is gone, but pushback is still not working. The repository root also has the double slashes. Could that be the issue?

Enter push-back. Repository root is //code.

greg-1-anderson commented 4 years ago

I'm not sure if the double slashes are a problem or not. They definitely do work in many contexts, but may fail in others.

Have you tried determining the cause of fatal: unable to access '[redacted]': Could not resolve host: [redacted]@bitbucket.org? That could also be an issue.

greg-1-anderson commented 4 years ago

I added another commit to canonicalize more double-slash paths, just to be sure.

pcrm-karen commented 4 years ago

I tried again and pushback is still not working. I also don't have any errors to try to debug. The bitbucket error above is another user.

Enter push-back. Repository root is /code.
::::::::::::::::: Info :::::::::::::::::
We are going to check out workflow-update-1 from [redacted], branch from a35b4e0827096763710b9faac2c9dc34de0802e4 and cherry-pick 1bbaa48deaf0f71be17fb6b065ab2f536031f745 onto it
Cloning into '/tmp/pushback-workdir/scratchRepository'...
git rev-parse HEAD
Comment is 'Update site name' and author is '[redacted]' and date is '1597873062'
::::::::::::::::: .gitignore :::::::::::::::::

git add .
'git commit' did not add a commits. Status code: 128

Thanks for trying!

greg-1-anderson commented 4 years ago

If you look at the commit 1bbaa48deaf0f71be17fb6b065ab2f536031f745 in your Pantheon repository, what files do you see modified? From the commit comment it looks like you exported configuration; did all of your config changes make it into that commit?

pcrm-karen commented 4 years ago

I'm sorry for the late response, but I finally had time to look at the commit. I just made a small change to the site name config to test the push back, but the commit is in the Pantheon repository. I'm not sure what else to look at to figure out why this isn't working, so I'd appreciate any suggestions. Thanks!

$ git show 1bbaa48deaf0f71be17fb6b065ab2f536031f745
commit 1bbaa48deaf0f71be17fb6b065ab2f536031f745
Author: <redacted>
Date:   Wed Aug 19 21:37:42 2020 +0000

    Update site name

diff --git a/config/system.site.yml b/config/system.site.yml
index cad2ba6..c2fd1c4 100644
--- a/config/system.site.yml
+++ b/config/system.site.yml
@@ -1,5 +1,5 @@
 uuid: 7b983008-5d0c-4ebe-8253-6652b31fce1e
-name: 'Physicians Committee'
+name: 'Physicians Committee (PCRM)'
 slogan: ''