You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/23 06:07:42 UTC

[GitHub] [dolphinscheduler] zhongjiajie opened a new issue, #10570: [improve] [python] variable and packge can not pass to python task type

zhongjiajie opened a new issue, #10570:
URL: https://github.com/apache/dolphinscheduler/issues/10570

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   When I write a code as below and pass funtion largest_size to `Python` arg definition, is should work because my code is correctly. But it failed because of python task can not get variable and libariy we already decalere.
   ```py
   from pathlib import Path
   
   download_dir = "/tmp/demo"
   store_dir = "dolphinscheduler"
   
   def largest_size():
       result = (None, 0)
       paths = Path(download_dir).joinpath(store_dir).glob("**/*")
   
       for path in paths:
           # skip is path is directory
           if path.is_dir():
               continue
           file_size = path.stat().st_size
           if result[0] is None or file_size > result[1]:
               result = (path.name, file_size)
       print(result)
   ```
   
   to make it work, I have to change to 
   
   ```diff
   - from pathlib import Path
   
   - download_dir = "/tmp/demo"
   - store_dir = "dolphinscheduler"
   
   def largest_size():
   +    from pathlib import Path
   + 
   +   download_dir = "/tmp/demo"
   +   store_dir = "dolphinscheduler"
   
       result = (None, 0)
       paths = Path(download_dir).joinpath(store_dir).glob("**/*")
   
       for path in paths:
           # skip is path is directory
           if path.is_dir():
               continue
           file_size = path.stat().st_size
           if result[0] is None or file_size > result[1]:
               result = (path.name, file_size)
       print(result)
   ```
   
   this is not very user firendly
   
   ### What you expected to happen
   
   ATT
   
   ### How to reproduce
   
   ATT
   
   ### Anything else
   
   ATT
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

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


Re: [I] [improve] [python] variable and packge can not pass to python task type [dolphinscheduler]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10570:
URL: https://github.com/apache/dolphinscheduler/issues/10570#issuecomment-1841867736

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #10570: [improve] [python] variable and packge can not pass to python task type

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #10570:
URL: https://github.com/apache/dolphinscheduler/issues/10570#issuecomment-1164002813

   Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can [join our slack](https://s.apache.org/dolphinscheduler-slack) and send your question to channel `#troubleshooting`


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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


Re: [I] [improve] [python] variable and packge can not pass to python task type [dolphinscheduler]

Posted by "zhongjiajie (via GitHub)" <gi...@apache.org>.
zhongjiajie closed issue #10570: [improve] [python] variable and packge can not pass to python task type
URL: https://github.com/apache/dolphinscheduler/issues/10570


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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


Re: [I] [improve] [python] variable and packge can not pass to python task type [dolphinscheduler]

Posted by "zhongjiajie (via GitHub)" <gi...@apache.org>.
zhongjiajie commented on issue #10570:
URL: https://github.com/apache/dolphinscheduler/issues/10570#issuecomment-1848264173

   already fix after we add https://github.com/apache/dolphinscheduler-sdk-python/blob/48586a3702df3f708044c8c03eedd442f21cf24f/setup.cfg#L79 to python sdk


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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