Skip to content

Releases: goyek/goyek

2.1.0

17 Jan 21:28
v2.1.0
176c487
Compare
Choose a tag to compare

This release adds parallel task execution support.

Added

  • Add Task.Parallel to allow running tasks in parallel.
  • Add middleware.BufferParallel that helps in not getting mixed output from parallel tasks execution.
  • Add Input.Parallel to allow middlewares to have special handling for parallel tasks.

2.0.0

08 Feb 15:14
v2.0.0
ff86390
Compare
Choose a tag to compare

This release contains many breaking changes that are necessary to improve usability, extensibility, and customization. You can also find new supplemental features in goyek/x.

Added

  • Add DefaultFlow which is the default flow.
  • Add the top-level functions such as Define, Main, and so on which are wrappers for the methods of Flow called for DefaultFlow.
  • Flow.Main now exits on receiving the second SIGINT.
  • Add Flow.Print for printing the flow usage.
  • Flow.Main and Flow.Execute allow passing execution options.
  • Add NoDeps option to skip processing of all dependencies.
  • Add Skip option to skip processing of given tasks.
  • Add Flow.Usage, Flow.SetUsage for getting and setting the function that is called when an error occurs while parsing the flow.
  • Add NOOP status report for tasks that were intentionally not run to differentiate from being skipped during execution.
  • Add Flow.Use method o support task run interception using middlewares.
  • Add middleware package with ReportStatus, SilentNonFailed, DryRun, ReportLongRun middlewares.
  • TF.Error, TF.Errorf, TF.Fail may be called simultaneously from multiple goroutines.
  • Add NewRunner which can be useful for testing and debugging task actions and middlewares.
  • Add Flow.Undefine to unregister a task.
  • Add DefinedTask.SetName, DefinedTask.SetUsage, DefinedTask.Action, DefinedTask.SetAction, DefinedTask.SetAction, DefinedTask.SetDeps to enable modifying the task after the initial definition.
  • Add Flow.SetLogger for setting a custom log decorator that is used by A logging methods. If Logger implements Error, Errorf, Fatal, Fatalf, Skip, Skipf, they will be used by the A equivalent methods.
  • Add Flow.Logger for getting the log decorator (CodeLineLogger by default).
  • Add CodeLineLogger which is the default for Flow.Logger.
  • Add FmtLogger which is the default when using NewRunner.
  • Add A.Helper and CodeLineLogger.Helper methods that work like the equivalent method in the testing package.
  • Add A.Cleanup method that registers an action's cleanup function.
  • Add A.Setenv method that sets the environment variable and reverts the previous value during cleanup.
  • Add A.TempDir method that creates a temporary directory and removes it during cleanup.

Changed

  • Rename TF type to A as this is the Action parameter. This is the most impactful breaking change. This follows the convention used in the testing package to name the parameter type as the first letter of the "function type".
  • Task status reporting is disabled by default. It can be enabled by calling Flow.Use(middleware.ReportStatus). It reports NOOP for a task without an action.
  • Usually, the task does not call panic directly. panic failure message no longer contains a prefix with file and line information. The stack trace is printed instead. The behavior is based on testing package.
  • RegisteredTask.Deps returns []string (dependency names) for easier introspection.
  • Rename Flow.Register to Flow.Define.
  • Change Flow.RegisteredTask to Flow.DefinedTask.
  • DefinedTask.Deps returns Deps to facilitate reusing defined task's dependencies when creating a new one or redefining an existing one.
  • Change the Flow.DefaultTask field to Flow.SetDefault and Flow.Default methods.
  • Change Flow.Output field to Flow.SetOutput setter and Flow.Output getter.
  • Change Flow.Run to Flow.Execute to reduce possible confusion with Runner.
  • Flow.Execute returns an error instead of returning the exit code and does not print to output. It also has different arguments.
  • Flow.Execute accepts []string instead of ...string to make the API forward compatible.

Removed

Fixed

  • Fix panic handling so that panic(nil) and runtime.Goexit() now cause task failure.

2.0.0-rc.12

24 Nov 22:07
v2.0.0-rc.12
91f2922
Compare
Choose a tag to compare
2.0.0-rc.12 Pre-release
Pre-release

Removed

2.0.0-rc.11

14 Nov 21:42
v2.0.0-rc.11
02f5fd2
Compare
Choose a tag to compare
2.0.0-rc.11 Pre-release
Pre-release

Changed

  • Flow.Main no longer changes the working directory (undocumented behavior).

2.0.0-rc.10

07 Nov 09:29
v2.0.0-rc.10
012b122
Compare
Choose a tag to compare
2.0.0-rc.10 Pre-release
Pre-release

This release adds helpers methods for type A that are commonly used in the testing package.

Added

  • Add A.Cleanup method that registers an action's cleanup function.
  • Add A.Setenv method that sets the environment variable and reverts the previous value during cleanup.
  • Add A.TempDir method that creates a temporary directory and removes it during cleanup.

2.0.0-rc.9

06 Nov 01:42
v2.0.0-rc.9
5063068
Compare
Choose a tag to compare
2.0.0-rc.9 Pre-release
Pre-release

This release introduces a breaking change as it renames the heavily used TF type to A. This follows the convention used in testing package to name the parameter type as the first letter of the "function type".

Added

  • Add Status.String method for printing Status.

Changed

  • Rename TF type to A as this is the Action parameter.

2.0.0-rc.8

29 Oct 19:59
v2.0.0-rc.8
5f09246
Compare
Choose a tag to compare
2.0.0-rc.8 Pre-release
Pre-release

Added

  • Make logging more customizable. If Logger implements Error, Errorf, Fatal, Fatalf, Skip, Skipf then they will be used by the TF equivalent methods.

2.0.0-rc.7

29 Oct 12:50
v2.0.0-rc.7
7e90a45
Compare
Choose a tag to compare
2.0.0-rc.7 Pre-release
Pre-release

This release has all the features and changes planned for v2. The v2.0.0 is to be released in two months to give the users some time for feedback.

Added

  • Add TF.Helper and CodeLineLogger.Helper methods that work like the equivalent method in the testing package.

2.0.0-rc.6

27 Oct 17:22
v2.0.0-rc.6
16e9a14
Compare
Choose a tag to compare
2.0.0-rc.6 Pre-release
Pre-release

Added

  • Add NoDeps option to skip processing of all dependencies.
  • Add Skip option to skip processing of given tasks.

Changed

  • Report NOOP status if the task's action was nil.

2.0.0-rc.5

25 Oct 19:38
v2.0.0-rc.5
3f7e950
Compare
Choose a tag to compare
2.0.0-rc.5 Pre-release
Pre-release

Changed

  • Change DefinedTask to struct.