-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Prerequsities
- I'm on the latest version of the plugin
- I've installed the required dependencies
- I've run
:h gitlab.nvim.troubleshootingand followed the steps there
Bug Description
Today I ran into a very unpleasant bug. I tried to publish 9 draft comments, but the publishing errored out. So I just tried once again, but seemingly with the same result. Below is the relevant section from the log. From it it can be seen that the Go server attempted 6 times to publish the drafts but seemingly it was rejected with 500 - Internal Server Error. In fact, however, both times, the drafts were published upon each retry, which resulted in 108 published comments, while the original drafts were still present in my gitlab.nvim session. Only after that did the discussion tree get updated and I noticed it was full of duplicates, and I spent 15 minutes deleting them (I would have appreciated a "bulk delete" command) :)
Reproduction Steps
Unfortunately, I don't know how to reproduce the error. But I will try to do so in a testing repo.
Excerpt from log
-- REQUEST TO GO SERVER --
POST /mr/draft_notes/publish HTTP/1.1
Host: localhost:41887
Accept: */*
Content-Length: 20
Content-Type: application/x-www-form-urlencoded
Private-Token: REDACTED
User-Agent: curl/8.11.0
{"publish_all":true}
-- REQUEST TO GITLAB --
POST /api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish HTTP/1.1
Host: gitlab.cloud.phonexia.com
Accept: application/json
Content-Type: application/json
Private-Token: REDACTED
User-Agent: go-gitlab
-- RESPONSE FROM GITLAB --
HTTP/1.1 500 Internal Server Error
Content-Length: 39
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
Date: Mon, 18 Nov 2024 15:55:44 GMT
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
Vary: Origin
X-Gitlab-Meta: {"correlation_id":"01JCZZS8PBCBT4WGR7AWJ5Z3AJ","version":"1"}
X-Request-Id: 01JCZZS8PBCBT4WGR7AWJ5Z3AJ
X-Runtime: 3.119501
{"message":"500 Internal Server Error"}
-- REQUEST TO GITLAB --
POST /api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish HTTP/1.1
Host: gitlab.cloud.phonexia.com
Accept: application/json
Content-Type: application/json
Private-Token: REDACTED
User-Agent: go-gitlab
-- RESPONSE FROM GITLAB --
HTTP/1.1 500 Internal Server Error
Content-Length: 39
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
Date: Mon, 18 Nov 2024 15:55:47 GMT
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
Vary: Origin
X-Gitlab-Meta: {"correlation_id":"01JCZZSCF5MB7T96C3J9C47F48","version":"1"}
X-Request-Id: 01JCZZSCF5MB7T96C3J9C47F48
X-Runtime: 2.140798
{"message":"500 Internal Server Error"}
-- REQUEST TO GITLAB --
POST /api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish HTTP/1.1
Host: gitlab.cloud.phonexia.com
Accept: application/json
Content-Type: application/json
Private-Token: REDACTED
User-Agent: go-gitlab
-- RESPONSE FROM GITLAB --
HTTP/1.1 500 Internal Server Error
Content-Length: 39
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
Date: Mon, 18 Nov 2024 15:55:52 GMT
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
Vary: Origin
X-Gitlab-Meta: {"correlation_id":"01JCZZSFZRP2DEP1QDDDJ3ZKNB","version":"1"}
X-Request-Id: 01JCZZSFZRP2DEP1QDDDJ3ZKNB
X-Runtime: 3.203322
{"message":"500 Internal Server Error"}
-- REQUEST TO GITLAB --
POST /api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish HTTP/1.1
Host: gitlab.cloud.phonexia.com
Accept: application/json
Content-Type: application/json
Private-Token: REDACTED
User-Agent: go-gitlab
-- RESPONSE FROM GITLAB --
HTTP/1.1 500 Internal Server Error
Content-Length: 39
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
Date: Mon, 18 Nov 2024 15:55:55 GMT
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
Vary: Origin
X-Gitlab-Meta: {"correlation_id":"01JCZZSN6DSK4EYJMZCNTMPQ3Y","version":"1"}
X-Request-Id: 01JCZZSN6DSK4EYJMZCNTMPQ3Y
X-Runtime: 1.260490
{"message":"500 Internal Server Error"}
-- REQUEST TO GITLAB --
POST /api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish HTTP/1.1
Host: gitlab.cloud.phonexia.com
Accept: application/json
Content-Type: application/json
Private-Token: REDACTED
User-Agent: go-gitlab
-- RESPONSE FROM GITLAB --
HTTP/1.1 500 Internal Server Error
Content-Length: 39
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
Date: Mon, 18 Nov 2024 15:56:00 GMT
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
Vary: Origin
X-Gitlab-Meta: {"correlation_id":"01JCZZSSQS3Q25SRV1TYG4T4BY","version":"1"}
X-Request-Id: 01JCZZSSQS3Q25SRV1TYG4T4BY
X-Runtime: 1.441622
{"message":"500 Internal Server Error"}
-- REQUEST TO GITLAB --
POST /api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish HTTP/1.1
Host: gitlab.cloud.phonexia.com
Accept: application/json
Content-Type: application/json
Private-Token: REDACTED
User-Agent: go-gitlab
-- RESPONSE FROM GITLAB --
HTTP/1.1 500 Internal Server Error
Content-Length: 39
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
Date: Mon, 18 Nov 2024 15:56:07 GMT
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000
Vary: Origin
X-Gitlab-Meta: {"correlation_id":"01JCZZSYQTKYTN5ZY4319EP51J","version":"1"}
X-Request-Id: 01JCZZSYQTKYTN5ZY4319EP51J
X-Runtime: 2.670361
{"message":"500 Internal Server Error"}
-- RESPONSE FROM GO SERVER --
HTTP/0.0 500 Internal Server Error
Content-Length: 202
Content-Type: application/json
{"message":"Could not publish draft note(s)","details":"POST https://REDACTED/api/v4/projects/42/merge_requests/438/draft_notes/bulk_publish: 500 {message: 500 Internal Server Error}"}