8e45ddd58b
When the woodpecker server is not reachable (eg. for update, maintenance, agent connection issue, ...) for a long period of time, the agent tries continuously to reconnect, without any delay. This creates **several GB** of logs in a short period of time. Here is a sample line, repeated indefinitely: ``` {"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp x.x.x.x:xxx: connect: connection refused\"","time":"2024-04-07T17:29:59Z","message":"grpc error: done(): code: Unavailable"} ``` It appears that the [backoff package](https://pkg.go.dev/github.com/cenkalti/backoff/v4#BackOff), after a certain amount of time, returns `backoff.Stop` (-1) instead of a valid delay to wait. It means that no more retry should be made, [as shown in the example](https://pkg.go.dev/github.com/cenkalti/backoff/v4#BackOff). But the code doesn't handle that case and takes -1 as the next delay. This led to continuous retry with no delay between them and creates a huge amount of logs. [`MaxElapsedTime` default is 15 minutes](https://pkg.go.dev/github.com/cenkalti/backoff/v4#pkg-constants), passed this time, `NextBackOff` returns `backoff.Stop` (-1) instead of `MaxInterval`. This commit sets `MaxElapsedTime` to 0, [to avoid `Stop` return](https://pkg.go.dev/github.com/cenkalti/backoff/v4#ExponentialBackOff). |
||
---|---|---|
.github | ||
.vscode | ||
.woodpecker | ||
agent | ||
cli | ||
cmd | ||
contrib/woodpecker-test-repo/.woodpecker | ||
docker | ||
docs | ||
nfpm | ||
pipeline | ||
server | ||
shared | ||
version | ||
web | ||
woodpecker-go | ||
.cspell.json | ||
.ecrc | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitpod.yml | ||
.golangci.yaml | ||
.hadolint.yaml | ||
.markdownlint.yaml | ||
.pre-commit-config.yaml | ||
.prettierignore | ||
.prettierrc.json | ||
.yamllint.yaml | ||
CHANGELOG.md | ||
docker-compose.example.yaml | ||
docker-compose.gitpod.yaml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
release-config.ts |
Woodpecker
Woodpecker is a simple yet powerful CI/CD engine with great extensibility.
🫶 Support
Please consider donating and become a backer. 🙏 [Become a backer]
📖 Documentation
✨ Contribute
📣 Translate
We use an own Weblate instance at translate.woodpecker-ci.org.
👋 Who uses Woodpecker?
Woodpecker is used by itself multiple well-known companies, organizations like Codeberg, hobbyist and many others.
Leave a comment if you're using it as well.
Also consider using the topic WoodpeckerCI
in your repository, so others can learn from your config and use the hashtag #WoodpeckerCI
when talking about the project on social media!
Here are some places where people mention Woodpecker:
✨ Stars over time
License
Woodpecker is Apache 2.0 licensed with the source files in this repository having a header indicating which license they are under and what copyrights apply.
Files under the docs/
folder are licensed under Creative Commons Attribution-ShareAlike 4.0 International Public License.