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

platform(gitlab): comment length not truncated #30551

Open
RahulGautamSingh opened this issue Aug 1, 2024 · 1 comment · May be fixed by #30580
Open

platform(gitlab): comment length not truncated #30551

RahulGautamSingh opened this issue Aug 1, 2024 · 1 comment · May be fixed by #30580
Assignees
Labels
platform:gitlab GitLab Platform priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality

Comments

@RahulGautamSingh
Copy link
Collaborator

RahulGautamSingh commented Aug 1, 2024

Discussed in #30508

Originally posted by henry-fn August 1, 2024

What would you like help with?

I think I found a bug

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.

GitLab

Please tell us more about your question or problem

Essentially #7775 has come back after some refactors. I think that we need a call to smartTruncate around here

So you could add a line like body = smartTruncate(body, maxBodyLength());

smartTruncate is already called in ensureIssue but not in ensureComment. I think this was just an oversight but it does cause renovate to sometimes crash for us in mysterious ways to our internal users until we inspect the underlying renovate logs.

Logs (if relevant)

Logs
"message": "Response code 400 (Bad Request)",
             "stack": "HTTPError: Response code 400 (Bad Request)\n    at Request.<anonymous> (/usr/lib/node_modules/renovate/node_modules/got/dist/source/as-promise/index.js:118:42)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
             "options": {
               "headers": {
                 "user-agent": "RenovateBot/37.440.7 (https://github.com/renovatebot/renovate)",
                 "accept": "application/json",
                 "authorization": "***********",
                 "content-type": "application/json",
                 "content-length": "1001123",
                 "accept-encoding": "gzip, deflate, br"
               },
               "url": "REDACTED/merge_requests/3149/notes",
               "hostType": "gitlab",
               "username": "",
               "password": "",
               "method": "POST",
               "http2": false
             },
             "response": {
               "statusCode": 400,
               "statusMessage": "Bad Request",
               "body": {
                 "message": "400 Bad request - Note {:note=>[\"is too long (maximum is 1000000 characters)\"]}"
               },
               "headers": {...

@RahulGautamSingh RahulGautamSingh added type:bug Bug fix of existing functionality priority-4-low Low priority, unlikely to be done unless it becomes important to more people platform:gitlab GitLab Platform labels Aug 1, 2024
@amishk783
Copy link

hey rahul, I would like to work on this issue.

@viceice viceice linked a pull request Aug 5, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:gitlab GitLab Platform priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants