Commit Graph

29 Commits

Author SHA1 Message Date
Tolga Ceylan
aa17e3b7e0 fn: cpus documentation (#682) 2018-01-12 14:49:03 -08:00
Nigel Deakin
d1e02f42ed Update writing.md (#668)
Trying to make this a bit clearer
2018-01-10 09:21:55 -08:00
Reed Allman
20089c4e83 make headers quasi-consistent (#660)
possible breakages:

* `FN_HEADER` on cold are no longer `s/-/_/` -- this is so that cold functions
can rebuild the headers as they were when they came in on the request (fdks,
specifically), there's no guarantee that a reversal `s/_/-/` is the original
header on the request.
* app and route config no longer `s/-/_/` -- it seemed really weird to rewrite
the users config vars on these. should just pass them exactly as is to env.
* headers no longer contain the environment vars (previously, base config; app
config, route config, `FN_PATH`, etc.), these are still available in the
environment.

this gets rid of a lot of the code around headers, specifically the stuff that
shoved everything into headers when constructing a call to begin with. now we
just store the headers separately and add a few things, like FN_CALL_ID to
them, and build a separate 'config' now to store on the call. I thought
'config' was more aptly named, 'env' was confusing, though now 'config' is
exactly what 'base_vars' was, which is only the things being put into the env.
we weren't storing this field in the db, this doesn't break unless there are
messages in a queue from another version, anyway, don't think we're there and
don't expect any breakage for anybody with field name changes.

this makes the configuration stuff pretty straight forward, there's just two
separate buckets of things, and cold just needs to mash them together into the
env, and otherwise hot containers just need to put 'config' in the env, and then
hot format can shove 'headers' in however they'd like. this seems better than
my last idea about making this easier but worse (RIP).

this means:

* headers no longer contain all vars, the set of base vars can only be found
in the environment.
* headers is only the headers from request + call_id, deadline, method, url
* for cold, we simply add the headers to the environment, prepending
`FN_HEADER_` to them, BUT NOT upper casing or `s/-/_/`
* fixes issue where async hot functions would end up with `Fn_header_`
prefixed headers
* removes idea of 'base' vars and 'env'. this was a strange concept. now we just have
'config' which was base vars, and headers, which was base_env+headers; i.e.
they are disjoint now.
* casing for all headers will lean to be `My-Header` style, which should help
with consistency. notable exceptions for cold only are FN_CALL_ID, FN_METHOD,
and FN_REQUEST_URL -- this is simply to avoid breakage, in either hot format
they appear as `Fn_call_id` still.
* removes FN_PARAM stuff
* updated doc with behavior

weird things left:

`Fn_call_id` e.g. isn't a correctly formatted http header, it should likely be
`Fn-Call-Id` but I wanted to live to fight another day on this one, it would
add some breakage.

examples to be posted of each format below

closes #329
2018-01-09 10:08:30 -08:00
Travis Reeder
580dd3e5cb Removes FN_PARAM_xxx (#661) 2018-01-09 16:42:25 +00:00
Tolga Ceylan
880773a269 fn: FN_DEADLINE description (#638) 2018-01-03 16:17:40 -08: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
904f288ed6 Replace FN_ROUTE with FN_PATH 2017-09-20 11:35:18 -07:00
Travis Reeder
9f87b1ead0 Client generator update (#262)
* Generated a bunch of clients.

* Builds go client.

* Removed test line.

* Changed dependencies to fnproject/fn_go

* Fix tests.
2017-09-14 10:57:22 -07:00
Reed Allman
debbef96fa add headers right way, more docs 2017-09-06 07:34:55 -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
d5250b4f0c Update writing.md 2017-09-08 09:27:31 -07:00
Chad Arimura
8f1a77123e Update writing.md 2017-09-08 09:27:06 -07:00
Chad Arimura
03bb8157cf Update writing.md 2017-09-08 09:26:49 -07:00
Chad Arimura
227e41ef3c Update writing.md 2017-09-08 09:26:29 -07:00
Travis Reeder
e56d555c3e Updated docs for cli flag changes. 2017-09-07 15:53:28 -07:00
Travis Reeder
1f3218f8dd WIP: working on hot lambda functions. 2017-06-29 08:00:29 -07:00
Denis Makogon
1a2a805740 Update functions_{lang} tool to recent git source 2017-06-06 19:50:33 +03: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
Travis Reeder
69f0201818 Some small cleanup to docs. 2017-05-26 18:54:26 +00:00
Travis Reeder
4b9bba352d Rename location. 2017-05-15 11:00:15 -07:00
Travis Reeder
d0ca2f9228 Moved runner into this repo, update dep files and now builds. 2017-04-21 07:42:42 -07:00
Travis Reeder
615ae5c36f Mass s&r: iron-io -> kumokit 2017-04-19 09:49:12 -06:00
Goutham Veeramachaneni
fae66764b4 Config EnvVars passed without leading _ (#534)
* Earlier X=Y was passed as _X=Y

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-03-03 16:17:00 -08:00
C Cirello
f1e1d69e81 doc: add language libraries to the documentation (#354)
Fixes #319
2016-11-29 00:00:52 +01:00
C Cirello
02d3b18497 all: drop CONFIG_ prefix for configuration (#297)
Fixes #251
2016-11-15 19:19:21 +01:00
Travis Reeder
0d71e1e38e Docs update with new fnctl commands (#273)
* Added high level roadmap.

* Changed to funtion.yaml.

* Added logo

* updating quickstart code example, WIP, waiting on another merge.

* Minor updates.

* Changed function.yaml to func.yaml and updated fnctl README.
2016-11-15 01:40:05 +01:00
Travis Reeder
85e15fe48a More doc updates, explanation of serverless. (#228)
* More doc updates, explanation of serverless.

* Moved howto directory to examples and some minor doc updates.

* Added apps and routes docs.

* Fixes for Carlos' comments.

* Added bit about importing lambda functions.
2016-11-08 09:44:08 -08:00
Travis Reeder
4421c151c5 Docs on writing functions and the functions format. (#203)
* WIP on writing functions and the functions format.

* Added more docs on writing functions.

* Running on windows docs.

* Linked README to writing.md

* Minor fixes from PR feedback.
2016-11-03 10:53:36 -07:00