Closed Lucas-Froguel closed 11 months ago
@okotek
I followed the tutorial for the gitlab webhook install. I will comment on each step what I think is the issue.
- Ok
- Ok
- Following steps 4-7 of the github install is misleading. In step 5., there is no way to follow:
- Copy your app's private key to the private_key field.
- Copy your app's ID to the app_id field.
- Supposing in the last step that you should not fill that data, but instead the data from this step, I note that in the [gitlab] section in
.secrets.toml
only contains:[gitlab] # Gitlab personal access token personal_access_token = ""
Also, the
deployment_type
variable inconfigurations.toml
is present on the [github] section and is not in the options presented by the comment:[github] # The type of deployment to create. Valid values are 'app' or 'user'. deployment_type = "user"
Also, although not mentioned, I think we need to set
git_provider="gitlab"
(that is how the container worked for me). As last, the defaultsecret_provider
isgoogle_cloud_storage
, which gives errors if you have not set up the rest of google. I believe the default should be the local secrets, but I did not find how to do it.- Ok
- Ok
I would love some help from someone, because even identifying some of these errors and trying to set everything right, I was not able to make it work (the container runs, but refuses the connections sent by
slee
):Error: connect ECONNREFUSED 0.0.0.0:3000 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '0.0.0.0', port: 3000, response: undefined }
with no log message.
Hello Lucas! I am encountering the same error as yours. Did you fix that error and how you solved the google cloud problem? I would appreciate your response! @Lucas-Froguel
What is working for me:
docker-compose.yml
version: '3.2'
services:
pr-agent:
image: codiumai/pr-agent:gitlab_webhook
restart: always
volumes:
- ./configuration.toml:/app/pr_agent/settings/configuration.toml
- ./.secrets.toml:/app/pr_agent/settings/.secrets.toml
ports:
- 9101:3000
where configuration.toml has these changes
❯ git diff pr_agent/settings/configuration.toml
diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml
index dd863eb..2db3875 100644
--- a/pr_agent/settings/configuration.toml
+++ b/pr_agent/settings/configuration.toml
@@ -1,7 +1,7 @@
[config]
model="gpt-4" # "gpt-4-1106-preview"
fallback_models=["gpt-3.5-turbo-16k"]
-git_provider="github"
+git_provider="gitlab"
publish_output=true
publish_output_progress=true
verbosity_level=0 # 0,1,2
@@ -12,7 +12,7 @@ max_description_tokens = 500
max_commits_tokens = 500
max_model_tokens = 32000 # Limits the maximum number of tokens that can be used by any model, regardless of the model's default capabilities.
patch_extra_lines = 3
-secret_provider="google_cloud_storage"
+#secret_provider="google_cloud_storage"
cli_mode=false
[pr_reviewer] # /review #
@@ -121,7 +121,7 @@ push_commands = [
[gitlab]
# URL to the gitlab service
-url = "https://gitlab.com"
+url = "https://gitlab.example.com/"
# Polling (either project id or namespace/project_name) syntax can be used
projects_to_monitor = ['org_name/repo_name']
and .secrets.toml is
[openai]
key = "<some openai key>"
[gitlab]
# Gitlab personal access token
personal_access_token = "<some personal access token>"
shared_secret = "<some shared secret>"
[github]
deployment_type = "gitlab"
thanks @froque
Thanks @froque .
By the way, in GitLab you should specify a webhook URL with a specific path! (/webhook
)
For @froque example it would be http://youcontainer.com:9101/webhook
I'm trying to similar approach as mentioned above
in ec2 , I have created instance and using webhook image ,
but getting following issue
ubuntu@ip-172-31-9-150:~$ sudo docker-compose up
[+] Running 2/2
✔ Network ubuntu_default Created 0.1s
✔ Container ubuntu-pr-agent-1 Created 0.1s
Attaching to ubuntu-pr-agent-1
ubuntu-pr-agent-1 | Traceback (most recent call last):
ubuntu-pr-agent-1 | File "/app/pr_agent/servers/gitlab_webhook.py", line 14, in
I followed the tutorial for the gitlab webhook install. I will comment on each step what I think is the issue.
.secrets.toml
only contains:Also, the
deployment_type
variable inconfigurations.toml
is present on the [github] section and is not in the options presented by the comment:Also, although not mentioned, I think we need to set
git_provider="gitlab"
(that is how the container worked for me). As last, the defaultsecret_provider
isgoogle_cloud_storage
, which gives errors if you have not set up the rest of google. I believe the default should be the local secrets, but I did not find how to do it.I would love some help from someone, because even identifying some of these errors and trying to set everything right, I was not able to make it work (the container runs, but refuses the connections sent by
slee
):with no log message.