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

Codium Agent Deployment Issue via GitHub App #812

Open
yosi-optimove opened this issue Mar 21, 2024 · 3 comments
Open

Codium Agent Deployment Issue via GitHub App #812

yosi-optimove opened this issue Mar 21, 2024 · 3 comments

Comments

@yosi-optimove
Copy link

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.

@coditamar
Copy link
Contributor

coditamar commented Mar 21, 2024

@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/

@yosi-optimove
Copy link
Author

@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?

@johannstark
Copy link

johannstark commented Apr 9, 2024

@yosi-optimove Hey! I bumped into the same problem a couple of hours ago! I hope my approach will help you ✨

  1. First, the Webhook URL you must use is: <YOUR_ENDPOINT>/api/v1/github_webhooks
  2. 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
  1. Once this works, you must set OPENAI.KEY, GITHUB.DEPLOYMENT_TYPE, GITHUB.APP_ID, GITHUB.WEBHOOK_SECRET, GITHUB.PRIVATE_KEY in your Cloud Run or GCP product you are using as environment variables. Trust me, for me, is working smooth as butter 🧈
  2. 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! 🚀

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

4 participants
@johannstark @coditamar @yosi-optimove and others