You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/28 16:02:27 UTC

[GitHub] [skywalking-python] sonatype-lift[bot] commented on a diff in pull request #246: feat: add GreenletProfiler

sonatype-lift[bot] commented on code in PR #246:
URL: https://github.com/apache/skywalking-python/pull/246#discussion_r1008225278


##########
tests/e2e/base/provider/flask_provider.py:
##########
@@ -0,0 +1,32 @@
+# from gevent import monkey
+# monkey.patch_all()
+# import grpc.experimental.gevent as grpc_gevent     # key point
+# grpc_gevent.init_gevent()   # key point
+# from skywalking import config, agent  
+# config.logging_level = 'DEBUG'
+# config.init()
+# agent.start()
+
+import time
+import random
+from flask import Flask, request
+
+app = Flask(__name__)
+   
+@app.route('/artist', methods=['POST'])
+def artist():
+    try:
+
+        time.sleep(random.random())
+        payload = request.get_json()
+        print(f" args:{payload}")
+        return {"artist": "song"}
+        
+    except Exception as e:  # noqa
+        print(f"error: {e}")
+        return {'message': e}
+
+
+if __name__ == '__main__':
+    # noinspection PyTypeChecker
+    app.run(host='0.0.0.0', port=9090)

Review Comment:
   *hardcoded_bind_all_interfaces:*  Possible binding to all interfaces.
   
   ---
   
   <details><summary><b>ℹī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with ***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified `file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=349074067&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=349074067&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=349074067&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=349074067&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=349074067&lift_comment_rating=5) ]



##########
tests/e2e/case/profiling/greenlet/start_gevent.sh:
##########
@@ -0,0 +1,3 @@
+set -ex

Review Comment:
   *[SC2148](https://github.com/koalaman/shellcheck/wiki/SC2148):*  Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
   
   ---
   
   <details><summary><b>ℹī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with ***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified `file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=349074181&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=349074181&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=349074181&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=349074181&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=349074181&lift_comment_rating=5) ]



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org