pr-agent
pr-agent copied to clipboard
Codium Agent Deployment Issue via GitHub App
Hi, have deployed codium agent using a github app using this guide: https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-app
I am getting this errror: "POST / HTTP/1.1" 405 Method Not Allowed in the pod logs
Please help me in resolving this issue Thanks.
@yosi-optimove , I assume you are looking for the PR-Agent Pro app that is hosted and managed by CodiumAI. Take a look at: https://pr-agent-docs.codium.ai/installation/pr_agent_pro/ https://www.codium.ai/blog/pr-agent-for-github-teams-enterprise-how-to-install/
@coditamar Thank you for the quick response and for the resources you provided. However, there might have been a slight misunderstanding regarding my setup. I am utilizing the free edition of the PR-Agent, specifically aiming to deploy it as a GitHub App within our internal GitHub environment hosted on Google Cloud Platform (GCP), as outlined in the GitHub App Deployment Guide.
Regrettably, I'm encountering a "405 Method Not Allowed" error within the pod logs, indicating an issue with the handling of POST requests. The resources you shared seem to pertain to the PR-Agent Pro version, which, while informative, doesn't directly address the challenges I'm facing with the free edition.
Could you possibly provide further insights or assistance tailored to deploying the GitHub App on GCP using the free edition? Any specific configuration advice, common pitfalls, or a checklist to ensure the deployment meets CodiumAI's requirements would be greatly appreciated.
Additionally, could it be that the functionality I'm attempting to implement is only available with the Pro edition?
@yosi-optimove Hey! I bumped into the same problem a couple of hours ago! I hope my approach will help you ✨
- First, the Webhook URL you must use is:
<YOUR_ENDPOINT>/api/v1/github_webhooks - Make sure your environment variables are set properly: In my case, I tested first from my terminal using NGROK with the following variables. Note that I expose port 3000 to my PC's 8080 so I can run NGROK the tunnel to port 8080 (exposed to GitHub)
docker run --rm -it -e OPENAI.KEY=xxx -e GITHUB.DEPLOYMENT_TYPE=app -e GITHUB.APP_ID=12345 -e GITHUB.WEBHOOK_SECRET=xxxxx -e GITHUB.PRIVATE_KEY="xxx" -p 8080:3000 my-agent:latest
- Once this works, you must set
OPENAI.KEY, GITHUB.DEPLOYMENT_TYPE, GITHUB.APP_ID, GITHUB.WEBHOOK_SECRET, GITHUB.PRIVATE_KEYin your Cloud Run or GCP product you are using as environment variables. Trust me, for me, is working smooth as butter 🧈 - I use GitHub Action to deploy the forked repo to Cloud Run. Make sure to set the memory, CPU, concurrency, and instances according to your demand (so you won't spend a lot of money on this 😉 )
Cheers! Hope this helps! 🚀
/similar_issue