trailblazer / trailblazer-operation

Trailblazer's Operation implementation.
https://trailblazer.to/2.1/docs/operation.html
87 stars 24 forks source link

Result#way & Result#wtf methods #16

Closed sveredyuk closed 4 years ago

sveredyuk commented 7 years ago

Hi, @apotonick

Continuing to our discuss how is important to debug operation workflow I found that method like flow is very important to track how steps were executed, what exactly each step returned and how it affect to decision what to do next. Ofc very useful will be logging as an option.

result.success? #=> false
result.flow #=> 
# BEGIN
# #1: build_model => some_result [success]
# #2: validate_model => some_result [failure]
# END

Should I try to implement this and PR?

P.S. and ofc wtf alias 🤣 and colorized output

apotonick commented 7 years ago

Hey @sveredyuk, I am almost finished extracting all the "flow" behavior into trailblazer-circuit, that's the place where we should implement the tracing and I would highly appreciate your help, especially with the data structure and rendering of the traced path.

The gem should be "presentable" in a few days towards the end of this week, I'll hit you up so you can jump on and help! Thanks!!! :beers:

sveredyuk commented 7 years ago

@apotonick on my way!

sadjow commented 6 years ago

@seuros see this issue, this would be helpful to have to improve development feedback loop.

panSarin commented 4 years ago

I think also https://github.com/trailblazer/trailblazer-developer could be helpful. Anyway i close this since it looks like outdated and please join us at zulipchat to discuss any other ideas/problems. https://trailblazer.zulipchat.com/join/od4yhihn6tra3ix39u4gks72/