Validation Failed when creating multiple columns in a short period of time


#1

To reproduce, create 3+ columns simultaneously.

curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow10”}’ &
curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow11”}’ &
curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow12”}’ &
curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow13”}’ &
curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow14”}’ &
curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow15”}’ &
curl https://api.github.com/repos/kubukoz/trellocat/projects/30/columns?access_token=MASKED -X POST -H ‘accept: application/vnd.github.inertia-preview+json, application/json’ --data ‘{“name”:“wow16”}’ &

At least one of these will return:

{
  "message": "Validation Failed",
  "errors": [
    "Something went wrong while executing your query. This is most likely a GitHub bug. Please include \"594201D8:2F6F:F4678A:57EEBB33\" when reporting this issue."
  ],
  "documentation_url": "https://developer.github.com/v3"
}

with status: 422 Unprocessable Entity

If this is not a bug and I should wait for a request to finish before making the second one, please let me know :smiley:


#2

:wave: @kubukoz,

This definitely seems like some sort of race condition. I’ve added an internal issue to look into this, but in the mean time I’d recommend waiting for each request to complete before starting the next one.

Thank you for the feedback!
Brooks


Cannot programmatically add multiple issues to a Github Project
Cannot programmatically add multiple issues to a Github Project
#3

Actually, even running the requests sequentially led to the same problems :confused: hope you guys figure it out, I have a pretty nice project basically waiting for this, then it’ll be “mostly done” :smiley:


#4

@kubukoz I deployed a change that should hopefully fix this issue. Could you try again and see if you can still reproduce this problem?


#5

Still getting it :confused: