You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/16 16:41:25 UTC

[GitHub] [incubator-superset] bkyryliuk opened a new pull request #10345: Pin slack client, breaking change

bkyryliuk opened a new pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345


   Slack client versions > 2.5.0 do not accept the file content anymore. It broke the slack integration.
   Added test that would capture undesired upgrades.
   Eventually we can fix via writing a tmp file and then uploading it.
   
   ### TEST PLAN
   * ipython
   * unit test
   * dropbox staging
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
villebro commented on pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345#issuecomment-659902711


   https://github.com/slackapi/python-slackclient/issues/728
   
   Seems like making it a file-like object (`io.BytesIO`) instead of `bytearray` fixes it in `>2.5.0, <2.7.2`. Since `2.7.2` is already out, we should probably bump to that version?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter commented on pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345#issuecomment-659543091


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=h1) Report
   > Merging [#10345](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/e4c9c7364bbcecdbbe008ce5e6ce9065c28b3dfc&el=desc) will **decrease** coverage by `11.14%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10345/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #10345       +/-   ##
   ===========================================
   - Coverage   70.61%   59.47%   -11.15%     
   ===========================================
     Files         601      405      -196     
     Lines       32225    13269    -18956     
     Branches     3257     3257               
   ===========================================
   - Hits        22757     7892    -14865     
   + Misses       9365     5196     -4169     
   - Partials      103      181       +78     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.47% <ø> (+<0.01%)` | :arrow_up: |
   | #python | `?` | |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupPluginsExtra.js](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwUGx1Z2luc0V4dHJhLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [340 more](https://codecov.io/gh/apache/incubator-superset/pull/10345/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=footer). Last update [e4c9c73...bdd31b3](https://codecov.io/gh/apache/incubator-superset/pull/10345?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
villebro commented on pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345#issuecomment-659650482


   @bkyryliuk do I understand correctly that the new version doesn't support file-like objects, but requires files to be persisted to disk prior to submission?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk commented on pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
bkyryliuk commented on pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345#issuecomment-661143330


   > [slackapi/python-slackclient#728](https://github.com/slackapi/python-slackclient/issues/728)
   > 
   > Seems like making it a file-like object (`io.BytesIO`) instead of `bytearray` fixes it in `>2.5.0, <2.7.2`. Since `2.7.2` is already out, we should probably bump to that version?
   
   This seems to work:
   ```
    response = client.files_upload(channels="#bogdan-test2", file=io.BytesIO(b'blabla'), title="Test upload", filename="test.png")
   ```
   
   I am on PTO today, won't be able to test this approach on our staging. 
   My suggestion here would be to merge the library downgrade and I can do a fix forward a bit later this week.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk commented on pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
bkyryliuk commented on pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345#issuecomment-659685975


   > @bkyryliuk do I understand correctly that the new version doesn't support file-like objects, but requires files to be persisted to disk prior to submission?
   
   yes
   I did not dig much into the changes in the lib. We have been using 2.5.0 for last 3 month at dropbox.
   I used this snippet in ipython to find the version that had the regression
   ```
   import logging
   logging.basicConfig(level=logging.DEBUG)
   
   import os
   from slack import WebClient
   from slack.errors import SlackApiError
   slack_token='your_token'
   client = WebClient(token=slack_token)
   fn = '/Users/bogdankyryliuk/Desktop/Screen Shot 2020-07-16 at 9.03.49 AM.png'
   in_file = open(fn, "rb")
   data = in_file.read()
   response = client.files_upload(
     channels="#bogdan-test2",
     file=data,
     title="Test upload"
   )
   ```


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] mistercrunch commented on pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
mistercrunch commented on pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345#issuecomment-659859955


   Had the issue been reported on their GitHub? If so can we link to it? If not can we report it?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk merged pull request #10345: fix: pin slack client, breaking change

Posted by GitBox <gi...@apache.org>.
bkyryliuk merged pull request #10345:
URL: https://github.com/apache/incubator-superset/pull/10345


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org