Commit Graph

694 Commits

Author SHA1 Message Date
Denis Makogon
333fc66906 Making http client global to async runner 2017-07-31 21:22:12 +03:00
Denis Makogon
7c22468b81 Addressing comments 2017-07-31 21:15:08 +03:00
Denis Makogon
10566ba1a8 Use better http client while deleting task 2017-07-31 21:14:12 +03:00
Denis Makogon
f1e46ebfe3 Using better HTTP client 2017-07-31 21:14:12 +03:00
Denis Makogon
2d7f54bffe Addressing comments 2017-07-31 21:14:12 +03:00
Denis Makogon
bb8f12ece9 Fixing tests and CI file 2017-07-31 21:14:11 +03:00
Denis Makogon
49fe3eb11a Fixing FMT errors
Do we run go-fmt in CI?
2017-07-31 21:14:11 +03:00
Denis Makogon
721c0f1255 Improving erro handling while trying to reserve tasks at async runner
Each time when MQ becomes unreachable HTTP GET /tasks returned HTTP 500
 and code was not handling this case except expecting networking errors.
 After that it tried to unmarshal empty response body that caused another sort of an error.

 This patch triggers error based on http response code, explicitly checking if response code
 is something unexpected (not HTTP 200 OK).

 Response status code for /tasks for changed from 202 Accepted to 200 OK according to swagger doc.
2017-07-31 21:14:11 +03:00
CI
ee1656980c functions: 0.3.35 release [skip ci] 2017-07-30 23:51:51 +00:00
CI
c93ed3b87c functions: 0.3.34 release [skip ci] 2017-07-30 23:40:24 +00:00
Reed Allman
53cbe2d5a4 stop riding the short bus, no clue why this stuff is here. only adds confusion, removing (#1)
server exposes Router field
2017-07-30 16:31:31 -07:00
CI
153487002b functions: 0.3.33 release [skip ci] 2017-07-28 19:06:32 +00:00
CI
5285b5d08e functions: 0.3.32 release [skip ci] 2017-07-28 18:54:44 +00:00
CI
329281232e functions: 0.3.31 release [skip ci] 2017-07-28 18:42:59 +00:00
Reed Allman
7ebdfa0451 Merge pull request #161 from fnproject/catch-panics
catch request panics in goroutine
2017-07-28 11:35:25 -07:00
Travis Reeder
ec75b34841 Merge branch 'master' into export_app_name 2017-07-28 11:19:15 -07:00
CI
2319ed5be7 functions: 0.3.30 release [skip ci] 2017-07-28 18:13:52 +00:00
James
c57c071f44 Add appname and route path to context 2017-07-28 11:10:05 -07:00
James Jeffrey
9ff3dc1d50 Export handling error response (#171) 2017-07-28 11:05:30 -07:00
CI
80b15a8fba functions: 0.3.29 release [skip ci] 2017-07-28 14:46:32 +00:00
James
6ee7619b40 Move all endpoints on v1 to be under apps 2017-07-28 07:25:50 -07:00
Denis Makogon
189905f726 Merge branch 'master' into catch-panics 2017-07-28 11:55:03 +03:00
CI
cd85eefbbc functions: 0.3.28 release [skip ci] 2017-07-28 01:26:18 +00:00
CI
543c8c0500 functions: 0.3.27 release [skip ci] 2017-07-27 18:13:47 +00:00
Travis Reeder
b0494cd25d Boom, circle good to go, releases on commits to master too (#7)
* circle

* circle

* circle

* circle

* circle

* CIRCLE

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* cijrcle

* circle

* circle

* circle

* circle

* c

* c

* circle

* testing release

* circle

* trying release

* c

* c

* functions: 0.3.25 release [skip ci]

* c

* functions: 0.3.26 release [skip ci]

* fn tool: 0.3.19 release [skip ci]

* testing cli release only

* fn tool: 0.3.20 release [skip ci]

* fn tool: 0.3.21 release [skip ci]

* hopefully the last thing

* fn tool: 0.3.22 release [skip ci]

* c

* fn tool: 0.3.23 release [skip ci]

* almost there....

* fn tool: 0.3.24 release [skip ci]

* fnlb: 0.0.2 release [skip ci]

* fn tool: 0.3.25 release [skip ci]

* fnlb: 0.0.3 release [skip ci]

* Added back in commented out lines.

* Fixing middleware example.
2017-07-26 17:38:37 -07:00
Travis Reeder
48e3781d5e Rename to GitHub (#3)
* circle

* Rename to github and fn->cli

*  Rename to github and fn->cli
2017-07-26 10:50:19 -07:00
Reed Allman
9cdd3befe3 add abortion 2017-07-26 04:37:35 -07:00
Reed Allman
f9948aa4cb fix up go-fmt'd oracle fn thing 2017-07-26 04:28:53 -07:00
Reed Allman
13f822ad7f catch request panics in goroutine
the async stuff uses carlos supervisor thing but in the normal request path we
aren't catching any panics and returning a 500 to user (conn just gets
closed & server dies). should catch any mistakes we might make, or any one of
the 10000 libraries we're importing.

closes #150
2017-07-26 04:24:44 -07:00
Reed Allman
e0569192ee Merge branch '103' into 'master'
Ensure app exists before listing its routes

Closes #103

See merge request !106
2017-07-25 10:16:07 -07:00
Denis Makogon
5ed3e79b63 Adding comment with the reason for doing this 2017-07-25 20:09:05 +03:00
Reed Allman
5ea70791a5 Merge branch '113' into 'master'
Use coma as separator for multi-value headers

Closes #113

See merge request !128
2017-07-25 10:08:44 -07:00
Denis Makogon
97b0b97bd8 Reject async requests in case if MQ is not reachable 2017-07-25 10:03:04 -07:00
Denis Makogon
efa75dfbb7 Use coma as separator for multi-value headers
Fixes: #113
2017-07-25 19:30:31 +03:00
Reed Allman
dc5e67b6d2 add opentracing spans for metrics 2017-07-25 08:55:22 -07:00
Denis Makogon
bdffa75762 Fixing tests 2017-07-25 08:57:37 +03:00
Denis Makogon
b3ba42e3b9 Fixing fmt 2017-07-25 08:57:37 +03:00
Denis Makogon
4f5197a1c2 Fixing tests and addressing comments 2017-07-25 08:57:37 +03:00
Denis Makogon
48484be608 Ensure app exists before listing its routes 2017-07-25 08:57:05 +03:00
Reed Allman
1cc1a5ad49 Merge branch 'rm-inspect' into 'master'
remove docker inspect container

See merge request !126
2017-07-24 15:44:44 -07:00
Reed Allman
c215dcf5dd remove docker inspect container
we had the inspect container here for 3 reasons:

1) get exit code
2) see if container is still running (debugging madness)
3) see if docker thinks it was an OOM

1) is something wait returns, but due to 2) and 3) we just delayed it until
inspection

2) was really just for debugging since we had 3)

3) seems unnecessary. to me, an OOM is an OOM is an OOM. so why have a whole
docker inspect call just to find out? (we could move this down, since it's a
sad path, and make the call only when necessary, but are we really getting any
value from this distinction anyway? i've never ran into it, myself)

inspect was actually causing tasks to time out, since the call to inspect
could put us over our task timeout, even though our container ran to
completion. we could have fixed this by checking the context earlier, but we
don't really need inspect either, which will reduce the docker calls we make,
which will make more unicorn puppers. now tasks should have more 'true'
timeouts.

tried to boy scout, but tracing patch also cleans this block up too.
2017-07-24 13:37:29 -07:00
James Jeffrey
1e74cd5c4c : 0.3.24 release [skip ci] 2017-07-24 13:30:08 -07:00
James Jeffrey
9f9c9cc40e Merge branch 'add_max_conns' into 'master'
Add max cons 1 if sqlite3

See merge request !124
2017-07-24 13:11:55 -07:00
James Jeffrey
9917815214 Add max cons 1 if sqlite3 2017-07-24 13:04:08 -07:00
Reed Allman
afcec04c24 remove the nanny
we finally graduated high school and can make our own ramen

we no longer need this since fn appears to have no concept of canceling tasks
through an api we need to watch, and the context is plumbed if the request is
canceled. since tasks are short, we may never need to do cancellation of
running tasks like we had with iron worker. this was an added docker call
that's unnecessary since we are doing force removal of the container at the
end anyway.
2017-07-24 11:56:58 -07:00
James Jeffrey
40f911c566 : 0.3.23 release [skip ci] 2017-07-24 08:33:43 -07:00
James Jeffrey
b9b87fc81f Kill the server if original context is canceled 2017-07-21 16:01:18 -07:00
James Jeffrey
5d3fd6bd98 : 0.3.22 release [skip ci] 2017-07-20 10:14:48 -07:00
Travis Reeder
c3630eaa41 Expiring cache 2017-07-20 08:44:56 -07:00
James Jeffrey
2be96689d4 : 0.3.21 release [skip ci] 2017-07-19 16:02:02 -07:00