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/08/23 02:13:32 UTC

[GitHub] [dolphinscheduler] jieguangzhou opened a new issue, #11605: [Python] [Switch Task] The default branch will report an error if it is not defined last

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

   ### 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
   
   <img width="687" alt="image" src="https://user-images.githubusercontent.com/31528124/186053396-a646d3cf-30a4-4d6b-9d23-0ca2ffce9162.png">
   
   
   ```shell
   Traceback (most recent call last):
     File "src/pydolphinscheduler/examples/task_switch_example.py", line 50, in <module>
       pd.submit()
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py", line 410, in submit
       json.dumps(self.task_definition_json),
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py", line 247, in task_definition_json
       return [task.get_define() for task in self.tasks.values()]
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py", line 247, in <listcomp>
       return [task.get_define() for task in self.tasks.values()]
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py", line 69, in get_define
       content = self.get_define_custom(camel_attr, self._DEFINE_ATTR)
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py", line 56, in get_define_custom
       val = getattr(self, attr, None)
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py", line 162, in task_params
       params["switchResult"] = self.condition.get_define()
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py", line 128, in get_define
       self.set_define_attr()
     File "/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py", line 112, in set_define_attr
       raise PyDSParamException(
   pydolphinscheduler.exceptions.PyDSParamException: Task Switch's parameter only support exactly one default branch.
   ```
   
   ### What you expected to happen
   
   Should be successful
   
   ### How to reproduce
   
   Do not define the default branch at the end
   
   ### Anything else
   
   _No response_
   
   ### 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


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #11605: [Python] [Switch Task] The default branch will report an error if it is not defined last

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

   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


[GitHub] [dolphinscheduler] zhongjiajie closed issue #11605: [BUG] [Python Switch Task] The default branch will report an error if it is not defined last

Posted by GitBox <gi...@apache.org>.
zhongjiajie closed issue #11605: [BUG] [Python Switch Task] The default branch will report an error if it is not defined last
URL: https://github.com/apache/dolphinscheduler/issues/11605


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