Releases: goyek/goyek
Releases · goyek/goyek
2.2.0
This release adds flow execution middlewares.
Added
- Add
Flow.UseExecutor
to support flow execution interception using middlewares. - Add
middleware.ReportFlow
flow execution middleware which reports the flow execution status.
Change
- Extract the flow result reporting from
Flow.Main
tomiddleware.ReportFlow
. Add the middleware usingFlow.UseExecutor
to achieve a backward compatible behavior.
Removed
- Drop support for Go 1.11 and 1.12.
2.1.0
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
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 ofFlow
called forDefaultFlow
. Flow.Main
now exits on receiving the second SIGINT.- Add
Flow.Print
for printing the flow usage. Flow.Main
andFlow.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 withReportStatus
,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 byA
logging methods. IfLogger
implementsError
,Errorf
,Fatal
,Fatalf
,Skip
,Skipf
, they will be used by theA
equivalent methods. - Add
Flow.Logger
for getting the log decorator (CodeLineLogger
by default). - Add
CodeLineLogger
which is the default forFlow.Logger
. - Add
FmtLogger
which is the default when usingNewRunner
. - Add
A.Helper
andCodeLineLogger.Helper
methods that work like the equivalent method in thetesting
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 toA
as this is theAction
parameter. This is the most impactful breaking change. This follows the convention used in thetesting
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 reportsNOOP
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 ontesting
package. RegisteredTask.Deps
returns[]string
(dependency names) for easier introspection.- Rename
Flow.Register
toFlow.Define
. - Change
Flow.RegisteredTask
toFlow.DefinedTask
. DefinedTask.Deps
returnsDeps
to facilitate reusing defined task's dependencies when creating a new one or redefining an existing one.- Change the
Flow.DefaultTask
field toFlow.SetDefault
andFlow.Default
methods. - Change
Flow.Output
field toFlow.SetOutput
setter andFlow.Output
getter. - Change
Flow.Run
toFlow.Execute
to reduce possible confusion withRunner
. 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
- Remove parameters API and out-of-the-box flags (
-v
,-wd
). - Remove
A.Cmd
. Usegithub.com/goyek/goyek/x/cmd
or your helper instead.
Fixed
- Fix panic handling so that
panic(nil)
andruntime.Goexit()
now cause task failure.
2.0.0-rc.12
Removed
- Remove
A.Cmd
. Usegithub.com/goyek/goyek/x/cmd
or your own helper instead.
2.0.0-rc.11
Changed
Flow.Main
no longer changes the working directory (undocumented behavior).
2.0.0-rc.10
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
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 printingStatus
.
Changed
- Rename
TF
type toA
as this is theAction
parameter.
2.0.0-rc.8
Added
- Make logging more customizable. If
Logger
implementsError
,Errorf
,Fatal
,Fatalf
,Skip
,Skipf
then they will be used by theTF
equivalent methods.
2.0.0-rc.7
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
andCodeLineLogger.Helper
methods that work like the equivalent method in thetesting
package.
2.0.0-rc.6
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.