RFR: 1186: Backport command stopped working on Gitlab

Magnus Ihse Bursie ihse at openjdk.java.net
Tue Oct 5 11:22:03 UTC 2021


Our POST request to `<api-entry>/members` to add collaborators fails with status code 415 (Unsupported Media Type) on recent versions of Gitlab.

This is the only place in our Gitlab code where we do not send REST parameters as json, but as `&`-concatted raw data. I can't find any indication in the Gitlab API documentation that this is no longer supported, but otoh there is no reason to continue handling this method different from all other REST calls.

So I am fairly certain that this patch solves the problem (which makes sure we use json parameters here as everywhere else). However, I have not been able to test this. We have no tests that run on live instances of Gitlab, and the adhoc testing setup that I have used to not have a repo where backports are enabled (and I'm also a bit uncertain on how to properly configure that).

I believe the patch is likely to be low risk to accept it nevertheless, but I'd like input from Kevin or Erik on this assessment.

-------------

Commit messages:
 - 1186: Backport command stopped working on Gitlab

Changes: https://git.openjdk.java.net/skara/pull/1229/files
 Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1229&range=00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-1186
  Stats: 3 lines in 1 file changed: 1 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/skara/pull/1229.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1229/head:pull/1229

PR: https://git.openjdk.java.net/skara/pull/1229


More information about the skara-dev mailing list