Commit Graph

1368 Commits

Author SHA1 Message Date
Reed Allman
910f6a4b09 fix memory setting in cli, remove MEMORY_MB for now 2017-08-02 20:24:58 -07:00
Reed Allman
3ff28163db fix task memory
prior to this patch we were allowing 256MB for every function run, just
because that was the default for the docker driver and we were not using the
memory field on any given route configuration. this fixes that, now docker
containers will get the correct memory limit passed into the container from
the route. the default is still 128.

there is also an env var now, `MEMORY_MB` that is set on each function call,
see the linked issue below for rationale.

closes #186

ran the given function code from #186, and now i only see allocations up to
32MB before the function is killed. yay.

notes:

there is no max for memory. for open source fn i'm not sure we want to
cap it, really. in the services repo we probably should add a cap before prod.
since we don't know any given fn server's ram, we can't try to make sure the
setting on any given route is something that can even be run.

remove envconfig & bytefmt

this updates the glide.yaml file to remove the unused deps, but trying to
install fresh is broken atm so i couldn't remove from vendor/, going to fix
separately (next update we just won't get these). also changed the skip dir to
be the cli dir now that its name has changed (related to brokenness).

fix how ram slots were being allocated. integer division is significantly
slower than subtraction.
2017-08-02 19:09:16 -07:00
Reed Allman
ccea601028 Merge pull request #163 from fnproject/hot-env-changes
change hot containers when route/app vars change
2017-08-03 15:29:41 -07:00
CI
b1f41f60bb fnlb: 0.0.20 release [skip ci] 0.0.20 2017-08-03 21:15:57 +00:00
CI
faac8734a8 fn tool: 0.3.42 release [skip ci] fn-0.3.42 2017-08-03 21:14:59 +00:00
CI
e2bb0b1965 functions: 0.3.43 release [skip ci] 0.3.43 2017-08-03 21:13:23 +00:00
Reed Allman
10e41c331f Merge pull request #190 from fnproject/update-deps
Update CLI deps
2017-08-03 14:04:22 -07:00
Travis Reeder
2d96f8350c Update deps 2017-08-03 13:36:48 -07:00
CI
e47ab56ff0 fnlb: 0.0.19 release [skip ci] 0.0.19 2017-08-03 18:18:32 +00:00
CI
104924dea5 fn tool: 0.3.41 release [skip ci] fn-0.3.41 2017-08-03 18:17:36 +00:00
CI
7ad81ebeb5 functions: 0.3.42 release [skip ci] 0.3.42 2017-08-03 18:15:58 +00:00
Reed Allman
36af7513ac Merge pull request #175 from fnproject/fn-tests
Tests cli for all quickstart commands
2017-08-03 11:06:35 -07:00
Travis Reeder
95dc8bc4ed docker login earlier 2017-08-03 10:12:29 -07:00
Travis Reeder
8f81ff7b56 Updated circle 2017-08-03 08:09:44 -07:00
Reed Allman
4ad1167284 simplify env var setting, precisely allocate maps 2017-08-02 15:40:50 -07:00
CI
e40b5a832c fnlb: 0.0.18 release [skip ci] 0.0.18 2017-08-02 22:19:53 +00:00
CI
d624f82a8b fn tool: 0.3.40 release [skip ci] fn-0.3.40 2017-08-02 22:18:53 +00:00
CI
7f054b46cb functions: 0.3.41 release [skip ci] 0.3.41 2017-08-02 22:17:17 +00:00
Reed Allman
9ccd48eb18 adds FN_FORMAT, APP_NAME and ROUTE to hot containers 2017-08-02 15:14:23 -07:00
Reed Allman
63796a7c48 change hot containers when route/app vars change
this changes the behavior of hot containers:

1) we are no longer populating a hot container with all of the env vars from the
first request to start up that hot container. this will only populate the
container with any vars that are defined on the app or route.
2) when env vars are changed on the route or app, we will now start up a new
hot container that contains those changes.
3) fixes a bug where we could have a collision if the image and path name
created one, e.g. `/yo/foo` & `oze/yo:latest` collides with `/yo/fo` and
`ooze/yo:latest` (if all other fields are held constant), since we're
name spacing with app name in theory it would happen to the same user (though
we were relying on a comma delimiter there, not great). now we use NULL bytes
which should be hard to get in through a json api ;) i added a sha1 to keep
the size of the (soon to be very large) map down, i don't expect collisions
but, well, it's a hash function.

a small note that we could add a few things to the hot container that will not
change on a request basis, such as `app_name`, `format` and `route` but it's a
bit pedantic. ultimately, it's confusing imo that we have a different set of
vars in the env and in the request itself for hot, which is unavoidable unless
we choose to omit setting env vars entirely, but it seems to be what the
people want (lmk, people, if otherwise).
2017-08-02 15:14:23 -07:00
CI
563c202a94 fnlb: 0.0.17 release [skip ci] 0.0.17 2017-08-02 22:08:22 +00:00
CI
3849054b75 fn tool: 0.3.39 release [skip ci] fn-0.3.39 2017-08-02 22:07:27 +00:00
CI
4d0b2d2f3c functions: 0.3.40 release [skip ci] 0.3.40 2017-08-02 22:05:52 +00:00
Reed Allman
45a24f810a Merge pull request #182 from fnproject/cli-logs
Logs API support for CLI
2017-08-02 14:57:40 -07:00
Reed Allman
cc1ac69bf4 Merge pull request #183 from fnproject/lb-trace
add traces to the lb
2017-08-02 14:56:49 -07:00
Reed Allman
b533350855 add traces to the lb
also fixed the broken version checking stuff so this works again
2017-08-02 13:51:10 -07:00
Denis Makogon
6f9ac7dbb8 Logs API support for CLI 2017-08-02 23:46:19 +03:00
CI
58d2c72efb fnlb: 0.0.16 release [skip ci] 0.0.16 2017-08-02 19:46:12 +00:00
CI
35367e1193 fn tool: 0.3.38 release [skip ci] fn-0.3.38 2017-08-02 19:45:17 +00:00
CI
a2b1d027b5 functions: 0.3.39 release [skip ci] 0.3.39 2017-08-02 19:43:41 +00:00
Reed Allman
d6ed0dca8e Merge pull request #177 from fnproject/fnlb-version
Adding per-node version check
2017-08-02 12:35:25 -07:00
Denis Makogon
da0ab23f63 Adding per-node version check
Version check happens at start and every time attempting to add new node via API

Implements: #153
2017-08-01 20:37:54 +03:00
CI
ba77624082 fnlb: 0.0.15 release [skip ci] 0.0.15 2017-08-01 02:40:16 +00:00
CI
eba9954063 fn tool: 0.3.37 release [skip ci] fn-0.3.37 2017-08-01 02:39:23 +00:00
CI
678c3b4aa3 functions: 0.3.38 release [skip ci] 0.3.38 2017-08-01 02:37:48 +00:00
Chad Arimura
b344a9dd81 test slack integration 2017-07-31 19:29:01 -07:00
Travis Reeder
fdfc11bd14 Updated env var name 2017-07-31 17:42:12 -07:00
Travis Reeder
f1fefe432e rebased on master 2017-07-31 16:43:48 -07:00
Travis Reeder
921a323645 Debugging 2017-07-31 16:03:12 -07:00
Travis Reeder
1bda8c515a debugging... 2017-07-31 16:03:05 -07:00
Travis Reeder
59b8f76723 Added docker:dind as a gitlab service. 2017-07-31 16:02:58 -07:00
Travis Reeder
1adb800ce1 Changed port and testing to see that build will fail on fn commands. 2017-07-31 16:02:47 -07:00
Travis Reeder
3df557fecc changed docker_user to docker_username 2017-07-31 16:02:39 -07:00
Travis Reeder
2d4d1591ab Runs through the common fn commands to ensure we don't break em. 2017-07-31 16:02:32 -07:00
Travis Reeder
5370bc86fa Added Go boilerplate 2017-07-31 16:01:03 -07:00
CI
84bbfc0003 fnlb: 0.0.14 release [skip ci] 0.0.14 2017-07-31 19:46:02 +00:00
CI
d8767388b8 fn tool: 0.3.36 release [skip ci] fn-0.3.36 2017-07-31 19:45:09 +00:00
CI
a4f7f3aa86 functions: 0.3.37 release [skip ci] 0.3.37 2017-07-31 19:43:33 +00:00
Reed Allman
a7e29a6ace Merge pull request #174 from fnproject/lb-die
don't wait for signals to die
2017-07-31 12:34:53 -07:00
CI
1328388526 fnlb: 0.0.13 release [skip ci] 0.0.13 2017-07-31 19:16:52 +00:00