Commit Graph

830 Commits

Author SHA1 Message Date
CI
e9790bc2e0 functions: 0.3.54 release [skip ci] 2017-08-09 17:48:17 +00:00
Reed Allman
4d28a82c0a Merge pull request #214 from fnproject/issue/212
Fix app updating
2017-08-09 10:44:38 -07:00
Reed Allman
8799f22770 Merge pull request #215 from fnproject/bugfix-format-request-url
Fixed the formatting of the passed URL
2017-08-09 10:38:57 -07:00
CI
bc48d879e8 functions: 0.3.53 release [skip ci] 2017-08-09 16:03:37 +00:00
Rae Jeffries-Harris
3c21570fe9 Fixed the formatting of the passed URL 2017-08-09 16:58:27 +01:00
CI
3061397509 functions: 0.3.52 release [skip ci] 2017-08-09 12:30:54 +00:00
oracloud
df2a9aeb24 Merge pull request #200 from fnproject/fix-deps
Fix deps
2017-08-09 14:21:36 +02:00
Denis Makogon
7a36e424d1 Fix app updating
Closes: #212
2017-08-09 14:41:23 +03:00
CI
cd25683edb functions: 0.3.51 release [skip ci] 2017-08-08 18:15:09 +00:00
CI
bc2db9a64b functions: 0.3.50 release [skip ci] 2017-08-08 16:14:36 +00:00
CI
65fed1a2bf functions: 0.3.49 release [skip ci] 2017-08-08 13:20:11 +00:00
Reed Allman
6a7973e6b6 plumb all config fields into task
the mqs are storing a models.Task, which was not incorporating all the fields
that are in a task.Config. I would very much like to merge these two things,
but expect to do this in a future restructuring as both are used widely and
not cordoned off properly (Config has a channel, stdin, stdout, stderr -- and
isn't just a 'config', so to speak, as Task is).

Since a task.Config is what is used to actually run a container, the result of
the aforementioned deficiency was #193 where tasks are improperly configured
and ran (namely, memory wrong).

async tasks can still not be hot, they will be reverted to default format.
would also like to fix this (also part of restructuring). I actually started
doing this, hence the changes to those files (the surface area of the change
is small and discourages improper future use, so I've left what I've done).

this will:

closes #193
closes #195
closes #154

removes many unused fields in models.Task, since we have not implemented
retries. priority & delay are left, even though they are not used either,
the main goal of this is to resolve #193 and both these fields are strongly
plumbed into all the mqs, so punting on those two.
2017-08-03 06:33:30 -07:00
CI
2940727082 functions: 0.3.48 release [skip ci] 2017-08-07 19:04:21 +00:00
CI
d70f27b870 functions: 0.3.47 release [skip ci] 2017-08-07 18:06:39 +00:00
CI
995619f077 functions: 0.3.46 release [skip ci] 2017-08-07 17:54:26 +00:00
Reed Allman
f7345e8080 Merge pull request #191 from fnproject/fix-memory-limits
fix task memory
2017-08-07 10:44:23 -07:00
CI
b3b243bb56 functions: 0.3.45 release [skip ci] 2017-08-05 04:47:13 +00:00
CI
159db07817 functions: 0.3.44 release [skip ci] 2017-08-03 22:40:00 +00: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
e2bb0b1965 functions: 0.3.43 release [skip ci] 2017-08-03 21:13:23 +00:00
CI
7ad81ebeb5 functions: 0.3.42 release [skip ci] 2017-08-03 18:15:58 +00:00
Reed Allman
2c2e07ba04 fix bad runner import, remove envconfig & bytefmt 2017-08-03 03:59:19 -07:00
Reed Allman
30f3c45dbc update vendor/ dir to latest w/o heroku, moby
had to lock a lot of things in place
2017-08-03 03:52:14 -07:00
Reed Allman
780791da1c replace heroku registry client w/ docker one
the docker one actually sucks to use, as apparent here. had to add a lot of
shit just for it to work, but the heroku registry client has gone stale and is
causing issues with our dependencies. didn't expect this to be that hard, but
it's over now. good thing we aren't even using this code ^_^. we need to at
some point start limiting image sizes and remember this not being fun to
figure out to begin with, so anyway, now this works and we don't have to
wrestle with different versions of docker in deps (hopefully) anymore.
2017-08-03 03:50:55 -07:00
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
4ad1167284 simplify env var setting, precisely allocate maps 2017-08-02 15:40:50 -07:00
CI
7f054b46cb functions: 0.3.41 release [skip ci] 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
4d0b2d2f3c functions: 0.3.40 release [skip ci] 2017-08-02 22:05:52 +00:00
CI
a2b1d027b5 functions: 0.3.39 release [skip ci] 2017-08-02 19:43:41 +00:00
CI
678c3b4aa3 functions: 0.3.38 release [skip ci] 2017-08-01 02:37:48 +00:00
CI
a4f7f3aa86 functions: 0.3.37 release [skip ci] 2017-07-31 19:43:33 +00:00
CI
0ef171dff5 functions: 0.3.36 release [skip ci] 2017-07-31 19:14:19 +00:00
Denis Makogon
edb1279d57 Fixing task deleting to be similar to task getter 2017-07-31 21:37:29 +03:00
Denis Makogon
333fc66906 Making http client global to async runner 2017-07-31 21:22:12 +03:00
Denis Makogon
7c22468b81 Addressing comments 2017-07-31 21:15:08 +03:00
Denis Makogon
10566ba1a8 Use better http client while deleting task 2017-07-31 21:14:12 +03:00
Denis Makogon
f1e46ebfe3 Using better HTTP client 2017-07-31 21:14:12 +03:00
Denis Makogon
2d7f54bffe Addressing comments 2017-07-31 21:14:12 +03:00
Denis Makogon
bb8f12ece9 Fixing tests and CI file 2017-07-31 21:14:11 +03:00
Denis Makogon
49fe3eb11a Fixing FMT errors
Do we run go-fmt in CI?
2017-07-31 21:14:11 +03:00
Denis Makogon
721c0f1255 Improving erro handling while trying to reserve tasks at async runner
Each time when MQ becomes unreachable HTTP GET /tasks returned HTTP 500
 and code was not handling this case except expecting networking errors.
 After that it tried to unmarshal empty response body that caused another sort of an error.

 This patch triggers error based on http response code, explicitly checking if response code
 is something unexpected (not HTTP 200 OK).

 Response status code for /tasks for changed from 202 Accepted to 200 OK according to swagger doc.
2017-07-31 21:14:11 +03:00
CI
ee1656980c functions: 0.3.35 release [skip ci] 2017-07-30 23:51:51 +00:00
CI
c93ed3b87c functions: 0.3.34 release [skip ci] 2017-07-30 23:40:24 +00:00
Reed Allman
53cbe2d5a4 stop riding the short bus, no clue why this stuff is here. only adds confusion, removing (#1)
server exposes Router field
2017-07-30 16:31:31 -07:00
CI
153487002b functions: 0.3.33 release [skip ci] 2017-07-28 19:06:32 +00:00
CI
5285b5d08e functions: 0.3.32 release [skip ci] 2017-07-28 18:54:44 +00:00
CI
329281232e functions: 0.3.31 release [skip ci] 2017-07-28 18:42:59 +00:00