livepeer / livepeer/go-livepeer
Track DB changes in CI
- Dominant language
- Go
- Stars
- 586
- Forks
- 226
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 19
Description
Currently, it is easy to mistakenly make breaking changes to the DB schema. We should make this a little harder. One way is to check this via CI.
One possible strategy for doing this:
* Retain old copies of SQL schema somewhere in CI
* Run `go-livepeer` on each old schema
* Ensure `go-livepeer` starts cleanly
* Hopefully the above process will catch any breakage. From there, we can check in a new copy of the schema for any breaking changes that requires a bump to the `LivepeerDBVersion`.
https://github.com/livepeer/go-livepeer/blob/33fa9b29960d34193e39e18aba0052e8ffded8fb/common/db.go#L50
Contributor guide
Research direction
Start with common/db.go around line 50 and inspect how LivepeerDBVersion and the SQL schema are handled. Then trace the existing CI entry points for running go-livepeer. Done means CI retains prior schemas, starts go-livepeer against each one, detects startup failures, and supports checking in a new schema when a version bump is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- ci-cd, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100