How to regard $ kedro run as succeeded or failed

Hi all,
I would like to know the way of judgement whether or not kedro could run correctly.

Although I got some warnings as a result of executing $ kedro run ,
it seemed to complete without any crucial issue because there was no error.

I took a look some documents about it, but unfortunately I could not identify the clear criteria.
What would you check the result of $ kedro run in order to make a judgement of success?

If you would need any additional info, please kindly ask me anything.
Any help would be appreciated!
@Minyus @DataEngineerOne

Hi @Asuka ,

If you use bash to run kedro run, you can add command which will be run only if the previous command succeeds using && as the separator.
For example, running the following command will show “Kedro pipeline completed!” only if kedro run succeeds.

kedro run && echo "Kedro pipeline completed!"

Can this be your solution?

2 Likes

Thank you so much for your reply @Minyus!
Yes I could run its command kedro run && echo Kedro pipeline completed! as you mentioned.
( As a result I did confirm kedro hadn’t completed, unfortunately! )
This question should be closed. I would appreciate your help :100:

1 Like

Typically if you see something like this in your run logs:

2021-02-12 11:03:59,016 - kedro.runner.sequential_runner - INFO - Pipeline execution completed successfully.

it means htat it’s completed successfully. As an alternative to using && - you can can also do:

$ kedro run
<snip>
$ echo $?
0

if you see 0, it means the last command executed successfully, if you see anything non-0, it means it didn’t.

2 Likes

Thanks a lot for your comment @zain!
I was able to confirm 1 as a result of $ echo $? after executing $ kedro run.
It is highly versatile, and I would use it other than kedro run too :sparkles:
I appreciate your help!

1 Like

additionally you can add ||

kedro run && echo "Kedro pipeline completed!" || "kedro pipeline failed"
2 Likes

Thank you for sharing its tip @waylonwalker!
It also worked and I would update my own doc as you mentioned :100: