Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changelog process #1790

Merged
merged 7 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
52 changes: 52 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Unreleased Changes

## vX.X

### Upcoming Changes

- The following flags are pending deprecation and will be removed in the next release:
- `-gasPrice`
- `-s3bucket`
- `-s3creds`
- `-gsbucket`
- `-gskey`

### Features ⚒

#### General

- \#1759 Log non-nil error when webserver stops (@AlexMapley)
- \#1773 Fix Windows build by downloading pre-configured nasm (@iameli)
- \#1779 Fix "Build from Source" link in the README (@chrishobcroft)
- \#1778 Add live mode to `livepeer_bench` and expose additional metrics (@jailuthra)
- \#1785 Update the Windows build to be fully static and to use go1.15 (@iameli)
- \#1727 Add a `-maxGasPrice` flag to set the maximum gas price to use for transactions (@kyriediculous)
- \#1790 Add changelog process
- \#1791 Switch to Github actions for Linux build and test

#### Broadcaster

- \#1754 Count bytes of video data received/sent per stream and expose via the /status endpoint (@darkdragon)
- \#1764 Mark all input errors in LPMS as non-retryable during transcoding (@jailuthra)

#### Orchestrator

- \#1731 Add support for webhook to authenticate and set prices for broadcasters at the start of a session (@kyriediculous)
- \#1761 Add a `livepeer_router` binary that can route broadcasters to different orchestrators (@yondonfu)

### Bug Fixes 🐞

#### General

- \#1729 Make sure the block watcher service can process multiple blocks in a single polling interval (@kyriediculous)
- \#1795 Fix Darwin build by changing optimization flag used for gnutls dependency (@iameli)

#### Broadcaster

- \#1766 Flush JSON playlist during recording after it is modified (@jailuthra)
- \#1770 Fix parallel reading from object storage (@darkdragon)

#### Transcoder

- \#1775 Fix transcoder load balancer race condition around session cleanup (@jailuthra)
- \#1784 Use auth token sessionID to index into sessions map in transcoder load balancer (@jailuthra)
6 changes: 4 additions & 2 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
**Checklist:**
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] README and other documentation updated
- [ ] Node runs in OSX and devenv
- [ ] Read the [contribution guide](./doc/contributing.md)
- [ ] `make` runs successfully
- [ ] All tests in `./test.sh` pass
- [ ] README and other documentation updated
- [ ] [Pending changelog](./CHANGELOG_PENDING.md) updated
52 changes: 52 additions & 0 deletions cmd/scripts/linkify_changelog.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package main

import (
"bufio"
"io/ioutil"
"log"
"os"
"regexp"
"strings"
)

// Based on https://github.com/tendermint/tendermint/blob/master/scripts/linkify_changelog.py
// This script goes through the provided file, and replaces any " \#<number>",
// with the valid markdown formatted link to it. e.g.
// " [\#number](https://github.com/livepeer/go-livepeer/pull/<number>)"
// Note that if the number is for a an issue, github will auto-redirect you when you click the link.
// It is safe to run the script multiple times in succession.
//
// Example usage $ go run cmd/scripts/linkify_changelog.go CHANGELOG_PENDING.md
func main() {
if len(os.Args) < 2 {
log.Fatal("Expected filename")
}

fname := os.Args[1]

f, err := os.Open(fname)
if err != nil {
log.Fatal(err)
}
defer f.Close()

re, err := regexp.Compile(`\\#([0-9]*)`)
if err != nil {
log.Fatal(err)
}

var lines []string
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := re.ReplaceAllString(scanner.Text(), `[#$1](https://github.com/livepeer/go-livepeer/pull/$1)`)
lines = append(lines, line)
}

if err := scanner.Err(); err != nil {
log.Fatal(err)
}

if err := ioutil.WriteFile(fname, []byte(strings.Join(lines, "\n")), 0644); err != nil {
log.Fatal(err)
}
}
17 changes: 17 additions & 0 deletions doc/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

## Changelog

Every change (feature, bug fix, etc.) should be made in a PR that includes an update to the `CHANGELOG_PENDING.md` file which tracks the set of changes that will be included in the next release.

Changelog entries should be formatted as follows:

```
- \#xxx Description of the change (@contributor)
```

`xxx` is the PR number (if for whatever reason a PR number cannot be used the issue number is acceptable) and `contributor` is the author of the change. The full link to the PR is not necessary because it will automatically be added when a release is created, but make sure to include the backslash and pound i.e. `\#2313`.

Changelog entries should be classified based on the `livepeer` mode of operation that they pertain to i.e. General, Broadcaster, Orchestrator, Transcoder.

Breaking changes should be documented in the "Breaking changes" section. Any changes that involve pending deprecations (i.e. a flag will be removed in the next release) should be documented in the "Upcoming changes" section.
25 changes: 18 additions & 7 deletions doc/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,25 @@ Once we complete this stage, we prepare a mainnet release.

### Cutting a mainnet release of go-livepeer

First, make the release commit on a branch:
Create the release commit on a branch:

```bash
git checkout -b release-0.5.2
echo -n '0.5.2' > VERSION
git commit -am 'release v0.5.2'
git push -u origin release-0.5.2
```
1. Checkout a release branch

```bash
git checkout -b release-0.5.2
```

2. `echo -n '0.5.2' > VERSION`

3. Update the changelog

- Copy all entries from `CHANGELOG_PENDING.md` to the top of `CHANGELOG.md` and update `vX.X` to the new version number
- Run `go run cmd/scripts/linkify_changelog.go CHANGELOG.md` to add links for all PRs
- Reset `CHANGELOG_PENDING.md`

4. `git commit -am 'release v0.5.2'`

5. `git push -u origin release-0.5.2`

Merge the release commit into `master` via PR. Then, push the release tag up.

Expand Down