Commit Graph

2894 Commits

Author SHA1 Message Date
Denis Makogon
7ee47f13bb Expose Agent (#892)
with server.Agent developers can access more transport-agnostic API to call the functions
2018-05-07 11:10:23 -07:00
Chad Arimura
aa2dbf80e9 tutorials link (#875) 2018-05-07 10:58:36 -07:00
CI
f155098a5b fnserver: 0.3.430 release [skip ci] 0.3.430 2018-05-04 17:40:14 +00:00
Reed Allman
9d721f8327 remove flaky tests (#972)
if we want them back, we can dig them out of git instead of some poor soul
uncommenting them 10 years from now and spending 3 months on failing CI builds
trying to figure out how a test that breaks doesn't mean the code's broke.

these tests are notoriously flaky and hard to understand/fix, they also test
very specific agent behaviors all the way through the front end when it may be
easier to test them in unit tests instead (should we so choose). at least,
since the behaviors tested aren't being changed very often, these are only
serving to provide negative value in time wasted re-running the test suite
[since them failing doesn't really indicate the code being wrong].

the `IOPipes` test is partially covered by `TestPipesAreClear` which hasn't
cropped up as being as flaky, but it tests less behaviors. it is not easy tt o
understand, either. while i think we learned a lot from these tests, they
haven't been a great citizen of our test suite at large, i figure if we need
to change runner behavior in the future we can maybe make another go at it.
2018-05-04 10:30:49 -07:00
CI
7f1b721602 fnserver: 0.3.429 release [skip ci] 0.3.429 2018-05-03 20:02:56 +00:00
Reed Allman
7607c003cf improve private auth docs a little (#971) 2018-05-03 12:52:58 -07:00
CI
e3e4c061d4 fnserver: 0.3.428 release [skip ci] 0.3.428 2018-04-30 20:22:54 +00:00
Srinidhi Chokkadi Puranik
e0b82519aa Last middleware should use the request passed by preceding middleware. (#965)
This is useful when preceding middleware reads httpRequest.Body to
perform some logic, and assigns a new ReadCloser to httpRequest.Body
(as body can be read only once).
2018-04-30 13:13:24 -07:00
CI
1124c014ec fnserver: 0.3.427 release [skip ci] 0.3.427 2018-04-25 05:09:49 +00:00
Tolga Ceylan
54ba49be65 fn: non-blocking resource tracker and notification (#841)
* fn: non-blocking resource tracker and notification

For some types of errors, we might want to notify
the actual caller if the error is directly 1-1 tied
to that request. If hotLauncher is triggered with
signaller, then here we send a back communication
error notification channel. This is passed to
checkLaunch to send back synchronous responses
to the caller that initiated this hot container
launch.

This is useful if we want to run the agent in
quick fail mode, where instead of waiting for
CPU/Mem to become available, we prefer to fail
quick in order not to hold up the caller.
To support this, non-blocking resource tracker
option/functions are now available.

* fn: test env var rename tweak

* fn: fixup merge

* fn: rebase test fix

* fn: merge fixup

* fn: test tweak down to 70MB for 128MB total

* fn: refactor token creation and use broadcast regardless

* fn: nb description

* fn: bugfix
2018-04-24 21:59:33 -07:00
CI
51197d4985 fnserver: 0.3.426 release [skip ci] 0.3.426 2018-04-24 18:25:24 +00:00
Travis Reeder
977976fa52 Update cloudevents.md 2018-04-24 11:15:01 -07:00
CI
da58c857eb fnserver: 0.3.425 release [skip ci] 0.3.425 2018-04-24 16:34:59 +00:00
Owen Cliffe
1918d87842 make annotations nullable to fix migration (#917)
make app.annotations  and routes.annotations non-null  always

This resolves a schema ambiguity that arrose in the annotations layer that would result in different schemas depending on whether you started afresh or migrated up.
2018-04-24 17:07:15 +01:00
CI
45383d94d3 fnserver: 0.3.424 release [skip ci] 0.3.424 2018-04-23 23:15:01 +00:00
Travis Reeder
3eb60e2028 CloudEvents I/O format support. (#948)
* CloudEvents I/O format support.

* Updated format doc.

* Remove log lines

* This adds support for CloudEvent ingestion at the http router layer.

* Updated per comments.

* Responds with full CloudEvent message.

* Fixed up per comments

* Fix tests

* Checks for cloudevent content-type

* doesn't error on missing content-type.
2018-04-23 16:05:13 -07:00
CI
48de5c13ed fnserver: 0.3.423 release [skip ci] 0.3.423 2018-04-23 17:11:02 +00:00
Andrea Rosa
b922d2f348 Fix assert check in system tests (#952)
In the case the function execution fails the output returned is empty, an
empty output satisfies the "string.Contanis()" checks, as an empty string
is always contained in any string.
The change adds a check on the length of the actual output.
2018-04-23 09:59:07 -07:00
CI
6337a08a8b fnserver: 0.3.422 release [skip ci] 0.3.422 2018-04-20 16:39:57 +00:00
Dario Domizioli
0a72cb3ef4 Fix missing values in context created with common.BackgroundContext (#950)
* Fix missing values in context when created through common.BackgroundContext

* pin to mysql 5.7.22
2018-04-20 17:29:27 +01:00
CI
07388774db fnserver: 0.3.421 release [skip ci] 0.3.421 2018-04-17 10:55:43 +00:00
Dario Domizioli
d23f4e7b39 Add a way to tweak node capacities in system tests to enable more tests (#869)
* Add a way to tweak node capacities in system tests to enable more tests
* Add test for saturated system
2018-04-17 11:46:17 +01:00
CI
eb6630f22c fnserver: 0.3.420 release [skip ci] 0.3.420 2018-04-13 22:30:51 +00:00
Reed Allman
a481191db2 migratex api uses tx now instead of db (#939)
* migratex api uses tx now instead of db

we want to be able to do external queries outside of the migration itself
inside of the same transaction for version checking. if we don't do this, we
risk the case where we set the version to the latest but we don't run the
table creates at all, so we have a db that thinks it's up to date but doesn't
even have any tables, and on subsequent boots if a migration slides in then
the migrations will run when there are no tables. it was unlikely, but now
it's dead.

* tx friendly table exists check

the previous existence checker for dbs was relying on getting back errors
about the db not existing. if we use this in a tx, it makes the whole tx
invalid for postgres. so, now we have count the table queries which return a 1
or a 0 instead of a 1 or an error so that we can check existence inside of a
transaction. voila.
2018-04-13 15:21:54 -07:00
CI
312fd8ec12 fnserver: 0.3.419 release [skip ci] 0.3.419 2018-04-13 18:31:10 +00:00
Tolga Ceylan
c0ee3ce736 fn: locked mutex while blocked on I/O considered harmful (#935)
* fn: mutex while waiting I/O considered harmful

*) Removed hold mutex while wait I/O cases these
included possible disk I/O and network I/O.

*) Error/Context Close/Shutdown semantics changed since
the context timeout and comments were misleading. Close
always waits for pending gRPC session to complete.
Context usage here was merely 'wait up to x secs to
report an error' which only logs the error anyway.
Instead, the runner can log the error. And context
still can be passed around perhaps for future opencensus
instrumentation.
2018-04-13 11:23:29 -07:00
CI
8a35c9876a fnserver: 0.3.418 release [skip ci] 0.3.418 2018-04-13 17:43:52 +00:00
Tolga Ceylan
00bb4d1257 fn: empty body tests for cold and hot (json/http) (#941) 2018-04-13 10:35:57 -07:00
CI
38c332f5f4 fnserver: 0.3.417 release [skip ci] 0.3.417 2018-04-12 23:29:13 +00:00
Tolga Ceylan
623aeb35b2 fn: common.WaitGroup improvements (#940)
* fn: common.WaitGroup improvements

*) Split the API into AddSession/DoneSession
*) Only wake up listeners when session count reaches zero.

* fn: WaitGroup go-routine blast test

* fn: test fix and rebase fixup
2018-04-12 16:21:13 -07:00
CI
e7dd095b92 fnserver: 0.3.416 release [skip ci] 0.3.416 2018-04-12 22:59:31 +00:00
Tolga Ceylan
e47d55056a fn: reduce lbagent and agent dependency (#938)
* fn: reduce lbagent and agent dependency

lbagent and agent code is too dependent. This causes
any changed in agent to break lbagent. In reality, for
LB there should be no delegated agent. Splitting these
two will cause some code duplication, but it reduces
dependency and complexity (eg. agent without docker)

* fn: post rebase fixup

* fn: runner/runnercall should use lbDeadline

* fn: fixup ln agent test

* fn: remove agent create option for common.WaitGroup
2018-04-12 15:51:58 -07:00
Tolga Ceylan
e53d23afc9 fn: sync.WaitGroup replacement common.WaitGroup (#937)
* fn: sync.WaitGroup replacement common.WaitGroup

agent/lb_agent/pure_runner has been incorrectly using
sync.WaitGroup semantics. Switching these components to
use the new common.WaitGroup() that provides a few handy
functionality for common graceful shutdown cases.

From https://golang.org/pkg/sync/#WaitGroup,
    "Note that calls with a positive delta that occur when the counter
     is zero must happen before a Wait. Calls with a negative delta,
     or calls with a positive delta that start when the counter is
     greater than zero, may happen at any time. Typically this means
     the calls to Add should execute before the statement creating
     the goroutine or other event to be waited for. If a WaitGroup
     is reused to wait for several independent sets of events,
     new Add calls must happen after all previous Wait calls have
     returned."

HandleCallEnd introduces some complexity to the shutdowns, but this
is currently handled by AddSession(2) initially and letting the
HandleCallEnd() when to decrement by -1 in addition to decrement -1 in
Submit().

lb_agent shutdown sequence and particularly timeouts with runner pool
needs another look/revision, but this is outside of the scope of this
commit.

* fn: lb-agent wg share

* fn: no need to +2 in Submit with defer.

Removed defer since handleCallEnd already has
this responsibility.
2018-04-12 11:33:01 -07:00
CI
f350b2ca48 fnserver: 0.3.415 release [skip ci] 0.3.415 2018-04-11 23:51:05 +00:00
Tolga Ceylan
fc0d3d49d2 fn: introducing WaitGroup suitable for shutdown/session mgmt (#936)
* fn: introducing WaitGroup suitable for shutdown/session mgmt
2018-04-11 16:42:59 -07:00
Tolga Ceylan
9b86e3626e fn: avoid go-routine leak (#934) 2018-04-11 12:11:08 -07:00
CI
b5a732ff1b fnserver: 0.3.414 release [skip ci] 0.3.414 2018-04-11 12:34:42 +00:00
jan grant
2387d070bf Fix docker login syntax (#933)
With docker 18.04 the behaviour of a documented interface has changed from 18.03 -
to wit, you need to use a specific noninteractive mode of `docker login` to avoid
being prompted about insecure credential storage.
2018-04-11 13:25:37 +01:00
Tolga Ceylan
600dce5b2c fn: lb_agent_test tweak (#931)
Time.Sleep() blocking fixes in placers (naive and ch) improves
some of the timing in processing, therefore reducing the max
calls settings in mock runner pool.
2018-04-10 18:28:47 -07:00
Tolga Ceylan
e7658db822 Move ch ring placement back from old FnLB. (#930)
* fn: bring back CH ring placer into FN repo based on original FnLB
* fn: move placement code into runnerpool directory
2018-04-10 17:26:24 -07:00
Tolga Ceylan
95d7379a81 fn: pure runner concurrency fixes (#928)
* fn: experimental pure_runner rewrite

* fn: minor refactor

* fn: added comments and moved pipe initialization to NewCallHandle

* fn: EOF gRPC and EOF DataFrame handling
2018-04-10 15:50:32 -07:00
CI
bd53ee9a2d fnserver: 0.3.413 release [skip ci] 0.3.413 2018-04-10 20:36:00 +00:00
Tolga Ceylan
ee262901a2 fn: handleCallEnd and submit improvements (#919)
* fn: move call error/end handling to handleCallEnd

This simplifies submit() function but moves the burden
of retriable-versus-committed request handling and slot.Close()
responsibility to handleCallEnd().
2018-04-10 10:48:12 -07:00
CI
f705fc8d8f fnserver: 0.3.412 release [skip ci] 0.3.412 2018-04-09 18:25:41 +00:00
Tolga Ceylan
e36e25150c fn: api and systems tests port cleanup (#926)
*) removed unused cancel in api-test harness/server
*) removed hard coded port in getServerWithCancel along
with faulty health check code.
*) in SetupHarness() fixed code that skipped server start.
2018-04-09 11:16:08 -07:00
CI
e5952a7843 fnserver: 0.3.411 release [skip ci] 0.3.411 2018-04-09 18:05:42 +00:00
Tolga Ceylan
c1f0707b60 fn: lb_agent Close should close shutdown channel (#925) 2018-04-09 10:56:15 -07:00
Tolga Ceylan
dc6a3305eb fn: datastore dial retry should be configurable (#927)
* fn: datastore dial retry should be configurable

Setting this to high (60) in api and system tests.

* fn: netcat connect is not meaningful in wait for DB.
2018-04-09 10:47:00 -07:00
CI
b6caf50f7d fnserver: 0.3.410 release [skip ci] 0.3.410 2018-04-07 22:55:15 +00:00
Tolga Ceylan
34b386b944 fn: lb_agent wait group unused, added to Close (#924) 2018-04-06 18:02:51 -07:00