Commit Graph

746 Commits

Author SHA1 Message Date
CI
9ceda5ec72 functions: 0.3.111 release [skip ci] 2017-09-21 00:18:17 +00:00
Reed Allman
f7f4d659ea Merge pull request #347 from fnproject/fix-queries-for-mysql-pg
Split queries to make them work on Postgres and MySQL
2017-09-20 17:07:24 -07:00
Denis Makogon
f4699ea0ba Adding API tests that verifies recently changed code bevaviour 2017-09-21 02:25:36 +03:00
Denis Makogon
830c86efe7 Make app delete more stable
We still need to delete app and check how may rows affected in apps table.
 But we don't really care about other tables and rows affected there: routes, calls, logs

 We need to delete app out of loop to check for invalid numbers of rows affected:
 - zero rows means nothing happend

 Despite apps table, zero rows affected if valid case for routes, calls and logs
2017-09-21 02:04:27 +03:00
Denis Makogon
a09159308c Run queries inside one transaction 2017-09-21 01:21:41 +03:00
Denis Makogon
7a9591fd45 Split queries to make them work on Postgres and MySQL
Only SQLite supports multiple deletes in one transaction/statement,
 but other are not.
2017-09-21 00:55:39 +03:00
CI
950b62994a functions: 0.3.110 release [skip ci] 2017-09-20 19:49:55 +00:00
Travis Reeder
deb2ae8103 Merge branch 'master' into app-yaml 2017-09-20 11:49:33 -07:00
Travis Reeder
904f288ed6 Replace FN_ROUTE with FN_PATH 2017-09-20 11:35:18 -07:00
CI
6a5b5fbcd4 functions: 0.3.109 release [skip ci] 2017-09-19 22:40:27 +00:00
CI
e1248bca5e functions: 0.3.108 release [skip ci] 2017-09-19 17:53:34 +00:00
Nigel Deakin
ae69bb37e3 Update global stats charts to show bteakdown by function 2017-09-19 15:05:37 +01:00
CI
3c3f771207 functions: 0.3.107 release [skip ci] 2017-09-19 05:45:16 +00:00
Reed Allman
f335d34636 add server option to limit request size (#320)
we're going to want to do this in our service version of this thing, but
adding this here so that it's usable by everyone. just an option, can add it
to server configuration, but response is nicely formatted, etc.

closes #277
2017-09-18 22:34:19 -07:00
Travis Reeder
75e2051169 Example app structure. round 1. 2017-09-18 17:16:59 -07:00
CI
a935a7102d functions: 0.3.106 release [skip ci] 2017-09-18 22:39:49 +00:00
CI
893edfcd63 functions: 0.3.104 release [skip ci] 2017-09-15 17:36:21 +00:00
Reed Allman
58ead3f7b6 Merge pull request #327 from fnproject/loggyloo
add id to all call invocation logs
2017-09-15 10:26:03 -07:00
CI
1a8a878e9f functions: 0.3.103 release [skip ci] 2017-09-15 00:18:17 +00:00
CI
02571220c3 functions: 0.3.102 release [skip ci] 2017-09-14 18:18:21 +00:00
CI
67d0b9cb9f functions: 0.3.101 release [skip ci] 2017-09-14 18:07:38 +00:00
CI
4a4849b5e2 functions: 0.3.100 release [skip ci] 2017-09-14 17:19:19 +00:00
Reed Allman
53ff665d69 not ready for spans yet in hot land 2017-09-08 05:06:35 -07:00
CI
913342c4d5 functions: 0.3.105 release [skip ci] 2017-09-18 21:11:00 +00:00
Reed Allman
f0d720cf2f Merge pull request #318 from fnproject/fnlog-fiddler
make fn logger more reasonable
2017-09-18 13:59:31 -07:00
Reed Allman
0f50e4b7fc fix neg content length 2017-09-08 01:59:54 -07:00
Reed Allman
4ce9163d99 nuke some TODO yey 2017-09-07 20:15:39 -07:00
Reed Allman
1811b4e230 make fn logger more reasonable
something still feels off with this, but i tinkered with it for a day-ish and
didn't come up with anything a whole lot better. doing a lot of the
maneuvering in the caller seemed better but it was just bloating up GetCall so
went back to having it basically like it was, but returning the limited
underlying buffer to read from so we can ship to the db.

some small changes to the LogStore interface, swapped it to take an
io.Reader instead of a string for more flexibility in the future while
essentially maintaining the same level of performance that we have now.
i'm guessing in the not so distant future we'll ship these to some s3 like
service and it would be better to stream them in than carry around a giant
string anyway. also, carrying around up to 1MB buffers in memory isn't great,
we may want to switch to file backed logs for calls, too. using io.Reader for
logs should make #279 more reasonable if/once we move to some s3-like thing,
we can stream from the log storage service direct to clients.

this fixes the span being out of whack and allows the 'right' context to be
used to upload logs (next to inserting the call). deletes the dbWriter we had,
and we just do this in call.End now (which makes sense to me at least).
removes the dupe code for making an stderr for hot / cold and simplifies the
way to get a func logger (no more 7 param methods yay).

closes #298
2017-09-07 20:15:39 -07:00
Reed Allman
1d0a63ca99 add id to all call invocation logs 2017-09-07 18:37:22 -07:00
Reed Allman
700078ccb9 bubble up some docker errors to user
currently:

* container ran out of memory (code 137)
* container exited with other code != 0
* unable to pull image (auth/404)

there may be others but this is a good start (the most common). notably, for
both hot and cold these should bubble up (if deterministic, which hub isn't
always), and these are useful for users to use in debugging why things aren't
working.

added tests to make sure that these behaviors are working.

also changed the behavior such that when the container exits we return a 502
instead of a 503, just to be able to distinguish the fact that fn is working
as expected but the container is acting funky (400 is weird here, so idk).

removed references to old IsUserVisible crap and slightly changed the
interface for RunResult for plumbing reasons (to get the error type,
specifically).

fixed an issue where if ~/.docker/config.json exists sometimes pulling images
wouldn't work deterministically (should be more inline w/ expectations now)

closes #275
2017-09-07 11:55:50 -07:00
CI
d395c4edda functions: 0.3.99 release [skip ci] 2017-09-13 18:28:45 +00:00
Denis Makogon
5683d01603 Fix error handling 2017-09-13 21:03:53 +03:00
CI
95aa5aa190 functions: 0.3.98 release [skip ci] 2017-09-13 17:24:11 +00:00
Reed Allman
cb11749a67 Merge pull request #321 from fnproject/uncap-slice
oops, try to pre-allocate slice of useful size but if not allow expan…
2017-09-13 10:12:30 -07:00
Reed Allman
3707935f56 Merge pull request #314 from fnproject/302
Implementing force delete for apps
2017-09-13 10:01:59 -07:00
Denis Makogon
b2ca5ebc64 Run all statements in one transaction 2017-09-12 23:39:18 +03:00
Denis Makogon
93d4a5730b Running deletes in single transaction 2017-09-12 23:30:31 +03:00
Denis Makogon
0b47c8c40c Fix sql statements 2017-09-12 20:42:52 +03:00
Denis Makogon
bdb7e7fd7b Addressing more comments 2017-09-12 20:09:22 +03:00
Denis Makogon
4052a7d428 Addressing review comments 2017-09-12 20:07:40 +03:00
Denis Makogon
8c9e7443cb Removing no longer valid tests 2017-09-11 23:38:19 +03:00
Denis Makogon
6b7accd3c6 Simplifying app delete per review comments 2017-09-11 23:15:01 +03:00
Reed Allman
f032ce0556 info line this (#316) 2017-09-11 13:05:49 -07:00
CI
6aeca53b5a functions: 0.3.97 release [skip ci] 2017-09-11 18:43:29 +00:00
Reed Allman
c71c170ac8 Merge pull request #299 from fnproject/fn-the-things
FN_ prefix env vars
2017-09-11 11:33:43 -07:00
Chad Arimura
d0901c104f Update ping.go
updating ping
2017-09-11 11:16:17 -07:00
Denis Makogon
78f2d51bfa Implementing force delete for apps
Deployment-Impact: DB schema changed

API Impact: HTTP DELETE /apps/{app} accepts query parameters: /apps/{app}?force=True

Closes: #302
2017-09-11 17:32:35 +03:00
Denis Makogon
3e190342fb Implementing batch deletes for calls, logs and routes
Partially-Closes: #302
2017-09-11 11:41:27 +03:00
Denis Makogon
774d53662f Making logs app-bound
Partially-Closes: #302
2017-09-11 11:04:54 +03:00
CI
bb43437050 functions: 0.3.96 release [skip ci] 2017-09-10 17:59:54 +00:00