Commit Graph

3101 Commits

Author SHA1 Message Date
Denis Makogon
9c2dfd89c5 Fix response message on invoke handler (#1315)
* Fix response message on invoke handler

Closes: #1310

* Addressing review comments

* Addressing review comments

* Fixing NoRoute routine

* add method not allowed handler to gin
2018-11-17 10:07:07 +02:00
CI
1213a1e898 fnserver: 0.3.618 release [skip ci] v0.3.618 0.3.618 2018-11-16 19:05:08 +00:00
Reed Allman
29fdbc9b49 disable pure runner logging (#1313)
* disable pure runner logging

there's a racey bug where the logger is being written to when it's closing,
but this led to figuring out that we don't need the logger at all in pure
runner really, the syslog thing isn't an in process fn thing and we don't need
the logs from attach for anything further in pure runner. so this disables the
logger at the docker level, to save sending the bytes back over the wire, this
could be a nice little performance bump too. of course, with this, it means
agents can be configured to not log debug or have logs to store at all, and
not a lot of guards have been put on this for 'full' agent mode while it hangs
on a cross feeling the breeze awaiting its demise - the default configuration
remains the same, and no behavior changes in 'full' agent are here.

it was a lot smoother to make the noop than to try to plumb in 'nil' for
stdout/stderr, this has a lot lower risk of nil panic issues for the same
effect, though it's not perfect relying on type casting, plumbing in an
interface to check has the same issues (loss of interface adherence for any
decorator), so this seems ok. defaulting to not having a logger was similarly
painful, and ended up with this. but open to ideas.

* replace usage of old null reader writer impl

* make Read return io.EOF for io.Copy usage
2018-11-16 12:56:49 -06:00
CI
06cef103f6 fnserver: 0.3.617 release [skip ci] v0.3.617 0.3.617 2018-11-16 01:05:58 +00:00
Tolga Ceylan
c89f1e5f9c fn: safer hand over between monitoring and main processing (#1316)
In runHot(), it's safer to use a separate channel between
monitoring go-routine and processing go-routine to handle
cancellations triggered by monitorin go-routine.
2018-11-15 16:57:16 -08:00
CI
935162ec6a fnserver: 0.3.616 release [skip ci] v0.3.616 0.3.616 2018-11-15 21:46:00 +00:00
Tolga Ceylan
6eaf1578e6 fn: container initialization monitoring (#1288)
Container initialization phase consumes resource tracker
resources (token), during lengthy operations.
In order for agent stability/liveness, this phase has
to be evictable/cancelable and time bounded.

With this change, introducing a new system wide environment setting
to bound the time spent in container initialization phase. This phase
includes docker-pull, docker-create, docker-attach, docker-start
and UDS wait operations. This initialization period is also now
considered evictable.
2018-11-15 13:37:43 -08:00
Tolga Ceylan
fe2b9fb53d fn: cookie and driver api changes (#1312)
Now obsoleted driver.PrepareCookie() call handled image and
container creation. In agent, going forward we will need finer
grained control over the timeouts implied by the contexts.
For this reason, with this change, we split PrepareCookie()
into Validate/Pull/Create calls under Cookie interface.
2018-11-14 16:51:05 -08:00
CI
65f3f915be fnserver: 0.3.615 release [skip ci] v0.3.615 0.3.615 2018-11-14 19:46:49 +00:00
Tolga Ceylan
8ee4c1098b fn: correct typo in docker command tag (#1311) 2018-11-14 11:38:48 -08:00
CI
325f28ef89 fnserver: 0.3.614 release [skip ci] v0.3.614 0.3.614 2018-11-14 17:31:04 +00:00
Eric Fode
90e39c8fd3 initial addition of the diskfree op (#1308)
* initial addition of the diskfree op

fixing up some typos

last of fmt errors

* fixed up some feedbacks
2018-11-14 09:22:07 -08:00
Owen Cliffe
78c1253904 Enable tagging to vx.y.z tags (#1307) 2018-11-12 14:04:37 +00:00
CI
3486af2981 fnserver: 0.3.613 release [skip ci] v0.3.613 0.3.613 2018-11-09 18:33:23 +00:00
Andrea Rosa
182db94fad Feature/acksync response writer (#1267)
This implements a "detached" mechanism to get an ack from the runner
once it actually starts to run a function. In this scenario the response
returned back is just a 202 if we placed the function in a specific
time-frame. If we hit some errors or we fail to place the fn in time we
return back different errors.
2018-11-09 10:25:43 -08:00
CI
2df6c8d349 fnserver: 0.3.612 release [skip ci] 0.3.612 2018-11-07 20:43:19 +00:00
Tolga Ceylan
25afb2f478 fn: remove tini option & env variable (#1301) 2018-11-07 12:35:19 -08:00
CI
46c25215f4 fnserver: 0.3.611 release [skip ci] 0.3.611 2018-11-07 19:18:15 +00:00
Eric Fode
8de5aef09d go modifyed (#1284)
* go modified

fiddling with vendor

got rid of the vendor directory

revendored but with the exact same versions of things

maybe better

added mods for the images

revendored

using `GOFLAGS` instead of repeating my self

vendor everything to the exact same commit hash as before

and fixed ugorji

Delete Deproxy.toml

empty file

cleaned up some file

cleaned up some cruft

get rid of some unused packages and exclude some Microsoft packages

added flags to the variables that get pushed into docker in the makefile

It works I suppose

added noop

excluded what we did not want

even less hacky

reverted to a version that has not been mangled

* get rid of my experiment
2018-11-07 11:10:22 -08:00
CI
9e77f2b9a0 fnserver: 0.3.610 release [skip ci] 0.3.610 2018-11-06 00:09:27 +00:00
Tolga Ceylan
975b780695 fn: tests for hung and bad docker repo during docker-pull (#1298)
* fn: tests for hung and bad docker repo during docker-pull
2018-11-05 16:01:42 -08:00
CI
9b50eaddf1 fnserver: 0.3.609 release [skip ci] 0.3.609 2018-11-05 17:49:33 +00:00
Harry Smith
3f0d4804b2 Fix filtering by name when getting list of funcs (#1295)
* Fix filtering by name when getting list of funcs

* Add datastore test for function list name filter

* Fix tests
2018-11-05 09:41:59 -08:00
CI
3a383049f9 fnserver: 0.3.608 release [skip ci] 0.3.608 2018-11-02 21:10:39 +00:00
Tolga Ceylan
5415b2bc38 fn: move UDS client into container to keep runHot() simpler (#1297) 2018-11-02 14:03:09 -07:00
CI
92c7723997 fnserver: 0.3.607 release [skip ci] 0.3.607 2018-11-02 20:39:53 +00:00
Tolga Ceylan
ac17825a36 fn: add container state to eviction stats (#1296) 2018-11-02 13:32:13 -07:00
CI
494fb1827b fnserver: 0.3.606 release [skip ci] 0.3.606 2018-11-01 21:30:28 +00:00
Tolga Ceylan
de9c2cbb63 fn: cleanup of docker timeouts and docker health check (#1292)
Moving the timeout management of various docker operations
to agent. This allows for finer control over what operation
should use. For instance, for pause/unpause our tolerance
is very low to avoid resource issues. For docker remove,
the consequences of failure will lead to potential agent
failure and therefore we wait up to 10 minute.
For cookie create/prepare (which includes docker-pull)
we cap this at 10 minutes by default.

With new UDS/FDK contract, health check is now obsoleted
as container advertise health using UDS availibility.
2018-11-01 14:22:47 -07:00
CI
1e3104c649 fnserver: 0.3.605 release [skip ci] 0.3.605 2018-10-31 21:46:47 +00:00
Tolga Ceylan
18c0f993f3 fn: adding pre/post sleep and UDS shutdown in fn-test-utils (#1291)
These will be useful in future tests to simulate hung/slow
initialization, shutdown as well as UDS crash, etc.
2018-10-31 14:39:20 -07:00
CI
5c72e476f5 fnserver: 0.3.604 release [skip ci] 0.3.604 2018-10-30 19:19:05 +00:00
Tolga Ceylan
e227802512 fn: Remove error channel for container exits (#1287)
The channel is unnecessary and unreliable since exits
trigger I/O failure on UDS earlier than we detect
the exit.
2018-10-30 12:11:23 -07:00
Chad Arimura
8d32373b5a Update CONTRIBUTING.md (#1286) 2018-10-29 16:14:41 -07:00
Reed Allman
dacc3f74c1 improve contribution guide (#1076)
* improve contribution guide

* at least a stub security bug section, this works as a policy most likely
until we can improve this (TODO we need an email for this!)
* adds info in CONTRIBUTING.md for creating helpful normal issues for us, this
is much the same info as the template
* coding style section. This was lacking, and led to wishy washy reviews. now
we have an official reference in place to point at for 'do this this way
please' and not just random opinions. everyone should read this if they
haven't! I have it bookmarked...
* info on creating useful commit messages and commit formatting, like code
reviews, its nice to have this in the contrib guide to reference when asking
people to do this so that it's not just a one off opinion

tried to make this pretty lax, the last thing i/we want is for the
contributing process to be overbearing, I do think the contribution guide
serves the dual purpose of best practice enforcement as well as helping people
to maneuver the process to make it easier for all of us (them included).

open to idears. this is a convergence of a few guides from popular repos

* update what's in core section to reduce confusion
2018-10-29 16:11:50 -07:00
Chad Arimura
7bbee8fd5e Update CODE_OF_CONDUCT.md (#1285)
* Update CODE_OF_CONDUCT.md

* Update CODE_OF_CONDUCT.md

* Update README.md

* Update README.md
2018-10-29 15:43:45 -07:00
CI
e01243fd40 fnserver: 0.3.603 release [skip ci] 0.3.603 2018-10-26 17:52:11 +00:00
Reed Allman
e13a6fd029 death to format (#1281)
* get rid of old format stuff, utils usage, fix up for fdk2.0 interface

* pure agent format removal, TODO remove format field, fix up all tests

* shitter's clogged

* fix agent tests

* start rolling through server tests

* tests compile, some failures

* remove json / content type detection on invoke/httptrigger, fix up tests

* remove hello, fixup system tests

the fucking status checker test just hangs and it's testing that it doesn't
work so the test passes but the test doesn't pass fuck life it's not worth it

* fix migration

* meh

* make dbhelper shut up about dbhelpers not being used

* move fail status at least into main thread, jfc

* fix status call to have FN_LISTENER

also turns off the stdout/stderr blocking between calls, because it's
impossible to debug without that (without syslog), now that stdout and stderr
go to the same place (either to host stderr or nowhere) and isn't used for
function output this shouldn't be a big fuss really

* remove stdin

* cleanup/remind: fixed bug where watcher would leak if container dies first

* silence system-test logs until fail, fix datastore tests

postgres does weird things with constraints when renaming tables, took the
easy way out

system-tests were loud as fuck and made you download a circleci text file of
the logs, made them only yell when they goof

* fix fdk-go dep for test image. fun

* fix swagger and remove test about format

* update all the gopkg files

* add back FN_FORMAT for fdks that assert things. pfft

* add useful error for functions that exit

this error is really confounding because containers can exit for all manner of
reason, we're just guessing that this is the most likely cause for now, and
this error message should very likely change or be removed from the client
path anyway (context.Canceled wasn't all that useful either, but anyway, I'd
been hunting for this... so found it). added a test to avoid being publicly
shamed for 1 line commits (beware...).
2018-10-26 10:43:04 -07:00
CI
7fd61054b0 fnserver: 0.3.602 release [skip ci] 0.3.602 2018-10-25 19:25:33 +00:00
Tolga Ceylan
241d3fede1 fn: blocking mode should not emit 503 if can't evict (#1283) 2018-10-25 12:17:26 -07:00
CI
5228269e15 fnserver: 0.3.601 release [skip ci] 0.3.601 2018-10-25 10:18:23 +00:00
Tolga Ceylan
bf41789af2 fn: eviction resource correction (#1282)
Previously evictor did not perform an eviction
if total cpu/mem of evictable containers was less
than requested cpu/mem. With this change, we
try to perform evictions based on actual needed cpu & mem
reported by resource tracker.
2018-10-25 11:10:19 +01:00
Abhishek Gupta
e8e6ed2fd0 Added instructions related to GOPATH (#1274)
Added explicit instructions in terms of where to place the cloned repo and initiate the build, without which the it will (obviously) not work
2018-10-22 14:17:53 -07:00
CI
93777daff1 fnserver: 0.3.600 release [skip ci] 0.3.600 2018-10-19 23:11:01 +00:00
James Jeffrey
12f3ec72b2 Update dependencies (#1278)
* Update deps and prune

* Use v1.3.1

* Update logrus

* Remove constaint for /x/net
2018-10-19 15:46:51 -07:00
CI
a53b6a6199 fnserver: 0.3.599 release [skip ci] 0.3.599 2018-10-18 22:18:35 +00:00
Tolga Ceylan
8fe1c9a07c fn: reduce logging for evicted containers (#1276)
Let's not log evicted containers which would be context
canceled.
2018-10-18 15:10:15 -07:00
James Jeffrey
f960eb2d0a Update to v0.16.0 opencensus (#1277) 2018-10-18 15:05:13 -07:00
CI
9e87e86a84 fnserver: 0.3.598 release [skip ci] 0.3.598 2018-10-17 15:26:17 +00:00
Tom Coupland
ceb2a1fc8a Configure logrus to include nano seconds in log messages (#1273)
Currently the default time format, time.RFC3339, is used, which doesn't include any
subsecond resolution information. This makes it hard to understand the
ordering of log messages when viewing in a log aggregator, like
Kibana.

This change sets the TimestampFormat of the logrus JSONFormatter to
time.RFC3339Nano.
2018-10-17 16:17:00 +01:00