Open pyhedgehog opened 8 years ago
That's weird. Is problem with -
? Or perhaps with length of service name?
This is true about all services in pythonsdktest
except hooktest
.
It states that hook name can be 50 chars.
So not any of these causes:
50
is problem if validation not propagate to client request!
I find issue tonight where validation fail and fix.
URL max length is 2,083 characters
, so I think maybe I can increase service name to 255
?
Thank you for finding! Much appreciated.
I'm writing test for sdk. :smile:
SDK integration test I have, https://github.com/bigcompany/hook.io-test/tree/master/tests/client
Thank you for reference - I'll look and rewrite. Shouldn't they use hook.io-sdk?
I'm not sure. Is just as easy to have raw requests, easier to read and understand tests.
Do whatever is easiest for you. sdk should probably just have unit tests with mock responses.
I have no preference.
So this tests are not for SDK, but for server itself? Fine. What about reason of 404?
Is bug I find in validation. Somewhere it's cutting off, probably in database save. I fix tonight.
@pyhedgehog - I can't replicate issue locally or on production.
Did you create these services through website page or SDK?
Can you reproduce again with new hook?
New hook is https://hook.io/pythonsdktest/testeb43df31_7E52B21Ehook Same behaviour - can't run, log or remove.
Is same question, how did you make hook? From SDK or web UI?
Is problem only with long names? Is problem with random hook creation?
Is problem with creating from SDK client?
Problem with hooks created from python SDK client.
Will it help if I craft curl call to reproduce problem?
Yes
I've found when it's happens: when hook name contains upper-case letters.
This is curl command line for demonstration:
curl -i -vvv -H "hookio-private-key: $hook_private_key" -H 'accept: application/json' -H 'content-type: application/json' --data-raw '{"source":"print(globals())","name":"testABCDEFGH_bug237test08","language":"python"}' https://hook.io/new
Form (when you going to https://hook.io/new in browser) forces name to be lowercase, but server-side script should check it too. Also we have several hooks left in incorrect state (I can't ever delete them).
At least please remove all invalid hooks from https://hook.io/pythonsdktest - i.e. please remove all except pythonsdktest/hooktest.
Will make sure to review /new
for next deployment.
I will clear out your test account as well.
Thank you.
Page https://hook.io/pythonsdktest contains hook
80e2416a-a987-417c-bd65-7368eb43df31-5A9D9260-bug
. Bug attempt to access any of following results in 404: https://hook.io/pythonsdktest/80e2416a-a987-417c-bd65-7368eb43df31-5A9D9260-bug https://hook.io/pythonsdktest/80e2416a-a987-417c-bd65-7368eb43df31-5A9D9260-bug/source https://hook.io/pythonsdktest/80e2416a-a987-417c-bd65-7368eb43df31-5A9D9260-bug/logs https://hook.io/pythonsdktest/80e2416a-a987-417c-bd65-7368eb43df31-5A9D9260-bug/resource