You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by al...@apache.org on 2020/04/18 07:48:46 UTC

[openwhisk-wskdebug] branch optimistic-concurrency created (now c473e8f)

This is an automated email from the ASF dual-hosted git repository.

alexkli pushed a change to branch optimistic-concurrency
in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdebug.git.


      at c473e8f  do not check for concurrency in api-docs as that costs too much time

This branch includes the following new commits:

     new c473e8f  do not check for concurrency in api-docs as that costs too much time

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[openwhisk-wskdebug] 01/01: do not check for concurrency in api-docs as that costs too much time

Posted by al...@apache.org.
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 <ak...@adobe.com>
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) {