Nebo15 / sage

A dependency-free tool to run distributed transactions in Elixir, inspired by Sagas pattern.
MIT License
912 stars 40 forks source link

New release? #50

Closed aspett closed 4 years ago

aspett commented 4 years ago

Hiya @AndrewDryga - we're using Sage quite a lot and have recently upgraded to elixir 1.10. We've noticed a lot of warnings on 0.4.0, and I'd forked with the intention of cleaning them up and pull requesting, but I see that they're all actually fixed on master. Keen to understand your appetite for a 0.5.0 or 1.0.0 release (appears there are some breaking API changes), and if there's anything I can do to help get there?


  lib/sage.ex:416                                                                                                                                                                                                                                                      

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/ca
tch                                                                                                                                                                                                                                                                    
  lib/sage/executor.ex:90                                                                                                                                                                                                                                              

warning: "else" shouldn't be used as the only clause in "defp", use "case" instead                                                                                                                                                                                     
  lib/sage/executor.ex:157                                                                                                                                                                                                                                             

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/ca
tch                                                                                                                                                                                                                                                                    
  lib/sage/executor.ex:170                                                                                                                                                                                                                                             

warning: "else" shouldn't be used as the only clause in "defp", use "case" instead                                                                                                                                                                                     
  lib/sage/executor.ex:173                                                                                                                                                                                                                                             

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/ca
tch                                                                                                                                                                                                                                                                    
  lib/sage/executor.ex:186                                                                                                                                                                                                                                             

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/ca
tch                                                                                                                                                                                                                                                                    
  lib/sage/executor.ex:292                                                                                                                                                                                                                                             

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/ca
tch                                                                                                                                                                                                                                                                    
  lib/sage/executor.ex:337                                                                                                                                                                                                                                             

warning: Inspect.Algebra.surround_many/5 is deprecated. Use Inspect.Algebra.container_doc/6 instead                                                                                                                                                                    
  lib/sage/inspect.ex:13: Inspect.Sage.inspect/2```
AndrewDryga commented 4 years ago

@aspett Hey :wave:, thank you for using Sage. Indeed they should be fixed and I'll push a release shortly, there is nothing you need to do about that 👍

AndrewDryga commented 4 years ago

Sage 0.6 is out, please try it and tell if there is something wrong. Thank you again 🎊

aspett commented 4 years ago

Hey @AndrewDryga thank you so much for that! I've updated it in one codebase, and so far so good. I noticed the removal of the {failed_stage, reason} argument in compensations which is a bit of a shame. We were using that in a couple of places to basically only retry if it failed on the same stage as the compensation was associated with. I think there will be ways to refactor how we do this though.

AndrewDryga commented 4 years ago

@aspett I see your use case. I think we should do something different to support it, mainly because if we pass other stage names to compensations we tell people that compensation can have complex logic when it's better to push for their pure design. Maybe we can add some API to the Sage itself to only accept retry command if an error occurred on the same stage.