SanderRonde / VSCode-Gerrit

Gerrit plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.vscode--gerrit
MIT License
31 stars 17 forks source link

Invalid response when deleting or updating a draft comment, due to {revision-id} set to undefined in the URL #77

Closed maciejs closed 3 months ago

maciejs commented 3 months ago

It seems that when trying to delete or update a draft comment, it fails because the value of {revision-id} in the URL is undefined instead of the valid one

DELETE request to "https://HOST/a/changes/PROJECT~master~CHANGE/revisions/undefined/drafts/DRAFT?access_token=TOKEN"
HTTPError: Response code 404 (Not Found) 404 [object Object] Not found: undefined

Invalid response
PUT request to "https://HOST/a/changes/PROJECT~master~CHANGE/revisions/undefined/drafts/DRAFT?access_token=TOKEN"
HTTPError: Response code 404 (Not Found) 404 [object Object] Not found: undefined

Invalid response
SanderRonde commented 3 months ago

A few questions since I can't seem to reproduce this:

maciejs commented 3 months ago

Oh, thanks. Unfortunately, this is quite an old version 3.2, so this seems to explain the problem and it is beyond my control to update it, I can only wait for the opportunity to check the same with a newer one. Sorry for bothering.

SanderRonde commented 3 months ago

No worries, I'll take a look at whether I can get the data from somewhere else. You're probably not the only person using 3.2 so it would be nice if it works for that version too.

maciejs commented 3 months ago

Thanks, I was able to check it on a test instance in the supported version 3.4 and it works there without any problems.

SanderRonde commented 3 months ago

Thanks for confirming!

SanderRonde commented 3 months ago

Hmm I dove into it some more and it's actually pretty hard to get the revision hash from anything else (at least from the REST API) so I'll have to mark this one as not planned unfortunately. (I also didn't realise 3.2 was EOL when I read it before)