Commit Graph

2832 Commits

Author SHA1 Message Date
CI
3bc39175de fnserver: 0.3.494 release [skip ci] 0.3.494 2018-06-29 23:11:19 +00:00
Tolga Ceylan
3b98c19220 fn: swagger update for tmpfs size (#1034) 2018-06-29 16:03:58 -07:00
CI
ccbfbe5cf8 fnserver: 0.3.493 release [skip ci] 0.3.493 2018-06-29 19:46:49 +00:00
Tolga Ceylan
974a8d6f06 fn: add explanation of read-only disk and /tmp in faq/persistence. (#1103) 2018-06-29 12:39:26 -07:00
CI
7c43128e22 fnserver: 0.3.492 release [skip ci] 0.3.492 2018-06-29 18:21:08 +00:00
Tom Coupland
d7139358ce List Cursor management moved into datastore layer. (#1102)
* Don't try to delete an app that wasn't successfully created in the case of failure

* Allow datastore implementations to inject additional annotations on objects

* Allow for datastores transparently adding annotations on apps, fns and triggers. Change NameIn filter to Name for apps.

* Move *List types including JSON annotations for App, Fn and Trigger into models

* Change return types for GetApps, GetFns and GetTriggers on datastore to
be models.*List and ove cursor generation into datastore

* Trigger cursor handling fixed into db layer

Also changes the name generation so that it is not in the same order
as the id (well is random), this means we are now testing our name ordering.

* GetFns now respects cursors

* Apps now feeds cursor back

* Mock fixes

* Fixing up api level cursor decoding

* Tidy up treatment of cursors in the db layer

* Adding conditions for non nil items lists

* fix mock test
2018-06-29 19:14:13 +01:00
CI
fca107c815 fnserver: 0.3.491 release [skip ci] 0.3.491 2018-06-28 00:35:28 +00:00
Owen Cliffe
73d45db443 Fix JSON list responses (#1098) 2018-06-28 01:28:07 +01:00
CI
6bda57199a fnserver: 0.3.490 release [skip ci] 0.3.490 2018-06-26 17:25:11 +00:00
Rik Gibson
64fb6d27b4 Fixed up a couple of incorrect response codes (#1095)
* Fixed up a couple of incorrect response codes

* Standardise all entities on 204 with no return content on successful delete

* Fix failing Fn.delete() test
2018-06-26 18:17:47 +01:00
CI
ad026eb645 fnserver: 0.3.489 release [skip ci] 0.3.489 2018-06-26 11:18:23 +00:00
Tom Coupland
88a674b24b Removing Swaggerv2 error wrapping (#1092)
The code does not produce errors in this shape.
2018-06-26 12:11:36 +01:00
CI
dcc4a01a8c fnserver: 0.3.488 release [skip ci] 0.3.488 2018-06-26 09:50:57 +00:00
Richard Connon
cd24e1e431 Remove datastoretest from internal namespace so third-party datastore implementations can test compliance (#1091) 2018-06-26 10:43:20 +01:00
CI
41bec645b3 fnserver: 0.3.487 release [skip ci] 0.3.487 2018-06-25 23:40:17 +00:00
Rik Gibson
4b67b0ed26 Tidying and rationalising summary and description strings, some minor… (#1090)
* Tidying and rationalising summary and description strings, some minor rejigging of elements for consistency.

* Removed a single solitary fullstop.

* Quoted a few more unquoted strings...

* Capitalized summaries, no full stops. Sentences for descriptions, yes full stops.

* More Capitals, less full stops...
2018-06-26 00:33:13 +01:00
CI
c6ecf72150 fnserver: 0.3.486 release [skip ci] 0.3.486 2018-06-25 17:55:05 +00:00
Owen Cliffe
4d238c116c Add triggers table via migration (#1088)
* Add triggers table via migration
2018-06-25 18:48:01 +01:00
CI
8f92efa805 fnserver: 0.3.485 release [skip ci] 0.3.485 2018-06-25 14:44:41 +00:00
Tom Coupland
3ebff051a4 Add support for Function and Trigger domain objects (#1060)
Vast commit, includes:

 * Introduces the Trigger domain entity.
 * Introduces the Fns domain entity.
 * V2 of the API for interacting with the new entities in swaggerv2.yml
 * Adds v2 end points for Apps to support PUT updates.
 * Rewrites the datastore level tests into a new pattern.
 * V2 routes use entity ID over name as the path parameter.
2018-06-25 15:37:06 +01:00
CI
a5abecaafb fnserver: 0.3.484 release [skip ci] 0.3.484 2018-06-25 13:02:59 +00:00
Sachin Pikle
abd8580300 Fixed broken links (#1087) 2018-06-25 18:26:19 +05:30
CI
7d1356f458 fnserver: 0.3.483 release [skip ci] 0.3.483 2018-06-25 09:43:51 +00:00
jan grant
edf2fc8831 Add a finer-grained view for placer latency metrics (#1085)
This is a small tweak to the placer latency stats. If we have a cluster of values
around the 1-2s mark, then having a single relatively broad bucket that captures
the (1s, 10s] range will obscure that. In particular, typical Prometheus quartile
estimates may be distorted by this bucket size.
2018-06-25 10:36:46 +01:00
CI
d1d526039d fnserver: 0.3.482 release [skip ci] 0.3.482 2018-06-21 19:40:21 +00:00
Tolga Ceylan
f8d737dd46 fn: api-tests are decommissioned: cleanup Makefile (#1082)
* fn: api-tests are decommissioned: cleanup Makefile

* fn: increase mem in system-tests due to fn-test-utils image
2018-06-21 12:33:20 -07:00
CI
7dd4be513e fnserver: 0.3.481 release [skip ci] 0.3.481 2018-06-21 18:16:17 +00:00
Reed Allman
51ff7caeb2 Bye bye openapi (#1081)
* add DateTime sans mgo

* change all uses of strfmt.DateTime to common.DateTime, remove test strfmt usage

* remove api tests, system-test dep on api test

multiple reasons to remove the api tests:

* awkward dependency with fn_go meant generating bindings on a branched fn to
vendor those to test new stuff. this is at a minimum not at all intuitive,
worth it, nor a fun way to spend the finite amount of time we have to live.
* api tests only tested a subset of functionality that the server/ api tests
already test, and we risk having tests where one tests some thing and the
other doesn't. let's not. we have too many test suites as it is, and these
pretty much only test that we updated the fn_go bindings, which is actually a
hassle as noted above and the cli will pretty quickly figure out anyway.
* fn_go relies on openapi, which relies on mgo, which is deprecated and we'd
like to remove as a dependency. openapi is a _huge_ dep built in a NIH
fashion, that cannot simply remove the mgo dep as users may be using it.
we've now stolen their date time and otherwise killed usage of it in fn core,
for fn_go it still exists but that's less of a problem.

* update deps

removals:

* easyjson
* mgo
* go-openapi
* mapstructure
* fn_go
* purell
* go-validator

also, had to lock docker. we shouldn't use docker on master anyway, they
strongly advise against that. had no luck with latest version rev, so i locked
it to what we were using before. until next time.

the rest is just playing dep roulette, those end up removing a ton tho

* fix exec test to work

* account for john le cache
2018-06-21 11:09:16 -07:00
CI
aa5d7169f4 fnserver: 0.3.480 release [skip ci] 0.3.480 2018-06-20 23:28:03 +00:00
Tolga Ceylan
881a0ba1db fn: agent call overrider (#1080)
Similar to LB Agent call overrider, this PR adds Agent overrider
for Agents to modify/analyze a Call/Extensions during GetCall().
2018-06-20 16:21:09 -07:00
CI
77f243bfaf fnserver: 0.3.479 release [skip ci] 0.3.479 2018-06-20 20:57:15 +00:00
Tolga Ceylan
c73d3f362e fn: remove confusing parallelism in test scripts (#1079)
* fn: remove confusing parallelism in test scripts

*) Tests should be consistent when run from makefile versus
running these test scripts from command line. Let go use
GOMAXPROCS instead of hardcoded 4 cpus in Makefile.
*) Moved docker pull for specific image versions into
helpers scripts as well. Easier to maintain image version
for tests in the same place.
*) Minor Makefile cleanup: removed unused makefile targets.

* fn: git-diff rename limit increase
2018-06-20 13:49:31 -07:00
CI
2d9a3f9444 fnserver: 0.3.478 release [skip ci] 0.3.478 2018-06-20 18:02:30 +00:00
Tolga Ceylan
bd7f67a74a fn: test scripts should use well defined ports (#1077)
* fn: test scripts should use well defined ports

Moved allocation of listener ports for mysql/minio/postgres
to helper script with a list of service list names.

* fn: makefile docker pull mysql version must match tests
2018-06-20 10:55:05 -07:00
CI
3fd6b6c1d8 fnserver: 0.3.477 release [skip ci] 0.3.477 2018-06-20 17:38:19 +00:00
Reed Allman
4630076e13 pull request template (#1069)
part deux of https://github.com/fnproject/fn/issues/1067 -- I am planning to update CONTRIBUTING.md to say something along the lines of 'open an issue' to create an 'open an issue describing a problem' -> 'open a pr resolving said issue' kinda format, this is pretty standard and helps make users feel comfortable opening issues to discuss work they are planning to do rather than just going off and doing it (or being scared off). the rest of it is pretty barebones and copied from Docker mostly (I like their approach, some others are kind of intimidating, am open to ideas though). gif ideas welcome.
2018-06-20 10:29:10 -07:00
Reed Allman
d1aa473972 create issue_template.md (#1068)
part 1 of #1067 - this will help users create issues with all (most of?) the context we need without having to ask. it also includes a policy to close bugs that are left stale after 7 days, which is convenient to keep issues from growing like a weed.
2018-06-20 10:22:44 -07:00
CI
7637f53c26 fnserver: 0.3.476 release [skip ci] 0.3.476 2018-06-19 18:07:30 +00:00
Owen Cliffe
229353051f Mask DB password in logs (#1072) 2018-06-19 18:59:28 +01:00
CI
4bf23d8c1b fnserver: 0.3.475 release [skip ci] 0.3.475 2018-06-18 21:49:37 +00:00
Tolga Ceylan
e67d0e5f3f fn: Call extensions/overriding and more customization friendly docker driver (#1065)
In pure-runner and LB agent, service providers might want to set specific driver options.

For example, to add cpu-shares to functions, LB can add the information as extensions
to the Call and pass this via gRPC to runners. Runners then pick these extensions from
gRPC call and pass it to driver. Using a custom driver implementation, pure-runners can
process these extensions to modify docker.CreateContainerOptions.

To achieve this, LB agents can now be configured using a call overrider.

Pure-runners can be configured using a custom docker driver.

RunnerCall and Call interfaces both expose call extensions.

An example to demonstrate this is implemented in test/fn-system-tests/system_test.go
which registers a call overrider for LB agent as well as a simple custom docker driver.
In this example, LB agent adds a key-value to extensions and runners add this key-value
as an environment variable to the container.
2018-06-18 14:42:28 -07:00
CI
199827b319 fnserver: 0.3.474 release [skip ci] 0.3.474 2018-06-14 09:48:01 +00:00
Andrea Rosa
e637661ea2 Adding a way to inject a request ID (#1046)
* Adding a way to inject a request ID

It is very useful to associate a request ID to each incoming request,
this change allows to provide a function to do that via Server Option.
The change comes with a default function which will generate a new
request ID. The request ID is put in the request context along with a
common logger which always logs the request-id

We add gRPC interceptors to the server so it can get the request ID out
of the gRPC metadata and put it in the common logger stored in the
context so as all the log lines using the common logger from the context
will have the request ID logged
2018-06-14 10:40:55 +01:00
CI
3790d34eee fnserver: 0.3.473 release [skip ci] 0.3.473 2018-06-13 05:52:56 +00:00
Reed Allman
e848b4c88e should turn on views regardless of exporter (#1059)
https://github.com/fnproject/fn/pull/1058/files#r194913723
2018-06-12 22:45:50 -07:00
CI
e2a58f9403 fnserver: 0.3.472 release [skip ci] 0.3.472 2018-06-12 20:43:21 +00:00
Tolga Ceylan
f24172aa9d fn: introducing lb placer basic metrics (#1058)
* fn: introducing lb placer basic metrics

This change adds basic metrics to naive and consistent
hash LB placers. The stats show how many times we scanned
the full runner list, if runner pool failed to return a
runner list or if runner pool returned an empty list.

Placed and not placed status are also tracked along with
if TryExec returned an error or not. Most common error
code, Too-Busy is specifically tracked.

If client cancels/times out, this is also tracked as
a client cancel metric.

For placer latency, we would like to know how much time
the placer spent on searching for a runner until it
successfully places a call. This includes round-trip
times for NACK responses from the runners until a successful
TryExec() call. By excluding last successful TryExec() latency,
we try to exclude function execution & runner container
startup time from this metric in an attempt to isolate
Placer only latency.

* fn: latency and attempt tracker

Removing full scan metric. Tracking number of
runners attempted is a better metric for this
purpose.

Also, if rp.Runners() fail, this is an unrecoverable
error and we should bail out instead of retrying.

* fn: typo fix, ch placer finalize err return

* fn: enable LB placer metrics in WithAgentFromEnv if prometheus is enabled
2018-06-12 13:36:05 -07:00
Peter Jausovec
bd5150f1ac Extract register view functionality (#1056)
* WIP

* Create separate Register*Views functions that are called from main.
2018-06-12 17:24:21 +01:00
CI
6c164ff693 fnserver: 0.3.471 release [skip ci] 0.3.471 2018-06-11 17:30:34 +00:00
Owen Cliffe
1ad27f4f0d Inverting deps on SQL, Log and MQ plugins to make them optional dependencies of extended servers, Removing some dead code that brought in unused dependencies Filtering out some non-linux transitive deps. (#1057)
* initial Db helper split - make SQL and datastore packages optional

* abstracting log store

* break out DB, MQ and log drivers as extensions

* cleanup

* fewer deps

* fixing docker test

* hmm dbness

* updating db startup

* Consolidate all your extensions into one convenient package

* cleanup

* clean up dep constraints
2018-06-11 18:23:28 +01:00