-
Notifications
You must be signed in to change notification settings - Fork 720
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
[GITLAB] Installation Guide for GitLab please? #171
Comments
In configuration.toml, set [config]->git_provider to "gitlab". If it still doesn't work, do you mind sharing your configuration files (without keys)? |
@okotek Thanks for your response. Let me share as still it fails. I am trying all different ways as mentioned in the Installation Guide.
OR When I run it in the below way
Your early response is appreciated or please guide me if I am not following it in the right way. |
For the first method, change your command to:
The second way you mentioned is a GitHub workflow, it can't be used as-is in Gitlab. Supporting Gitlab CI/CD is a worthy and not too big an effort, but is not implemented yet. It's possible to install a webhook for Gitlab repositories, and use gitlab_webhook.py to serve it, as long as you are able to host such webhooks, for example using a cloud function or on a web server. Regarding your third try, set the PYTHONPATH environment variable to the repository root. |
Thanks @okotek the first one works now. I missed the
Error snippet regarding the same as mentioned
|
@okotek @marshally One more thing I have used the first approach in my GitLab pipeline to configure as a docker image and run it with it.
But when I run this command on my terminal it gives me 200 and does the job for me.
Can you help me with it? |
Regarding the third way, set PYTHONPATH to point to the parent of the pr_agent folder, and import pr_agent will work. I'm curious about the behavior you see using gitlab runner. Can it be reproduced in a public repo? |
@okotek Ideally yes you may able to reproduce it using public-repo. I am using in my organization so couldn't provide you a sample repo but here is what my pipeline configuration looks like.
And resetting PYTHONPATH as mentioned above didn't help me. I am sorry if I am asking you a very basic question as I am a JAVA developer and never worked with python in my life. ![]() |
@pushpanktugnawat set the PYTHONPATH to the parent of that folder (only one pr_agent). |
Thanks, @okotek. Please let me know your findings in the meantime I also try to update it as per your suggestion in my local. |
Thanks |
Thanks, @okotek do you have any updates on it? Like I just wanted to make sure I am not waiting for very long on this. |
@pushpanktugnawat I was able to reproduce, still looking for a solution |
@pushpanktugnawat image: docker:stable and report back if this solved your problem. I was able to successfully run after these changes. |
Thanks @okotek I verify and comeback to you as early as possible. |
|
You can configure these options, check the configuration file |
@okotek Thanks a lot for looking into it and helping me to configure it, it does work now as you mentioned above but sometimes I can see the below exception causing the failure in my pipeline.
|
It looks like a bug. Let's try to find it. Is it possible to add --e CONFIG.VERBOSITY_LEVEL=2 and try to reproduce? I would like to see the generated output, and see what went wrong. |
@okotek Here are the verbose logs. Just an FYI for you I receive this error sometimes with /review and sometimes with /improve endpoint.
|
@okotek I am also confused as most of the time the tool doesn't generate a single line of PR-Review comments and I am a bit confused about that are we following best-in-class practices or if something is wrong with the tool. |
I'm unable to reproduce it.. it would really help to create a minimal failing example on some public gitlab repo |
@okotek which one do you mean? The errors mentioned above or the unable to generation of review comments? I am sure for /improve you can see this error without a problem its coming from me with a docker command as well over the terminal. |
Couldn't reproduce neither one. I ran on this MR: https://gitlab.com/codiumai/pr-agent/-/merge_requests/2 and review comments are generated, unless I don't understand what you mean |
Let me build a public project and then maybe I can better explain to you what I mean. |
ignore my previous comment, i able to reproduce it on public repo
|
@pushpanktugnawat in your case it make expected comments/reviews and you get errors or just errors and nothing happens in gitlab? |
@idavidov in my case for I also mentioned that above with a screenshot. I think you are able to reproduce it in the same way. |
looks like i found root cause and working on fix, it most likely cause also your issue, but i need to test it after my fix to be on safe side |
#219 fixed what i managed to reproduce, in some circumstances we not attach comments to correct diff |
Looks like the fix is valid, thanks! I merged it |
Guys @idavidov @okotek I think the /improve endpoint still fails with the below error. I am just executing the below command.
|
Adding public-repo if it's much needed then maybe I need some time to create a public repo with messy code and send you the link as well but currently it's not available. |
@pushpanktugnawat i had suspect your issue wasn't fully reproduced |
Surely, @idavidov I am Sorry for being late but I feel only
|
this one is new problem, i'll look on it as well, but if you able also reproduce original issue with debug verbosity it will be great |
Yeah I am reproducing it and share you the logs soonish. |
I run with docker command bellow with:
However, I encountered the following error. Can anyone help?
|
@myvo i just tried the docker command. it works Triple-check that you are using a valid gitlab PERSONAL_ACCESS_TOKEN. they sometimes expire, and you need to renew them
|
@mrT23 Hello! I have the same GitlabAuthenticationError with similar environment (self host GitLab and private project) I've verified token by cURL |
Hi @rliskunov regarding the 401 issue, i am not sure. i tested Gitlab on a private project on my repo, and it works. What I suggest is that you find some open-source repo, and try there. If it doesn't work, open a new issue, and share the repo URL and your logs |
Hi, did anyone resolve the 401 Unauthorized problem?
yet i am getting
i have the secrets matching in the config |
Is there a docker command for model other than OpenAI for example Groq on gitlab? |
if you are facing troubles with private gitlab instances, remember to add this variable from a CI job:
or just pass it from the CLI with your gitlab instance host. |
Still a WIP but can be useful for someone, implemented as a gitlab component:
|
Context:
I am trying to follow the installation guide for Gitlab but I am facing some weird errors with [Docker] I face
GitHub token is required when using user deployment.
but When I use it with my own installation on my machine with MacBook (M1) it causes me the error as pr-agent not found.I followed the installation guide but no luck no success. A handful documents with required information is highly appreciated.
The text was updated successfully, but these errors were encountered: