Commit Graph

119 Commits

Author SHA1 Message Date
Denis Makogon
1c8120f3f9 Updating route path 2017-09-25 17:54:04 +03:00
Denis Makogon
4c19ad4c96 Adding Python hot fn sample 2017-09-25 17:48:39 +03:00
Travis Reeder
904f288ed6 Replace FN_ROUTE with FN_PATH 2017-09-20 11:35:18 -07:00
Travis Reeder
87deba45e2 Updated docs. 2017-09-18 17:17:00 -07:00
Travis Reeder
5476665ea9 Quick link fix. 2017-09-18 17:17:00 -07:00
Travis Reeder
4f653e3595 wip 2017-09-18 17:17:00 -07:00
Travis Reeder
75e2051169 Example app structure. round 1. 2017-09-18 17:16:59 -07:00
Travis Reeder
fdc3e76359 wip 2017-09-18 17:16:59 -07:00
Reed Allman
2341456334 FN_ prefix env vars
this adds `FN_` in front of env vars that we are injecting into calls, for
namespacing reasons. this will break code relying on the current variables but
if we want to do this, the chance is now really. alternatively, we could
maintain both the old and new for a short period of time to ease the
adjustment (speak now...). updated the docs, as well.

this also adds tests for the notoriously finicky configuration of the env vars
and headers when setting up a call. this won't test the container / request
for the call is actually receiving them, but it's a decent start and will yell
loudly enough upon formatting breakage.

added back FXLB_WAIT to a couple places so the lb can ride again

one thing for feedback:

headers are a bit confusing at the moment (not from this change, but that
behavior is kept here for now), we've a chance to fix them. currently, headers
in the request __are not__ prefixed with `FN_HEADER_`, i.e. 'hot'+sync containers
will receive `Content-Length` in the http request headers, yet a 'cold'
container from the same request would receive `FN_HEADER_Content-Length` in
its environment. This is additionally confusing because if this function were
hot+async, it would receive `FN_HEADER_Content-Length` in the headers, where
just changing it to sync goes back to `Content-Length`. If that was confusing,
then point made ;)

I propose to remove the `FN_HEADER_` prefix for request headers in the
environment, so that the request headers and env will match, as request
headers already are of this format (not prefixed). please lmk thoughts here

Would be fine with going back to the 'plain' vars too, then this patch will
mostly just be adding tests and changing `FN_FORMAT` to `FORMAT`. obviously,
from the examples, it's a bit ingrained now. anyway, entirely up to y'all.
2017-09-06 07:24:50 -07:00
Reed Allman
fd1afb180c Merge pull request #300 from fnproject/cli-flag-changes
Updated docs for cli flag changes.
2017-09-08 12:00:16 -07:00
Chad Arimura
7b4744fe47 Update func.yaml 2017-09-08 09:26:08 -07:00
Travis Reeder
e56d555c3e Updated docs for cli flag changes. 2017-09-07 15:53:28 -07:00
Travis Reeder
eeec746ca2 Dropped the docker owner from function name. 2017-08-29 09:02:02 -07:00
David Delabassee
b6bcb9cb01 Set runtime to 'java' to have the pom.xml created (#217)
When the runtime is ['assumed'](11b5c4ce67/cli/init.go (L182-L188)) (i.e. not explicitly set to 'java'), the [pom.xml isn't created(85ae711447/cli/langs/java.go (L38-L45)) 
and [init fail](85ae711447/cli/langs/java.go (L99-L101)).
2017-08-29 08:59:53 -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
5370bc86fa Added Go boilerplate 2017-07-31 16:01:03 -07:00
Travis Reeder
b0494cd25d Boom, circle good to go, releases on commits to master too (#7)
* circle

* circle

* circle

* circle

* circle

* CIRCLE

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* circle

* cijrcle

* circle

* circle

* circle

* circle

* c

* c

* circle

* testing release

* circle

* trying release

* c

* c

* functions: 0.3.25 release [skip ci]

* c

* functions: 0.3.26 release [skip ci]

* fn tool: 0.3.19 release [skip ci]

* testing cli release only

* fn tool: 0.3.20 release [skip ci]

* fn tool: 0.3.21 release [skip ci]

* hopefully the last thing

* fn tool: 0.3.22 release [skip ci]

* c

* fn tool: 0.3.23 release [skip ci]

* almost there....

* fn tool: 0.3.24 release [skip ci]

* fnlb: 0.0.2 release [skip ci]

* fn tool: 0.3.25 release [skip ci]

* fnlb: 0.0.3 release [skip ci]

* Added back in commented out lines.

* Fixing middleware example.
2017-07-26 17:38:37 -07:00
Travis Reeder
48e3781d5e Rename to GitHub (#3)
* circle

* Rename to github and fn->cli

*  Rename to github and fn->cli
2017-07-26 10:50:19 -07:00
James Jeffrey
cf2c3cf404 Use chi style middle ware 2017-07-19 13:44:26 -07:00
Travis Reeder
f8b8c6f7e8 Update for testing functions. 2017-07-17 11:41:10 -07:00
Travis Reeder
c605317250 More middleware updates. 2017-07-13 14:40:36 -07:00
Travis Reeder
6d2c503010 Updated middleware example to return error format that fn understands. 2017-07-13 10:21:02 -07:00
Reed Allman
b793d97a07 Merge branch 'detect_vendor' into 'master'
Detect vendor dir by having the func be on the go path

See merge request !95
2017-07-07 15:47:13 -07:00
James Jeffrey
7343df70de Add example of using vendor for golang 2017-07-07 10:35:36 -07:00
James Jeffrey
81e39b210d Add go fmt 2017-07-07 10:14:08 -07:00
Travis Reeder
47d78c3307 Fixed slice index out of bounds error from fix-logs 2017-06-21 08:24:06 -07:00
Travis Reeder
8800ecc5c2 Merge branch 'func_logs2' into 'master'
Func logs feature

See merge request !66
2017-06-20 11:51:26 -07:00
Travis Reeder
8c96d3ba2f Fixes async payload passing for #68. 2017-06-20 11:32:51 -07:00
James
8a3edb8309 All of the changes for func logs 2017-06-19 11:38:11 -07:00
Travis Reeder
c6a315ae7d Fixed up lambda-node to work with multi-stage changes. 2017-06-19 11:28:14 -07:00
Reed Allman
9edacae928 clean up hotf(x) concurrency, rm max c
this patch gets rid of max concurrency for functions altogether, as discussed,
since it will be challenging to support across functions nodes. as a result of
doing so, the previous version of functions would fall over when offered 1000
functions, so there was some work needed in order to push this through.
further work is necessary as docker basically falls over when trying to start
enough containers at the same time, and with this patch essentially every
function can scale infinitely. it seems like we could add some kind of
adaptive restrictions based on task run length and configured wait time so
that fast running functions will line up to run in a hot container instead of
them all creating new hot containers.

this patch takes a first cut at whacking out some of the insanity that was the
previous concurrency model, which was problematic in that it limited
concurrency significantly across all functions since every task went through
the same unbuffered channel, which could create blocking issues for all
functions if the channel is not picked off fast enough (it's not apparent that
this was impossible in the previous implementation). in any event, each
request has a goroutine already, there's no reason not to use it. not too hard
to wrap a map in a lock, not sure what the benefits were (added insanity?) in effect
this is marginally easier to understand and less insane (marginally). after
getting rid of max c this adds a blocking mechanism for the first invocation
of any function so that all other hot functions will wait on the first one to
finish to avoid a herd issue (was making docker die...) -- this could be
slightly improved, but works in a pinch. reduced some memory usage by having
redundant maps of htfnsvr's and task.Requests (by a factor of 2!). cleaned up
some of the protocol stuff, need to clean this up further. anyway, it's a
first cut. have another patch that rewrites all of it but was getting into
rabbit hole territory, would be happy to oblige if anybody else has problems
understanding this rat's nest of channels. there is a good bit of work left to
make this prod ready (regardless of removing max c).

a warning that this will break the db schemas, didn't put the effort in to add
migration stuff since this isn't deployed anywhere in prod...

TODO need to clean out the htfnmgr bucket with LRU
TODO need to clean up runner interface
TODO need to unify the task running paths across protocols
TODO need to move the ram checking stuff into worker for noted reasons
TODO need better elasticity of hot f(x) containers
2017-06-05 20:04:13 -07:00
Travis Reeder
f628e39490 Moving dep builds into Dockerfile and multi-stage builds. 2017-06-06 15:02:08 -07:00
Chad Arimura
dd816dece6 dont upset the java peeps 2017-06-05 14:29:56 -07:00
Chad Arimura
c8fab6f224 changed mind, back to hello-{lang} for better naming of tutorial 2017-06-05 14:27:30 -07:00
Chad Arimura
fea5fbf7b0 update gitignore, remove func.yaml and gitignore for php 2017-06-05 14:15:14 -07:00
Chad Arimura
d72343a697 update all hello examples to use /{language} as the default route instead of /hello, also renamed hello.payload.json to sample.payload.json 2017-06-05 14:07:44 -07:00
Chad Arimura
17bbef04f5 adding rust, fixing python/php, adding ability to detect rusts src/main.rs file 2017-06-05 12:32:23 -07:00
Mukhtar Haji
cd0b68dfb7 First iteration of support for Java 2017-06-01 02:19:37 -07:00
James Jeffrey
c7a5bae587 Merge branch 'chad-gitlab-url-change' into 'master'
Chad gitlab url change

See merge request !28
2017-05-30 11:34:22 -07:00
Travis Reeder
af918fdfe9 Fix run env vars passed in via command line to test locally and updated docs to match. 2017-05-30 10:54:34 -07:00
Denis Makogon
31b4ac4516 Address broken tests 2017-05-30 08:50:53 -07:00
Chad Arimura
49d397293b global url replace 2017-05-29 17:10:47 -07:00
Chad Arimura
63b9e1ce20 update php tutorial 2017-05-26 15:51:14 -07:00
Chad Arimura
b49337d4e0 php langhelper (needs funcy/php), tutorial 2017-05-26 12:36:38 -07:00
Chad Arimura
82f608558b update ruby helloworld 2017-05-25 15:38:39 -07:00
Chad Arimura
c52039eb35 readme mods 2017-05-25 14:54:11 -07:00
Chad Arimura
bf642a0a83 readme mods 2017-05-25 14:52:13 -07:00
Chad Arimura
12d44fab6a readme mods 2017-05-25 14:51:10 -07:00
Chad Arimura
2c899e3905 readme mods 2017-05-25 14:44:02 -07:00
Chad Arimura
da09f18741 readme mods 2017-05-25 14:42:33 -07:00