{"push_id":2654046839,"size":18,"distinct_size":1,"ref":"refs/heads/feat/add-serverless-functions","head":"4568f641f2de14330476559f6d24d5f2a290a19f","before":"a944da3b0ea410dca2c57547ca1e6ba7f2057f34","commits":[{"sha":"2380e249dc858b0326a3bf99d7e541fdd0bd514b","author":{"name":"Thibault Charbonnier","email":"3c2e9133e272cb489e2fea0c4328cf56b08e4226@users.noreply.github.com"},"message":"hotfix(cli) read environment from **environ instead of printenv\n\nFollow up fix of ac0f3f6fe3048210a68f93ee00d88f10eb77274c\r\n\r\nFrom #3538","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/2380e249dc858b0326a3bf99d7e541fdd0bd514b"},{"sha":"80acbf848e897a469c728395bf255dcbfda4cff3","author":{"name":"Harry Bagdi","email":"f34cc0759bf93a7897f4224dbf1aa937ff4ab45f@gmail.com"},"message":"feat(conf) implement new 'plugins' property\n\nProblem\n-------\n\nAll plugins bundled with Kong are loaded by default. There exists no\nmechanism to disable any of the bundled plugins, which can yield\nconsiderable performance improvements in the runloop in specific\nworkloads.\n\nSolution\n--------\n\nIntroduce a config option which controls which of the bundled plugins\nare loaded into Kong.\n\nImplementation\n--------------\n\nIntroduce `plugins` config option and deprecate `custom_plugins` option.\nKong will load only plugins which are specified in `plugins` config\noptions. This also is inline in the goal of simplifying Kong's\nconfigurations.\n\nPlugins specified in `plugins` and `custom_plugins` are merged together\nto avoid a break change but `custom_plugins` will be removed in future.\n\nThe new `plugins` options can take in a sugar value `bundled` which\nloads all the plugins bundled with Kong.  This accomplishes  good\nusability and flexibility.\n\nFrom #3387","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/80acbf848e897a469c728395bf255dcbfda4cff3"},{"sha":"e709c953933e5ca6f6e9766fde15d8fe98a80721","author":{"name":"Thibault Charbonnier","email":"3c2e9133e272cb489e2fea0c4328cf56b08e4226@users.noreply.github.com"},"message":"feat(runloop) execute plugins on Nginx-produced errors\n\nContext\r\n-------\r\n\r\nBefore this patch, several scenarios would make Kong/Nginx produce\r\nerrors that did not execute plugins:\r\n\r\n1. Nginx-produced client errors (HTTP 4xx) on invalid requests per the\r\n   Nginx settings (e.g. headers too large, URI too large, etc...)\r\n2. Proxy TCP/HTTP errors on the last balancer try (e.g. connection\r\n   refused, connection timeout, read/write timeout, etc...)\r\n3. Any other Nginx-produced server errors (HTTP 5xx), if any\r\n\r\nBecause plugins are not executed in such cases, logging plugins in\r\nparticular do not get a chance to report such errors, leaving Kong\r\nadministrator blind when relying on bundled or homegrown logging\r\nplugins. Additionally, other plugins, e.g. transformation, do not get a\r\nchance to run either and could lead to scenarios where those errors\r\nproduce headers or response bodies that are undesired by the\r\nadministrator.\r\n\r\nThis issue is similar to that fixed by #3079, which handled the\r\nfollowing case:\r\n\r\n4. Requests short-circuited by Kong itself (vs Nginx in 1, 2, and 3.)\r\n\r\nSee also #490 & #892 for issues related to 4. This patches addresses 1,\r\n2, and 3.\r\n\r\nProblem\r\n-------\r\n\r\nNginx-produced errors (4xx and 5xx) are redirected to the\r\n`/kong_error_handler` location by way of the `error_page` directive,\r\nbut the runloop is not given a chance to run, since the error handler\r\nis only instructed to override the Nginx-defined HTML responses, and\r\nproduces Kong-friendly ones.\r\n\r\nIn short, a patch solving this issue must enable the runloop within the\r\nerror handler.\r\n\r\nProposed solution\r\n-----------------\r\n\r\nSeveral (many) possibilities were evaluated and explored to fix this.\r\nThe proposed patch is the result of many attempts, observations, and\r\nadjustments to initial proposals. In a gist, it proposes:\r\n\r\n* Executing the response part of the runloop in the error_page location.\r\n* Ensure that if the request part of the runloop did not have a chance\r\n  to run, we do build the list of plugins to execute (thus, global plugins\r\n  only since the request was not processed).\r\n* Ensure that if the request part of the runloop did run, we preserve\r\n  its `ngx.ctx` values.\r\n\r\nA few catches:\r\n\r\n* Currently, `ngx.req.get_method()` in the `error_page` location block\r\n  will return `GET` even if the request method was different (only\r\n  `HEAD` is preserved). A follow up patch for Nginx is being prepared.\r\n  As such, several tests are currently marked as \"Pending\".\r\n* When the `rewrite` phase did not get a chance to run, some parts of\r\n  the request may not have been parsed by Nginx (e.g. on HTTP 414), thus\r\n  some variables, such as `$request_uri` or request headers may not have\r\n  been parsed. Code should be written defensively against such\r\n  possibilities, and logging plugins may report incomplete request data\r\n  (but will still report the produced error).\r\n* The `uninitialized_variable_warn` directive must be disabled in the\r\n  `error_page` location block for cases when the `rewrite` phase did not\r\n  get a chance to run (Nginx-produced 4xx clients errors).\r\n* The `ngx.ctx` variables must be copied by reference for plugins to be\r\n  able to access it in the response phases when the request was\r\n  short-circuited by Nginx (e.g. HTTP 502/504 from the upstream module).\r\n* Using a named location for the `error_page` handler is not possible,\r\n  since in some cases the URI might not be parsed by Nginx, and thus Nginx\r\n  refuses to call named locations in such cases (e.g. on HTTP 414).\r\n\r\nResulting behavior\r\n------------------\r\n\r\nThe `03-plugins_triggering_spec.lua` test suite is now a good reference\r\nfor the behavior observed upon Nginx-produced errors. This behavior can\r\nbe classified in 2 categories:\r\n\r\n1. When the request is not parsed by Nginx (HTTP 4xx)\r\n    a. The `error_page` directive is called (`rewrite` and `access` are\r\n       skipped)\r\n    b. The runloop retrieves the list of **global** plugins to run (it\r\n       cannot retrieve more specific plugins since the request could not be\r\n       parsed)\r\n    c. The error content handler overrides the Nginx body with a Kong-friendly\r\n       one (unchanged from previous behavior)\r\n    d. It executes the `header_filter` phase of each global plugin.\r\n    e. It executes the `body_filter` phase of each global plugin.\r\n    f. It executes the `log` phase of each global plugin.\r\n\r\n2. When the error was produced during upstream module execution (HTTP 5xx)\r\n    a. The `rewrite` and `access` phases ran normally (we stashed the\r\n       `ngx.ctx` reference)\r\n    b. The `error_page` directive is called\r\n    c. The error content handler applies the original `ngx.ctx` by\r\n       reference\r\n    d. It does **not** run the plugins loop, since `ngx.ctx` contains\r\n       the list of plugins to run (global **and** specific plugins in\r\n       this case)\r\n    e. The error content handler overrides the Nginx body with a Kong-friendly\r\n       one (unchanged from previous behavior)\r\n    f. It executes the `header_filter` phase of each global plugin.\r\n    g. It executes the `body_filter` phase of each global plugin.\r\n    h. It executes the `log` phase of each global plugin.\r\n\r\nFix #3193\r\nFrom #3533","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/e709c953933e5ca6f6e9766fde15d8fe98a80721"},{"sha":"e09f36dc85f0c330c9c9f8f4fb72e9ae0abd55b2","author":{"name":"Hisham Muhammad","email":"f0958c370d7551796537ea709fd16ff14ea1be6f@gobolinux.org"},"message":"fix(healthchecks) report timeouts on passive healthchecks\n\nReport both connection timeouts at the `balancer` phase and\r\nupstream timeouts as `timeout` events when using passive healthchecks.\r\n\r\nPreviously, connection timeouts were being misreported as\r\n`tcp_failures`.  Upstream timeouts can now be caught due to recent\r\nrunloop improvements for executing plugins on Nginx-produced errors\r\n(#3533).\r\n\r\nIncludes regression tests for both cases.\r\n\r\nFrom #3539","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/e09f36dc85f0c330c9c9f8f4fb72e9ae0abd55b2"},{"sha":"79c8a8023da5c9eee3d37de3ecce533977458c9d","author":{"name":"Thibault Charbonnier","email":"3c2e9133e272cb489e2fea0c4328cf56b08e4226@users.noreply.github.com"},"message":"fix(nginx-conf) add missing 'default_type' directive (#3542)\n\nLikely the result of a merge gone wrong, since this value was added in\r\ncbe4a612ee85b395d176ab85b38561a3839db183.","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/79c8a8023da5c9eee3d37de3ecce533977458c9d"},{"sha":"d18903a15c62caed56b3eec5b04063f53cce589d","author":{"name":"Hisham Muhammad","email":"f0958c370d7551796537ea709fd16ff14ea1be6f@gobolinux.org"},"message":"tests(healthchecks) improve timing for send timeout in passive tests\n\nIncrease the delay and shorten the tolerance in the fail case,\r\nand restore a high timeout tolerance in the success case.\r\n\r\nFrom #3546","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/d18903a15c62caed56b3eec5b04063f53cce589d"},{"sha":"1dea9ec8294a5e9045030f6c0d99f6dfa1f08a7d","author":{"name":"Aapo Talvensaari","email":"1ed2fd9923e7a04484330a06c133ac7005128775@gmail.com"},"message":"fix(request-termination) implement custom delayed response callback\n\nNow the plugin does not short-circuit the runloop anymore.\r\n\r\nSee #3079\r\nFrom #3513","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/1dea9ec8294a5e9045030f6c0d99f6dfa1f08a7d"},{"sha":"77ebd66926bb1720b7d3add5545bd14f155b3358","author":{"name":"Aapo Talvensaari","email":"1ed2fd9923e7a04484330a06c133ac7005128775@gmail.com"},"message":"fix(aws-lambda) implement custom delayed response callback\n\nNow the plugin does not short-circuit the runloop anymore.\r\n\r\nSee #3079\r\nFrom #3512","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/77ebd66926bb1720b7d3add5545bd14f155b3358"},{"sha":"380535a6dd220f985d53b3075bb0009938c554ec","author":{"name":"Thibault Charbonnier","email":"3c2e9133e272cb489e2fea0c4328cf56b08e4226@me.com"},"message":"Revert \"fix(ip-restriction) raise priority to execute before auth plugins\"\n\nThis reverts commit dcb253643db67d775d58ec09ec7c97cef32f2961.\n\nSee #3526","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/380535a6dd220f985d53b3075bb0009938c554ec"},{"sha":"30125fe68e6d64a4ded4558f892d1cb24ff420e9","author":{"name":"Enrique García Cota","email":"f6adf09d43d34b488af2e45fc2d81e4e804cd847@gmail.com"},"message":"chore(deps) bump lua-cassandra to 1.3.0","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/30125fe68e6d64a4ded4558f892d1cb24ff420e9"},{"sha":"cba5abd03fd2a7eec2e4f3b4284f377f0da8eb69","author":{"name":"Enrique García Cota","email":"f6adf09d43d34b488af2e45fc2d81e4e804cd847@gmail.com"},"message":"feat(db) support C* req_rr & req_dc_rr lb policies in conf & DAOs\n\nSigned-off-by: Hisham Muhammad <hisham@gobolinux.org>","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/cba5abd03fd2a7eec2e4f3b4284f377f0da8eb69"},{"sha":"c66faf6a054bb00c355dc7d27208971bfb74a919","author":{"name":"Aapo Talvensaari","email":"1ed2fd9923e7a04484330a06c133ac7005128775@gmail.com"},"message":"feat(tools) add content-length header in responses module\n\nFrom #3540","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/c66faf6a054bb00c355dc7d27208971bfb74a919"},{"sha":"4b8ddf2dbc2d79fdfec2a53f6441d79fb434e8c1","author":{"name":"Harry Bagdi","email":"f34cc0759bf93a7897f4224dbf1aa937ff4ab45f@gmail.com"},"message":"feat(prometheus) bundle new prometheus plugin\n\nPlugin source code located at:\n\n  https://github.com/Kong/kong-plugin-prometheus\n\nFrom #3547","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/4b8ddf2dbc2d79fdfec2a53f6441d79fb434e8c1"},{"sha":"2eca06d7992243d7423c0649cfafaa548bfdf2f0","author":{"name":"Harry Bagdi","email":"f34cc0759bf93a7897f4224dbf1aa937ff4ab45f@gmail.com"},"message":"feat(conf) inject 'prometheus_metrics' shm if needed\n\nPrometheus plugin needs a dedicated shm to store metrics of Kong and\nit's upstream. This patch sets the injects the requried shm into NGINX\ntemplate if the plugin is available for use.  The size chosen for the\nshm is 5 MB, which is more than sufficient to store metrics related to a\nfew hundred services (tested for upto 200 services).\n\nThis is a temporary workaround until there is an API exposed from the\ncore which allows specifying custom shared dicts for plugin.  When such\nan API is introduced, the changes introduced by commit should be\nreverted.\n\nFrom #3547","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/2eca06d7992243d7423c0649cfafaa548bfdf2f0"},{"sha":"5b78105c5f162dd2fd0aefd3daf88c201e61bc11","author":{"name":"Thibault Charbonnier","email":"3c2e9133e272cb489e2fea0c4328cf56b08e4226@users.noreply.github.com"},"message":"chore(deps) bump min OpenResty version to 1.13.6.2\n\n* bump min OpenResty version to 1.13.6.2\r\n\r\nSee: https://openresty.org/en/changelog-1013006.html\r\n\r\n* bump OpenSSL version to 1.1.0h\r\n\r\nFrom #3498","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/5b78105c5f162dd2fd0aefd3daf88c201e61bc11"},{"sha":"f711fa709638593df920aaa0b0faf0bc5f6c3e47","author":{"name":"Thibault Charbonnier","email":"3c2e9133e272cb489e2fea0c4328cf56b08e4226@me.com"},"message":"chore(deps) bump LuaSec to 0.7alpha-2\n\nAdds compatibility with OpenSSL 1.1.0","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/f711fa709638593df920aaa0b0faf0bc5f6c3e47"},{"sha":"b5ac8859718c03a208a1f80a5d43285846f8c08a","author":{"name":"Aapo Talvensaari","email":"1ed2fd9923e7a04484330a06c133ac7005128775@gmail.com"},"message":"chore(azure-functions) bump to 0.1.1","distinct":false,"url":"https://api.github.com/repos/Kong/kong/commits/b5ac8859718c03a208a1f80a5d43285846f8c08a"},{"sha":"4568f641f2de14330476559f6d24d5f2a290a19f","author":{"name":"Nijiko Yonskai","email":"5fb26b3bd71070a6eb932cc185530a69b98e6b5d@gmail.com"},"message":"Merge branch 'next' into feat/add-serverless-functions","distinct":true,"url":"https://api.github.com/repos/Kong/kong/commits/4568f641f2de14330476559f6d24d5f2a290a19f"}]}
{"actor":{"display_login":"nijikokun"}}