This is an automated email from the ASF dual-hosted git repository. alexkli pushed a commit to branch optimistic-concurrency in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdebug.git
commit c473e8f017e22d1bff0cca4eab1a9df14a71c0c0 Author: Alexander Klimetschek <[email protected]> AuthorDate: Sat Apr 18 00:47:51 2020 -0700 do not check for concurrency in api-docs as that costs too much time it will later handle the concurrency error anyway --- src/agentmgr.js | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/agentmgr.js b/src/agentmgr.js index 3905847..25b9b1f 100644 --- a/src/agentmgr.js +++ b/src/agentmgr.js @@ -185,16 +185,7 @@ class AgentMgr { debug2("started local ngrok proxy"); } else { - if (this.argv.disableConcurrency) { - this.concurrency = false; - - } else { - this.concurrency = await this.openwhiskSupports("concurrency"); - debug2(`fetched openwhisk /api/v1/api-docs to detect concurrency`); - if (!this.concurrency) { - log.warn("This OpenWhisk does not support action concurrency. Debugging will be a bit slower. Consider using '--ngrok' which might be a faster option."); - } - } + this.concurrency = !this.argv.disableConcurrency; if (this.concurrency) { // normal fast agent using concurrent node.js actions @@ -572,19 +563,19 @@ class AgentMgr { activationListFilterOnlyBasename: v => v.startsWith("2018") || v.startsWith("2017"), // hack nodejs8: v => !v.startsWith("2018") && !v.startsWith("2017"), - concurrency: async (_, wsk) => { - // check swagger api docs instead of version to see if concurrency is supported - try { - const swagger = await wsk.actions.client.request("GET", "/api/v1/api-docs"); - - if (swagger && swagger.definitions && swagger.definitions.ActionLimits && swagger.definitions.ActionLimits.properties) { - return swagger.definitions.ActionLimits.properties.concurrency; - } - } catch (e) { - log.warn('Could not read /api/v1/api-docs, setting max action concurrency to 1') - return false; - } - } + // concurrency: async (_, wsk) => { + // // check swagger api docs instead of version to see if concurrency is supported + // try { + // const swagger = await wsk.actions.client.request("GET", "/api/v1/api-docs"); + + // if (swagger && swagger.definitions && swagger.definitions.ActionLimits && swagger.definitions.ActionLimits.properties) { + // return swagger.definitions.ActionLimits.properties.concurrency; + // } + // } catch (e) { + // log.warn('Could not read /api/v1/api-docs, setting max action concurrency to 1') + // return false; + // } + // } }; const checker = FEATURES[feature]; if (checker) {
