Commit Graph

1607 Commits

Author SHA1 Message Date
Reed Allman
639adf70eb ensure that certain request headers may not be overwritten / added to 2017-09-06 07:24:50 -07:00
Reed Allman
c10462cdc5 FN_MEMORY, FN_TYPE and precedence for app/route vars 2017-09-06 07:24:50 -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
CI
26b047a856 fnlb: 0.0.62 release [skip ci] fnlb-0.0.62 2017-09-08 19:11:27 +00:00
CI
28a5e5f392 functions: 0.3.95 release [skip ci] 0.3.95 2017-09-08 19:10:17 +00: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
CI
d680823c06 fnlb: 0.0.61 release [skip ci] fnlb-0.0.61 2017-09-08 17:10:39 +00:00
CI
d92253376a functions: 0.3.94 release [skip ci] 0.3.94 2017-09-08 17:09:26 +00:00
Reed Allman
4839edc12b add default to idle_timeout in hot fn docs (#309)
it's a bit funny that in hot / not functions idle_timeout appears but it's not such a big deal, either
2017-09-08 09:58:42 -07:00
CI
92ea1bd9d1 functions: 0.3.93 release [skip ci] 0.3.93 2017-09-08 16:58:15 +00:00
CI
e7c0c164c1 fnlb: 0.0.60 release [skip ci] fnlb-0.0.60 2017-09-08 16:48:05 +00:00
CI
aa4b61cc4f functions: 0.3.92 release [skip ci] 0.3.92 2017-09-08 16:46:55 +00:00
CI
af28b15780 fnlb: 0.0.59 release [skip ci] fnlb-0.0.59 2017-09-08 16:40:32 +00:00
CI
9275a592a8 functions: 0.3.91 release [skip ci] 0.3.91 2017-09-08 16:39:16 +00:00
CI
23becd70af fnlb: 0.0.58 release [skip ci] fnlb-0.0.58 2017-09-08 16:37:02 +00:00
CI
c5c4f83476 functions: 0.3.90 release [skip ci] 0.3.90 2017-09-08 16:35:49 +00: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
Chad Arimura
7b4744fe47 Update func.yaml 2017-09-08 09:26:08 -07:00
Reed Allman
59d95d660a push app/route cache down to datastore (#303)
cache now implements models.Datastore by just embedding one and then changing
GetApp and GetRoute to have the cache inside. this makes it really flexible
for things like testing, so now the agent doesn't automagically do caching,
now it must be passed a datastore that was wrapped with a cache datastore.
the datastore in the server can remain separate and not use the cache still,
and then now the agent when running fn 'for real' is configured with the cache
baked in. this seems a lot cleaner than what we had and gets the cache out of
the way and it's easier to swap in / out / extend.
2017-09-08 09:18:36 -07:00
Travis Reeder
e56d555c3e Updated docs for cli flag changes. 2017-09-07 15:53:28 -07:00
CI
3d8ca450bb fnlb: 0.0.57 release [skip ci] fnlb-0.0.57 2017-09-07 17:18:17 +00:00
CI
0902bbfb67 functions: 0.3.89 release [skip ci] 0.3.89 2017-09-07 17:16:56 +00:00
Reed Allman
423df1e7e9 Merge pull request #290 from fnproject/issue-276
Use context-bound SQL methods
2017-09-07 10:06:13 -07:00
Denis Makogon
8a337e744b Addresing new comments 2017-09-07 15:17:39 +03:00
Denis Makogon
57a577dfc9 Wiring new context with initial span 2017-09-06 21:55:52 +03:00
Denis Makogon
9a89366d1b Addressing review comments
reverting query string caching in favour of Go 1.9 sqlx features
 moving context definition out of call.End to upper level
2017-09-06 21:48:29 +03:00
Denis Makogon
6a541139a9 Make call.End more solid 2017-09-06 21:48:29 +03:00
Denis Makogon
d91d0fe79b Use appropriate query for route updating 2017-09-06 21:48:28 +03:00
Denis Makogon
b971595e44 Adding go-fmt.sh to circle config 2017-09-06 21:48:28 +03:00
Denis Makogon
6ac579f296 Formatting issues
Aren't we running go-fmt.sh in CI?
2017-09-06 21:48:28 +03:00
Denis Makogon
9066dca750 Use context-bound SQL methods
Changes:
   Exec     -> ExecContext
   Query    -> QueryContext
   QueryRow -> QueryRowContext

   Rebind and store all possible queries before using them

Closes: #276
2017-09-06 21:48:28 +03:00
CI
da74f538c0 fnlb: 0.0.56 release [skip ci] fnlb-0.0.56 2017-09-06 18:38:36 +00:00
CI
5244b2db90 functions: 0.3.88 release [skip ci] 0.3.88 2017-09-06 18:37:17 +00:00
CI
db76735000 fnlb: 0.0.55 release [skip ci] fnlb-0.0.55 2017-09-06 18:31:42 +00:00
CI
837f9b86ad functions: 0.3.87 release [skip ci] 0.3.87 2017-09-06 18:30:29 +00:00
Reed Allman
875300dcd1 Merge pull request #292 from fnproject/get-body
stop forcing GET bodies through ?payload
2017-09-06 11:26:23 -07:00
Reed Allman
3d7e7c5ce7 Merge pull request #294 from fnproject/fixDefaultHeadersMissing
Add headers to env for default functions
2017-09-06 11:20:08 -07:00
CI
ffb7a14b30 fnlb: 0.0.54 release [skip ci] fnlb-0.0.54 2017-09-06 15:36:03 +00:00
CI
c2b6d67a2f functions: 0.3.86 release [skip ci] 0.3.86 2017-09-06 15:34:46 +00:00
Chad Arimura
30fda80295 Update README.md 2017-09-06 08:25:34 -07:00
Chad Arimura
c79d867384 minor doc tweaks 2017-09-06 08:23:49 -07:00
Owen Cliffe
3a231d6296 review feedback 2017-09-06 15:05:47 +01:00
Owen Cliffe
33060bcb9e Add headers to env for default functions 2017-09-06 13:59:10 +01:00
CI
808c031b6f fnlb: 0.0.53 release [skip ci] fnlb-0.0.53 2017-09-05 22:33:22 +00:00
CI
a1fe5dacfb functions: 0.3.85 release [skip ci] 0.3.85 2017-09-05 22:32:02 +00:00
Reed Allman
a307a3b321 Merge pull request #291 from fnproject/root-readme-edit
Moved export of FN_REGISTRY in front of `fn run` which needs it set.
2017-09-05 15:20:24 -07:00
Reed Allman
4569b7fd69 stop forcing GET bodies through ?payload
it's unclear why we had this behavior in the first place, but alas, no more.

closes #264
2017-09-05 14:26:03 -07:00