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

GitLab backend doesn't support long issue descriptions #41

Closed
plajjan opened this issue Apr 3, 2018 · 0 comments
Closed

GitLab backend doesn't support long issue descriptions #41

plajjan opened this issue Apr 3, 2018 · 0 comments
Labels
bug This is a bug or unwanted that makes org-sync feel broken gitlab Related to the github backend

Comments

@plajjan
Copy link
Collaborator

plajjan commented Apr 3, 2018

This isn't really about org-sync's gitlab backend but rather about GitLab itself, however, I'm opening an issue here since it's nice to track it in case someone else runs into it and I just need externalize things from my memory.

I have an issue with a pretty long description and it fails when trying to sync. Just manually trying to PUT the issue using curl fails and I get back 414 Request-URI Too Large from the gitlab server.

The problem is that the GitLab issue API accepts the title and description encoded in the URL and if it gets to big it just doesn't work. GitLab's own web UI uses a different URL to PUT updates to the backend. It doesn't appear to be immediately usable though, I suspect we can't use token authentication. I have quite a distaste for projects that offer different interfaces to different clients - like here the native web UI gets one path whereas other external integrations are supposed to use a separate API. Quite poor form.

The solution is quite clear, just allow description in the body instead. There's a issue for GitLab here: https://gitlab.com/gitlab-org/gitlab-ce/issues/43490

When that happens we have to update our gitlab backend.

@plajjan plajjan added bug This is a bug or unwanted that makes org-sync feel broken gitlab Related to the github backend labels Apr 3, 2018
plajjan added a commit to plajjan/org-sync that referenced this issue Dec 4, 2018
We used to send the issue data like title and description in the URI but
there's a limit to the length of data we can send. By instead sending
the data JSON encoded in the body we get around this!

I introduced a second function for POST/PUTing JSON data that sets the
correct Content-Type. This can probably be written in a more elegant
manner but this works for now :)

Fixes arbox#41.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug or unwanted that makes org-sync feel broken gitlab Related to the github backend
Projects
None yet
Development

No branches or pull requests

1 participant