Skip to content

v1.2.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 22 Jul 00:52
· 1 commit to master since this release
c1bbfa9

func-e 1.2.0 removes shutdown hooks and migrates api.Run to func_e.Run

Replacing shutdown hooks with startup hooks

Shutdown hooks were very problematic in practice. To attempt them meant interfering with signal and context cancelation propagation, for limited value. Instead, we now collect the majority of info needed for XDS troubleshooting after reaching the startup line of envoy. This gives us most of the value without the problems.

As a consequence, func-e no longer self-zips its run directory on shutdown. However, this is not common practice with other tools and folks can do that on own as necessary.

api.Run -> func_e.Run

In a previous release, we accidentally added an implementation to our api package, causing package cycle problems. This moves the impl from api.Run to func_e.Run. This also solves a problem in the former implementation which routed library commands through the cmd runner.

We made a breaking change because at the moment, there is only one user of this API and maintainers of func-e also work on that. This allows us to remove the problem for future library users before it gets too difficult to remove.

A side effect is we moved main.go -> cmd/func-e/main.go which allows the root package to be used as a library.

Tighter contract on api.RunFunc

Now, that the ai package is not also an implementation, we have a chance to clean up some interface issues. Before, if you canceled an envoy run, the error returned was vague. We now follow envoy conventions, which return exit code 0 on interrupt. To translate this to go, it means api.RunFunc documents nil error in these cases, and func_e.Run has tests to prove it.

Full Changelog: v1.1.5...v1.2.0