2022-03-05 17:12:28 +03:00
|
|
|
# Feedback loop
|
|
|
|
|
2022-03-06 02:05:54 +03:00
|
|
|
A general purpose tool to set up good feedback loops and share them with your team.
|
|
|
|
|
2022-03-06 15:28:54 +03:00
|
|
|
## Features
|
2022-03-05 19:03:53 +03:00
|
|
|
|
2022-03-06 15:28:54 +03:00
|
|
|
### Run feedback loops
|
|
|
|
|
|
|
|
Use the `feedback` command to set up a feedback loop for your work.
|
|
|
|
|
|
|
|
For example, if you are working on a nix build, you might use this feedback loop:
|
2022-03-05 19:03:53 +03:00
|
|
|
|
|
|
|
```
|
2022-03-06 01:12:35 +03:00
|
|
|
feedback -- nix-build --no-out-link
|
2022-03-05 19:03:53 +03:00
|
|
|
```
|
|
|
|
|
2022-03-06 15:28:54 +03:00
|
|
|
### Declarative feedback loops
|
|
|
|
|
|
|
|
You can declare feedback loops in the `feedback.yaml` configuration file to share them with your team.
|
|
|
|
For example, this gives you a [`ci.nix`-based feedback loop](https://cs-syd.eu/posts/2021-04-11-the-ci-nix-pattern):
|
|
|
|
|
|
|
|
```
|
|
|
|
loops:
|
|
|
|
ci: nix-build ci.nix --no-out-link
|
|
|
|
```
|
|
|
|
|
2022-03-06 15:30:51 +03:00
|
|
|
Then you can just run this command, and not have to remember the full incantation:
|
|
|
|
|
|
|
|
```
|
|
|
|
feedback ci
|
|
|
|
```
|
|
|
|
|
2022-03-06 15:28:54 +03:00
|
|
|
To see the full reference of options of the configuration file, run `feedback --help`.
|
|
|
|
|
2022-03-06 15:30:51 +03:00
|
|
|
### CI Integration
|
|
|
|
|
|
|
|
When sharing feedback loops with team members, it is important that no one breaks another's workflow.
|
|
|
|
You can use `feedback-test` to test out the feedback loops in a one-shot manner, so you can check that they still work on CI.
|
|
|
|
See `feedback-test --help` for more details.
|
|
|
|
|
2022-03-06 15:28:54 +03:00
|
|
|
## Comparison with other tools
|
2022-03-05 19:03:53 +03:00
|
|
|
|
2022-03-06 01:48:16 +03:00
|
|
|
| | feedback | [steeloverseer](https://github.com/schell/steeloverseer) | [watchexec](https://github.com/watchexec/watchexec) | [entr](https://github.com/eradman/entr)
|
|
|
|
|----|-|-|-|-|
|
2022-03-06 02:04:29 +03:00
|
|
|
| Indication of command starting | ✔️ | ✔️ | C | C |
|
|
|
|
| Indication of time | ✔️ | C | C | C |
|
|
|
|
| Clear screen between feedback | ✔️ | C | C | ✔️ |
|
|
|
|
| Gitignore-aware | 🚧 | ✖️ | ✔️ | ✖ |
|
2022-03-06 14:33:08 +03:00
|
|
|
| Named feedback loops | ✔️ | ✖️ | ✖ | ✖ |
|
|
|
|
| Configurable feedback loops | ✔️ | ✔️ | ✖ | ✖ |
|
2022-03-06 02:04:29 +03:00
|
|
|
| Cancelling previous runs that aren't done yet | ✔️ | ✔️ | ✔️ | ✖ |
|
|
|
|
| Long-form flags for every option | ✔️ | ✔️ | ✔️ | ✖ |
|
2022-03-06 14:46:13 +03:00
|
|
|
| CI integration | ✔️ | C | C | C |
|
2022-03-06 15:44:42 +03:00
|
|
|
| Indication of how long the loop took | ✔️ | C | C | C |
|
2022-03-06 16:14:15 +03:00
|
|
|
| Shell integration (Commands with pipes "just work") | ✔️ | ✔️ | ✔️ | C |
|
2022-03-05 19:03:53 +03:00
|
|
|
|
2022-03-06 01:48:16 +03:00
|
|
|
* ✔️: Supported
|
|
|
|
* C: Possible but you have to write some code yourself
|
2022-03-06 16:34:27 +03:00
|
|
|
* 🚧: Under development
|
2022-03-06 01:48:16 +03:00
|
|
|
* ✖️: Not supported
|
|
|
|
* ?: I don't know.
|
|
|
|
|
2022-03-06 15:28:54 +03:00
|
|
|
|
|
|
|
|
2022-03-06 01:48:16 +03:00
|
|
|
## Someday/maybe ideas
|
2022-03-05 19:03:53 +03:00
|
|
|
|
2022-03-05 17:12:28 +03:00
|
|
|
* I want to have a good idea of the current state of things:
|
|
|
|
* Is it blocking on CPU, on memory, on network?
|
2022-03-06 01:48:16 +03:00
|
|
|
* Manually activate a run
|
|
|
|
* Manually cancel and re-activate a run
|