Fail Simulation workflow on library panic
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 20
- Forks
- 4
- Avg merge
- 19h 59m
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
Sometimes simulation workflow log may include panic due to various library errors, like in #135:
2024-11-28T17:15:35.499+0300 DEBUG dbft/dbft.go:655 recovering finished cv=0/7 preq=0/0 presp=3/7 pco=0/7 co=0/7 {"id": 13}
2024-11-28T17:15:35.499+0300 DEBUG dbft/dbft.go:231 received message {"id": 13, "type": "Commit", "from": 1, "height": 1, "view": 0, "my_height": 1, "my_view": 0}
2024-11-28T17:15:35.499+0300 INFO dbft/dbft.go:595 received Commit {"id": 13, "validator": 1}
2024-11-28T17:15:35.499+0300 INFO dbft/check.go:118 approving block {"id": 13, "height": 1, "hash": "e776a98a8412d80eebbab84ec583b5b8a0be17e961d8f73fbf632eb2ec034a47", "tx_count": 1, "merkle": "755b010000000000000000000000000000000000000000000000000000000000", "prev": "0000000000000000000000000000000000000000000000000000000000000000"}
2024-11-28T17:15:35.499+0300 DEBUG simulation/main.go:183 received block {"id": 13, "height": 1}
2024-11-28T17:15:35.499+0300 ERROR dbft/dbft.go:222 too big validator index {"id": 13, "from": 65535}
github.com/nspcc-dev/dbft.(*DBFT[...]).OnReceive
/home/anna/Documents/GitProjects/nspcc-dev/dbft/dbft.go:222
main.(*simNode).Run
/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:97
main.main.func1
/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:78
2024-11-28T17:15:35.499+0300 ERROR dbft/dbft.go:222 too big validator index {"id": 13, "from": 65535}
github.com/nspcc-dev/dbft.(*DBFT[...]).OnReceive
/home/anna/Documents/GitProjects/nspcc-dev/dbft/dbft.go:222
main.(*simNode).Run
/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:97
main.main.func1
/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:78
Process exit status code is non-zero in this case, hence workflow PASSes.
Describe the solution you'd like
Workflow should FAIL in such cases.
Additional context
It's not critical, however it leads to the fact that we're missing some bugs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/simulation/main.go, especially the Run and main entry points shown in the example, and inspect how simulation process failures are propagated to the workflow. Reproduce a library panic such as the logged validator-index error, then verify that the simulation workflow reports failure and exits with a non-zero status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100