Commit Graph

1698 Commits

Author SHA1 Message Date
Tom Coupland
c4dcd96adb Adds key existence check to config equality (#1204)
The config equality test doesn't check that keys exist between config
maps. Meaning that when two maps, both with a single, yet differing
key, with the lefts value being "", the default string, are compared they are
considered equal.

This change uses the two value assignment version of the map get,
allowing it to test for key existence.
2018-09-12 07:27:32 +01:00
CI
8df7cec8f5 fnserver: 0.3.550 release [skip ci] 2018-09-10 23:39:40 +00:00
Tolga Ceylan
6226af933a fn: slot metrics/stats should be in stats/metrics removing logging (#1200)
Slot stats are too noisy. These should be (or shortly will be) in
metrics/stats/tracing.
2018-09-10 16:30:25 -07:00
CI
02af9f72b4 fnserver: 0.3.549 release [skip ci] 2018-09-10 20:45:25 +00:00
Tolga Ceylan
bb8436c3ee fn: docker driver stats/metrics for prometheus (#1197)
* fn: docker driver stats/metrics for prometheus
2018-09-10 13:35:50 -07:00
CI
424ee5fdf7 fnserver: 0.3.548 release [skip ci] 2018-09-06 13:39:29 +00:00
Tolga Ceylan
35d04cae6d fn: handle client connection close errors (#1196) 2018-09-05 16:56:31 -07:00
CI
246c353f9a fnserver: 0.3.547 release [skip ci] 2018-09-05 07:03:13 +00:00
Gerardo Viedma
0e01f3e547 Gracefully handles client request cancelations, instead of treating treating them as server errors (#1194)
* Gracefully handles client request cancelations, instead of logging them as a 500 error

* adds runner_addr to runner client logs
2018-09-05 07:53:48 +01:00
CI
b11c1e63a1 fnserver: 0.3.546 release [skip ci] 2018-09-04 22:51:15 +00:00
Reed Allman
7638b31e11 use tini to run every container (#1195)
fixes #1101

additional context:

* this was introduced in docker 1.13 (1/2017), we require docker 17.10
(10/2017), this should not have any issues dependency-wise, as `docker-init`
is in the docker install from that point in time. unless explicitly removed,
it should be in the dind container we use as well...
* the PR that introduced this to docker is
https://github.com/moby/moby/pull/26061 for additional context
* it may be wise to put this through some paces, if anybody has any...
interesting... function containers. the tests seem to work fine, however, and
this shouldn't be something users have to think about (?) at all, just
something that we are doing. this isn't the default in docker for
compatibility reasons, which is maybe a yellow flag but I am not sure tbh
2018-09-04 15:41:30 -07:00
CI
dee4171be1 fnserver: 0.3.545 release [skip ci] 2018-08-29 20:17:16 +00:00
Tolga Ceylan
ad011fde7f fn: introducing docker-syslog driver as default logger (#1189)
* fn: introducing docker-syslog driver as default logger

With this change, fn-agent prefers RFC2454 docker-syslog driver
for logging stdout/stderr from containers. The advantage
of this is to offload it to docker itself instead of
streaming stderr along with stdout, which gets multiplexed
through single connection via docker-API.

The change will need support from FDKs in order to log
correct call-id and supress '\n' that splits syslog lines.
2018-08-29 13:08:02 -07:00
CI
59f401d525 fnserver: 0.3.544 release [skip ci] 2018-08-29 12:07:55 +00:00
Gerardo Viedma
802832436c Sets FN_PATH in models.Call for fn invoke requests (#1192) 2018-08-29 12:58:39 +01:00
CI
994e5a3d77 fnserver: 0.3.543 release [skip ci] 2018-08-27 18:05:23 +00:00
Reed Allman
292f673747 Go1.11 (#1188)
* update circleci to go1.11

* update opencensus dep to build with go1.11

* fix up for new gofmt rules
2018-08-27 10:55:52 -07:00
CI
0cdcd8419c fnserver: 0.3.542 release [skip ci] 2018-08-24 22:07:06 +00:00
CI
1b51cca7b6 fnserver: 0.3.541 release [skip ci] 2018-08-24 18:44:56 +00:00
Reed Allman
9cac4c8eea update fsouza to v1.2.0 (#1186)
* update fsouza to v1.2.0

* unwind timeouts on docker

previously, we were setting our own transport on the docker client, but this
does not work anymore as fsouza now needs to call this:
https://github.com/fsouza/go-dockerclient/blob/master/client_unix.go
which makes a platform dependent client. fsouza now also appears to make a
transport that modifies the default http client with some saner values for
things like max idle conns per host (they get reaped if idle 90s):
https://github.com/fsouza/go-dockerclient/blob/master/client.go#L1059
-- these settings are sane and were why we were doing this to begin with.

additionally, have removed our setting of timeout on the docker client for 2
minutes. this is a leftover relic of a bygone era from a time when we relied
on these timeouts to timeout higher level things, which now we're properly
timing out in the enclosing methods. so, they gone, this makes the docker
client a little less whacky now.
2018-08-24 11:36:02 -07:00
CI
62bc482da7 fnserver: 0.3.540 release [skip ci] 2018-08-24 04:53:08 +00:00
Srinidhi Chokkadi Puranik
6e20cf8788 Pass right context in call to datastore.UpdateTrigger (#1185) 2018-08-23 21:44:15 -07:00
CI
722bdf75b0 fnserver: 0.3.539 release [skip ci] 2018-08-23 11:34:13 +00:00
Tom Coupland
fc3f54d2da Insist trigger sources are prefixed (#1184)
* Insist trigger sources are prefixed

All trigger sources must have a '/' prefix to be allowed into the datastore.

* Adding condition to novelValue for gen tests

NovelValue was failing to detect same Config values correctly. This
adds a specific check for Config, like the one for Annotation, to
ensure a novel value is indeed generated.
2018-08-23 12:24:56 +01:00
CI
df94333cf4 fnserver: 0.3.538 release [skip ci] 2018-08-22 21:42:39 +00:00
CI
a37927cab8 fnserver: 0.3.537 release [skip ci] 2018-08-22 10:08:58 +00:00
Tom Coupland
98880b5474 Add App,Trigger,Fn Equality and Clone Testing (#1159)
Creates a test that aims to assert that the Equals and Clone functions
for our three entity structs actually work.

The bulk of the code is spent creating gopter generators for the entities. See information of generative or property based testing for
explainations on that topic, but basically it's an object that is
capable of creating a stream of unique instances of the given struct.

With the generator we then make three assertions:
 1) Entities are always equal to themselves.
 2) A .Clone() of an entity is Equal to the original entity.
 3) A .Clone() of an entity that has a field modified is not equal to the
 orignal.

The third property is the worse for implementation, as it does not
generate the field to modify, it simply loops all fields for each generated
entity, and checks Equals always breaks.

Break testing shows that this would have caught earlier bugs in Equals
due to field addition. It will add to the work to add further fields,
generators have to be manually specified for each field, but that
seems a worthy cost.
2018-08-22 11:00:04 +01:00
CI
9ca93edd76 fnserver: 0.3.536 release [skip ci] 2018-08-22 04:11:55 +00:00
Reed Allman
a6d60551ab disable user function logs at debug level config (#1179) 2018-08-21 21:02:49 -07:00
CI
e1c87e000d fnserver: 0.3.535 release [skip ci] 2018-08-21 09:35:50 +00:00
James Jeffrey
d336035678 Add annotation to trigger on create if endpoints are enabled (#1177)
* Add annotations for creation of triggers and fns along with the test for them fixes #1178

* Log errors and still return created resource for annotation failures
2018-08-21 10:26:36 +01:00
CI
24f41c29b2 fnserver: 0.3.534 release [skip ci] 2018-08-16 08:54:01 +00:00
Tom Coupland
b1938c1cbf Fns now annotated with invoke urls, as per triggers (#1172)
Clone of the trigger work to inject invoke urls into the annotations
on a fn when it is returned from the server.

Small changes to trigges code following code review of the fn code.
2018-08-16 09:44:48 +01:00
CI
d5f06bc5b1 fnserver: 0.3.533 release [skip ci] 2018-08-14 00:16:05 +00:00
CI
6c053b053d fnserver: 0.3.532 release [skip ci] 2018-08-13 09:11:07 +00:00
Tom Coupland
79a7308a17 Adding Fn invoke endpoint that works just like triggers endpoint (#1168) 2018-08-13 10:01:52 +01:00
CI
501b0776bb fnserver: 0.3.531 release [skip ci] 2018-08-12 00:09:37 +00:00
Tolga Ceylan
976b91a77d fn: API stats and tags reoorganization (#1171)
Make sure we can apply extra tags if RegisterAPIViews() is
provided with such tags. Deduplicate path/method/status and
always apply these default tags to appropriate views.
2018-08-11 17:00:37 -07:00
CI
ba98ed6992 fnserver: 0.3.530 release [skip ci] 2018-08-10 19:22:45 +00:00
Tolga Ceylan
8c271e8556 fn: add missing api response count in API metrics (#1170) 2018-08-10 12:14:04 -07:00
CI
75a87725a6 fnserver: 0.3.529 release [skip ci] 2018-08-09 19:14:53 +00:00
Peter Jausovec
35408ac949 Change the syslog format to use app_name instead of app_id (#1166)
* Add AppName to the models.Call, so we can include it in the syslog

* Replace the app_id with app_name
2018-08-09 12:06:19 -07:00
CI
4d0f6a9244 fnserver: 0.3.528 release [skip ci] 2018-08-07 04:05:27 +00:00
Tolga Ceylan
f57571fb3a fn: SSL config adjustments (#1160)
SSL related FN_NODE_CERT (and related) settings are
not very clear today. Removing this in favor of a
simple map of tls.Config objects. Three keys are
provided for this map:

TLSGRPCServer
TLSAdminServer
TLSWebServer

which correspond to server TLS settings for the
associated services.

Operators/implementers can further add more
keys to the map and add their own TLS config.
2018-08-06 20:57:03 -07:00
CI
ff39d0896f fnserver: 0.3.527 release [skip ci] 2018-08-06 17:57:25 +00:00
Tolga Ceylan
b6aeae3680 fn: moving opencensus distribution buckets out of agent (#1158)
Users can best pick the proper range for their operating
environment. Default cmd/fnserver uses some sensible
defaults.
2018-08-06 10:48:52 -07:00
CI
039fb88876 fnserver: 0.3.526 release [skip ci] 2018-08-04 00:33:36 +00:00
Tolga Ceylan
b524a94651 fn: fix math error in calculating msecs in container states (#1157) 2018-08-03 17:25:01 -07:00
CI
558b296e50 fnserver: 0.3.525 release [skip ci] 2018-08-03 18:16:16 +00:00
Owen Cliffe
c3a46f9452 Use sha256 for slot token (#1155) 2018-08-03 19:07:28 +01:00