Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on terminus build:env:delete:pr via GitHub Actions #472

Open
screid123 opened this issue Feb 5, 2023 · 4 comments
Open

Error on terminus build:env:delete:pr via GitHub Actions #472

screid123 opened this issue Feb 5, 2023 · 4 comments

Comments

@screid123
Copy link

screid123 commented Feb 5, 2023

(Opened initially as a Pantheon Support Ticket 752761)

We are using GitHub Actions to deploy/sync our code from GitHub to Pantheon. The workflow we had setup was working fine for weeks up until Thursday, 2-Feb (as far as we can tell), and largely mimics the CircleCI orb/workflow.

The error happens during the “create multidev” step which happens on Pull Request if the environment doesn’t exist. From what I can tell, it seems the terminus build:env:delete:pr command is causing problems where it’s requesting info from GitHub but does not submit the correct URL:

$ Notice: Call GitHub API: GET repos///pulls?state=all
$ Error: Client error: `GET https://api.github.com/repos///pulls?state=all` resulted in a `404 Not Found` response:
$ {“message”:[Not Found”,“documentation_url](https://dashboard.pantheon.io/sites/%22https://docs.github.com/rest)“}

The URL is malformed as it does not contain the correct repo owner or name, e.g.- https://api.github.com/repos///pulls?state=all. When I comment out this command, the workflow runs “normally”, so it really seems to be isolated to the build:env:delete:pr process.

Here’s a gist with the raw log output, verbose output from terminus build:env:delete:pr -vvv, and a copy of the workflow file. I have even gone as far as adding in all the output vars set by the docker build-tools script used in CircleCI workflows, but the same result.

@screid123
Copy link
Author

Well now the script is working again. Unsure what changed. 🤷

I'll close this for now and re-open if it happens again.

@screid123 screid123 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2023
@screid123
Copy link
Author

Re-opening per Pantheon Support request. 👍

@screid123 screid123 reopened this Feb 6, 2023
@screid123
Copy link
Author

screid123 commented Feb 9, 2023

FWIW - I also see the same behavior happening on the build:env:create command when it tries to do its "update issue" task:

Notice: ] Creating multidev pr-52 for site brcc-paid-search
Notice: ] Created Multidev environment "pr-52"
Notice: ] Enabled on-server development via SFTP for "pr-52"
Notice: ] Call GitHub API: POST repos///issues/52/comments
Error: ]  Client error: `POST https://api.github.com/repos///issues/52/comments` resulted in a `404 Not Found` response:
  {"message":"Not Found","documentation_url":"https://docs.github.com/rest"}
Error: ]  error: Not Found. Http status code: 404 
Notice: ] Caches cleared on pr-52.

Clearly something is weird with my GitHub workflow. I added another gist with the updated workflow: https://gist.github.com/screid123/febbf4f81a405ef54565f03c58beedab

@JSmurf
Copy link

JSmurf commented Mar 1, 2023

Also getting the same error message on a CircleCI build, using the 'quay.io/pantheon-public/build-tools-ci:8.x-php8.1' image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants