Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add operator Echo #65

Merged
merged 1 commit into from
Jun 5, 2017
Merged

Add operator Echo #65

merged 1 commit into from
Jun 5, 2017

Conversation

shigemk2
Copy link
Contributor

overview

Add an operator for showing a message.

Screenshots

Just code echo: hello, world!
screenshot from 2017-05-31 00-45-21

You can see messages on the Job Instance Details page.
echo_log

@takai
Copy link
Contributor

takai commented May 30, 2017

I'd like to know the use-case and background. For debug purpose?

@shigemk2
Copy link
Contributor Author

Yes. It's for debug purpose.

I don't want to write execute: echo "hello, world" when showing the debug log.

@takai
Copy link
Contributor

takai commented May 31, 2017

Since execute invokes shell, the role seems to be clearly different from echo. It looks nice to me.

@takai takai requested review from takai and eisuke May 31, 2017 01:28
@eisuke
Copy link
Member

eisuke commented May 31, 2017

I want to know more detail use cases.
Why can not use the noop ​task?

@shigemk2
Copy link
Contributor Author

My purpose is to show a message log, but noop task show nothing.
It is why I send a Pull Request.

@eisuke
Copy link
Member

eisuke commented May 31, 2017

@shigemk2
さらに質問で恐縮ですが、echo の具体的な利用用途が想像できていないので知りたいです。

  • シェル経由を使いたくない理由
  • 具体的にこのタスクを使ってどういったことをやろうとしているのか
  • このタスクをどのように利用されることを想定しているのか

を知りたいです。

@shigemk2
Copy link
Contributor Author

shigemk2 commented Jun 2, 2017

@eisuke

すみません。日本語で失礼します。

echo のタスクについてですが、以下のように処理の最中にログ出力を行うことを想定しています。以下は簡単な例ですが、実際に運用する上ではログ出力のみを行うタスクが必要になります。

echo: start
execute: xxxx.sh
echo: end

同様のことを既存のexecuteタスクで行おうとした場合、execute: echo "start"と書かなければなりません。waitやsleepと同じく、シェル経由での出力ではなくログ出力を行うタスクを明示したかったのが今回のプルリクエストの意図でございます。

execute: echo "start"
execute: xxxx.sh
execute: echo "end"

@takai
Copy link
Contributor

takai commented Jun 4, 2017

Thank you for your feedback. I prefer this feature since it's based on use-cases 👍

@eisuke
Copy link
Member

eisuke commented Jun 5, 2017

なるほど。なんとなく状況は理解できました。
LGTM

@eisuke eisuke merged commit ea0c928 into cookpad:master Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants