Commit Graph

28 Commits

Author SHA1 Message Date
Tolga Ceylan
95d64f3aa9 fn: minor test improvements (#794) 2018-02-26 16:10:40 -07:00
Tolga Ceylan
0e3df87424 fn: fn-test-utils adjustments for fdk-go (#775) 2018-02-14 16:58:20 -08:00
Tolga Ceylan
c132cf1825 fn: dind SIGINT and SIGCHLD changes (#771)
1) in dind, prevent SIGINT reaching to dockerd. This kills
docker and prevents shutdown as fn server is trying to stop.
2) as init process, always reap child processes.
2018-02-13 19:46:53 -08:00
Tolga Ceylan
75f48fb520 fn: dind image version fixes (#769)
1) use dind docker version instead of installed local docker
2) do not skip pre-release semver handling, eg. 17.12.0-ce
2018-02-13 18:39:37 -08:00
Tolga Ceylan
4dca70c02f fn: fn-test-utils: partial output and invalid http or json (#756)
Simulate partial output or invalid json/html in fn-test-utils.
2018-02-12 10:20:06 -08:00
Tolga Ceylan
bed3b5ddff fn: more functionality into fn-test-utils (#752)
read/write a file on disk, alloc/leak memory.
2018-02-09 13:23:40 -08:00
Tolga Ceylan
15c0d7a99f fn: fn-test-utils fdk-go dep update (#743) 2018-02-05 16:16:45 -08:00
Tolga Ceylan
fdf5a67f6f fn: error image is now deprecated (#737)
Please use fn-test-utils instead for testing.
2018-02-05 11:12:27 -08:00
Tolga Ceylan
6b5486c699 fn: sleeper image is now deprecated (#736)
Please use fn-test-utils instead for testing.
2018-02-05 10:01:11 -08:00
jan grant
025e598c4b Selective releasing (#708)
* Rejig the build process

During a build, we check and rebuild any dependencies prior to
potentially using them.

Build:
- DIND (this only produces a new docker image, no local code changes)
- fnserver (built as part of the testing)

On master, if everything works, then we release the built artifacts,
if necessary:
- DIND (this pushes a docker image and a tag)
- fnserver (this builds the docker image and releases it, if necessary).

Fnserver is dealt with last by the release script: all previous steps
in CI use locally-run go tests rather than a docker file.

When a commit happens, we need to know (a) if we need to rebuild
a set of tools and artifacts (or whether we can continue to use
published ones); and (b) if we need to release new versions of
those tools, if all tests pass.

We do this by identifying the previous release tag on origin/master
(which is the release branch), then checking for changes between
that point at the current one.

Those changes may appear in various places in the tree: some simple
boolean rules work out whether the change means we need to rebuild
and rerelease.

* Make the fnproject/fnserver build use the latest dind

As docker bumps from 17.12.x, use whatever dind we just built.

* Use bash
2018-02-01 12:43:43 +00:00
jan grant
d85e6bd61b Ensure we have the latest fnproject/dind (#687)
If we need to reissue fnproject/dind:17.12 (which fnproject/fnserver
is based upon) then let's make sure we're using the latest one
when cutting a release.

To ensure we don't accidentally use stale images lying around in
the docker cache (there probably shouldn't be *any*), call
    make clear-images
before running the build.
2018-01-19 10:02:25 -08:00
jan grant
1eb35abc63 Fix for MTU problems in some k8s environments (#685)
* NOTE: the fnproject/dind release will need recutting and the
  top-level Dockerfile updated to refer to it for this to be
  complete.

In many k8s environments the host docker uses an overlay network
which'll take bytes away from the effective MTU of outer
containers; eg, vxlan needs 50 bytes, often leaving a 1450 MTU
on the container running dind and fn-api.

In such an arrangement, packets exceeding the smaller MTU may be
invisibly dropped as they travel across the dind's docker0
bridge. This mostly surfaces as a failure of functions to be able
to reliably talk to external services. (Note, the failure may be
intermittent depending on the profile of the resulting TCP
communication.)

A robust fix for this is to intercept the startup of the dind
dockerd and ensure that /etc/docker/daemon.json (currently
absent) contains the following setting:

{
  "mtu": 1450
}

(or whatever the MTU on the external interface may be). This
should be autosized so the container works in a variety of
deployments.

The problem does not arise when using an embedded
/var/run/docker.sock - or when running with dind on a host that
can supply 1500-byte MTUs to containers on the 'host' docker.
2018-01-15 08:35:32 -08:00
Travis Reeder
eef1025e93 Better versioning for dind image. (#666)
* Better versioning for dind image.

* Updated dind image used in main build
2018-01-09 15:33:26 -08:00
Tolga Ceylan
6f1f5e365d fn: URL parsing updates to fix json request_url (#657)
*) Updated fn-test-utils to latest fdk-go
*) Added hot-json to runner tests
*) Removed anon function in FromRequest which had
a side effect to set req.URL.Host. This is now more
explicit and eliminates some corresponding logic in
protocol http.
*) in gin, http request RequestURI is not set, removed
code that references this. (use Call.URL instead)
2018-01-08 10:28:50 -08:00
Tolga Ceylan
d329e0ef5b fn: circleci and makefile adjustments (#625)
* fn: circleci and makefile adjustments

*) Moved more tasks into Makefile to allow for
parallelism and dependency checks.
*) Added cpu count in circleci make invocations
for parallelism

* fn: typo sqlite => sqlite3

* fn: removed unnecessary make pull & install
2017-12-23 10:12:18 -06:00
Reed Allman
f51792ae5e Timestamps on apps / routes (#614)
* route updated_at

* add app created at, fix some route updated_at bugs

* add app updated_at

TODO need to add tests through front end
TODO for validation we don't really want to use the validate wrapper since
it's a programmer error and not a user error, hopefully tests block this.

* add tests for timestamps to exist / change on apps&routes

* route equals at done, fix tests wit dis

* fix up the equals sugar

* add swagger

* fix rebase

* precisely allocate maps in clone

* vetted

* meh

* fix api tests
2017-12-23 09:57:36 -06:00
Tolga Ceylan
8c081e47b9 fn: remove unnecessary packages from fm-test-utils image (#619) 2017-12-21 15:46:44 -06:00
Tolga Ceylan
b3f7c7fc7f fn: add tester image (#609)
* fn: add fn-test-utils image

New tester image that uses go-fdk for advanced test scenarios.
Right now, this is an enhanced 'hello/sleeper' rolled into one
that echos the received headers/env to allow writing test cases.
2017-12-19 15:06:16 -08:00
Travis Reeder
140aab4c94 Now matches docker version instead of our own versions. (#576) 2017-12-06 15:51:00 -08:00
Travis Reeder
0798f9fac8 Middleware upgrade (#554)
* Adds root level middleware

* Added todo

* Better way for extensions to be added.

* Bad conflict merge?
2017-12-05 08:22:03 -08:00
Travis Reeder
5a5c23893a Version bump. 2017-10-31 15:37:13 +00:00
Travis Reeder
342e0019fa wip 2017-10-31 15:37:12 +00:00
James Jeffrey
c7f3066c75 Update references remove refs to treeder oracle funcy (#376)
* Remove lots of refs to iron and funcy oracle etc..

* more ref replacements

* Replacing more refs. Treeder

* Use Fn not FN
2017-09-29 16:22:15 -07:00
Travis Reeder
f559acd7ed Renamed a bunch of images to use fnproject org. (#239)
* Renamed a bunch of images to use fnproject org.

* Multi-stage build for Docker.

* Added tmp vendor dirs to gitignore.

* Run docker-build at beginning of test.
2017-08-23 22:43:53 +03:00
Travis Reeder
9a8ff408b5 Fixes scary output on docker startup. 2017-06-15 15:48:34 -07:00
Travis Reeder
7b408468fa Added hello image. 2017-05-30 09:52:44 -07:00
Travis Reeder
9cc12b4b12 Remove iron... 2017-05-18 18:59:34 +00:00
Travis Reeder
7cfd7d413f Fixed up build and updated dependencies. 2017-05-15 15:40:36 -07:00