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 2023/01/12 08:26:00 UTC

[GitHub] [skywalking-python] alidisi opened a new pull request, #266: Add hbase happy plugin

alidisi opened a new pull request, #266:
URL: https://github.com/apache/skywalking-python/pull/266

   <!--
       ⚠️ Please make sure to read this template first, pull requests that don't accord with this template
       maybe closed without notice.
       Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
       Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
   -->
   
   <!-- ==== πŸ› Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist πŸ‘‡ ====
   ### Fix <bug description or bug issue link>
   - [ ] Add a unit test to verify that the fix works.
   - [ ] Explain briefly why the bug exists and how to fix it.
        ==== πŸ› Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist πŸ‘† ==== -->
   
   <!-- ==== πŸ“ˆ Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist πŸ‘‡ ====
   ### Improve the performance of <class or module or ...>
   - [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
   - [ ] The benchmark result.
   ```text
   <Paste the benchmark results here>
   ```
   - [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
        ==== πŸ“ˆ Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist πŸ‘† ==== -->
   
   <!-- ==== πŸ†• Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist πŸ‘‡ ====
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [ ] Update the documentation to include this new feature.
   - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
        
   <!-- ==== πŸ“± Remove this line WHEN AND ONLY WHEN you're adding or modifying a plugin instrumentation, follow the checklist πŸ‘‡ ====
   ==== πŸ“± Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist πŸ‘† ==== -->
   ### <Feature description>
   - [x] If adding a new plugin, add a component id in [the main repo](https://github.com/apache/skywalking/blob/master/oap-server/server-starter/src/main/resources/component-libraries.yml)
   - [x]  If adding a new plugin, add a logo in [the UI repo](https://github.com/apache/skywalking-booster-ui/tree/main/src/assets/img/technologies)
   - [X] I have added the library to `pyproject.toml` (plugin group) by running `poetry add library --group plugins`
   - [X] I have rebuilt the `Plugins.md` documentation by running `make doc-gen`


-- 
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


[GitHub] [skywalking-python] alidisi commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
alidisi commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1381195643

   > Now the remaining thing is to wait on your PR for the Main repo to add Python to YAML [here](https://github.com/apache/skywalking/blob/fba96452f59a2e04d072c97592797c04e7fa6481/oap-server/server-starter/src/main/resources/component-libraries.yml#L331) then we are all set!
   
   I submit the PR #10272 to  update component-libraries.yml HBase languages python


-- 
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


[GitHub] [skywalking-python] wu-sheng merged pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng merged PR #266:
URL: https://github.com/apache/skywalking-python/pull/266


-- 
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


[GitHub] [skywalking-python] alidisi commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
alidisi commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380094955

   > * Component ID PR ref, [Add Micrometer as a componentΒ skywalking#10078](https://github.com/apache/skywalking/pull/10078)
   > * Icon PR ref, [Added Micrometer iconΒ skywalking-booster-ui#201](https://github.com/apache/skywalking-booster-ui/pull/201)
   > 
   > To verify it works, you should change both locally, and use your plugin to monitor a service. If all things work, you should be able to see the component name and icon on the topology on the UI.
   
   I have change the Component ID to eixted Component , and it can see the right icon on my local oap server Topology. Should   
   i close the PR and summit a new PR ?


-- 
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


[GitHub] [skywalking-python] wu-sheng commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380044672

   You need to submit pull requests to the main repo and UI to add component ID and icon.


-- 
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


[GitHub] [skywalking-python] wu-sheng commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380066585

   - Component ID PR ref, https://github.com/apache/skywalking/pull/10078
   - Icon PR ref, https://github.com/apache/skywalking-booster-ui/pull/201
   
   To verify it works, you should change both locally, and use your plugin to monitor a service. If all things work, you should be able to see the component name and icon on the topology on the UI.


-- 
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


[GitHub] [skywalking-python] Superskyyy commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
Superskyyy commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380778552

   Now the remaining thing is to wait on your PR for the Main repo to add component ID (remember to add Python to YAML) and LOGO to UI repo then we are all set! 


-- 
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


[GitHub] [skywalking-python] wu-sheng commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1379998747

   Have the component ID and icon been added? You clicked the checkbox, but I never saw the relative PR.


-- 
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


[GitHub] [skywalking-python] wu-sheng commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380139689

   https://github.com/apache/skywalking/blob/fba96452f59a2e04d072c97592797c04e7fa6481/oap-server/server-starter/src/main/resources/component-libraries.yml#L331
   
   Please update language in the YAML.


-- 
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


[GitHub] [skywalking-python] wu-sheng commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380136019

   You don't need to close and open, learn git, git rebase could fix this.


-- 
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


[GitHub] [skywalking-python] sonatype-lift[bot] commented on a diff in pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#discussion_r1067828961


##########
tests/plugin/data/sw_happybase/services/consumer.py:
##########
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import happybase
+
+
+if __name__ == '__main__':
+    from flask import Flask, jsonify
+
+    app = Flask(__name__)
+    connection = happybase.Connection('hbase', port=9090)
+    connection.open()
+    row = b'row_key'
+    info = {b'INFO:data': b'value'}
+    table_name = 'test'
+
+    def create_table():
+        families = {'INFO': {}}
+        connection.create_table(table_name, families)
+
+    def save_table():
+        table = connection.table(table_name)
+        table.put(row, info)
+
+    def get_row():
+        table = connection.table(table_name)
+        table.row(row)
+
+    @app.route('/users', methods=['POST', 'GET'])
+    def application():
+        create_table()
+        save_table()
+        get_row()
+        return jsonify({'INFO:data': 'value'})
+
+    PORT = 9090
+    app.run(host='0.0.0.0', port=PORT, debug=True)

Review Comment:
   *flask_debug_true:*  A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code.
   
   ---
   
   <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=367739365&lift_comment_rating=1) ] - [ [πŸ˜• Won't fix](https://www.sonatype.com/lift-comment-rating?comment=367739365&lift_comment_rating=2) ] - [ [πŸ˜‘ Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=367739365&lift_comment_rating=3) ] - [ [πŸ™‚ Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=367739365&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=367739365&lift_comment_rating=5) ]



##########
tests/plugin/data/sw_happybase/services/consumer.py:
##########
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import happybase
+
+
+if __name__ == '__main__':
+    from flask import Flask, jsonify
+
+    app = Flask(__name__)
+    connection = happybase.Connection('hbase', port=9090)
+    connection.open()
+    row = b'row_key'
+    info = {b'INFO:data': b'value'}
+    table_name = 'test'
+
+    def create_table():
+        families = {'INFO': {}}
+        connection.create_table(table_name, families)
+
+    def save_table():
+        table = connection.table(table_name)
+        table.put(row, info)
+
+    def get_row():
+        table = connection.table(table_name)
+        table.row(row)
+
+    @app.route('/users', methods=['POST', 'GET'])
+    def application():
+        create_table()
+        save_table()
+        get_row()
+        return jsonify({'INFO:data': 'value'})
+
+    PORT = 9090
+    app.run(host='0.0.0.0', port=PORT, debug=True)

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=367739366&lift_comment_rating=1) ] - [ [πŸ˜• Won't fix](https://www.sonatype.com/lift-comment-rating?comment=367739366&lift_comment_rating=2) ] - [ [πŸ˜‘ Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=367739366&lift_comment_rating=3) ] - [ [πŸ™‚ Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=367739366&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=367739366&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


[GitHub] [skywalking-python] wu-sheng commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1379988131

   Please git rebase your commits. 


-- 
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


[GitHub] [skywalking-python] alidisi commented on pull request #266: Add hbase happy plugin

Posted by GitBox <gi...@apache.org>.
alidisi commented on PR #266:
URL: https://github.com/apache/skywalking-python/pull/266#issuecomment-1380013264

   > Have the component ID and icon been added? You clicked the checkbox, but I never saw the relative PR.
   
   maybe ,I understand the mistake. I just add component ID in  skywalking/__init__.py  and  see the icon has been added , not submit PR alone 


-- 
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