You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Add release process details and workflow (#353)
* docs: Add release process details and workflow
* chore(docs): Extract detailed docs from README.md
* chore: Update process w latest feedback; Remove chglog Makefile directive
* chore: Apply go-mod manipulation recommendations to build process/docs
* fix: repair link after document was relocated
Copy file name to clipboardExpand all lines: README.md
+3-48Lines changed: 3 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,6 @@ A component of [**Sentinel**](https://github.com/filecoin-project/sentinel), a c
5
5
6
6
A **Visor** process collects _permanent_ Filecoin chain meterics from a [**Lotus**](https://github.com/filecoin-project/lotus/) daemon, and writes them to a [**TimescaleDB**](https://github.com/timescale/timescaledb) time-series and relational datastore.
7
7
8
-
9
8
## Getting Started
10
9
11
10
Clone the repo and build the dependencies:
@@ -113,61 +112,17 @@ or by specifying the following flags:
The database schema is versioned and every change requires a migration script to be executed. See [storage/migrations/README.md](storage/migrations/README.md) for more information.
121
-
122
-
### Checking current schema version
123
-
124
-
The visor `migrate` subcommand compares the **database schema version** to the **latest schema version** and reports any differences.
125
-
It also verifies that the **database schema** matches the requirements of the models used by visor. It is safe to run and will not alter the database.
126
-
127
-
Visor also verifies that the schema is compatible when the index or process subcommands are executed.
128
-
129
-
### Migrating schema to latest version
130
-
131
-
To migrate a database schema to the latest version, run:
132
-
133
-
visor migrate --latest
134
-
135
-
Visor will only migrate a schema if it determines that it has exclusive access to the database.
136
-
137
-
Visor can also be configured to automatically migrate the database when indexing or processing by passing the `--allow-schema-migration` flag.
138
-
139
-
### Reverting a schema migration
140
-
141
-
To revert to an earlier version, run:
142
-
143
-
visor migrate --to <version>
144
-
145
-
**WARNING: reverting a migration is very likely to lose data in tables and columns that are not present in the earlier version**
146
-
147
-
148
115
## Versioning and Releases
149
116
150
117
Feature branches and master are designated as **unstable** which are internal-only development builds.
151
118
152
119
Periodically a build will be designated as **stable** and will be assigned a version number by tagging the repository
153
120
using Semantic Versioning in the following format: `vMajor.Minor.Patch`.
154
-
155
-
### Release Process
156
-
157
-
Between releases we keep track of notable changes in CHANGELOG.md.
158
-
159
-
When we want to make a release we should update CHANGELOG.md to contain the release notes for the planned release in a section for
160
-
the proposed release number. This update is the commit that will be tagged with as the actual release which ensures that each release
161
-
contains a copy of it's own release notes.
162
-
163
-
We should also copy the release notes to the Github releases page, but CHANGELOG.md is the primary place to keep the release notes.
164
-
165
-
The release commit should be tagged with a signed tag:
The database schema is versioned and every change requires a migration script to be executed. See [../storage/migrations/README.md](../storage/migrations/README.md) for more information.
4
+
5
+
## Checking current schema version
6
+
7
+
The visor `migrate` subcommand compares the **database schema version** to the **latest schema version** and reports any differences.
8
+
It also verifies that the **database schema** matches the requirements of the models used by visor. It is safe to run and will not alter the database.
9
+
10
+
Visor also verifies that the schema is compatible when the index or process subcommands are executed.
11
+
12
+
## Migrating schema to latest version
13
+
14
+
To migrate a database schema to the latest version, run:
15
+
16
+
visor migrate --latest
17
+
18
+
Visor will only migrate a schema if it determines that it has exclusive access to the database.
19
+
20
+
Visor can also be configured to automatically migrate the database when indexing or processing by passing the `--allow-schema-migration` flag.
21
+
22
+
## Reverting a schema migration
23
+
24
+
To revert to an earlier version, run:
25
+
26
+
visor migrate --to <version>
27
+
28
+
**WARNING: reverting a migration is very likely to lose data in tables and columns that are not present in the earlier version**
git commit -m "chore(docs): Update CHANGELOG for vX.Y.Z(-rcN)"
27
+
# commit CHANGELOG/go.mod updates
28
+
git tag -asm vX.Y.Z-rcN vX.Y.Z(-rcN) # create signed/annotated tag
29
+
git push --tags origin vX.Y.Z(-rcN)-release
30
+
# push release branch and tags
31
+
```
32
+
33
+
NOTE: `sentinel-visor` pull requests prefer to be squash-merged into `master`, however considering this workflow tags release candidate within the release branch which we want to easily resolve in the repository's history, it is preferred to not squash and instead merge the release branch into `master`.
34
+
35
+
36
+
## Updating CHANGELOG.md
37
+
38
+
The format is a variant of [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) combined with categories from [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The [github.com/git-chglog](https://github.com/git-chglog/git-chglog) utility assists us with maintaing CHANGELOG.md.
39
+
40
+
The sections within each release have a preferred order which prioritizes by largest-user-impact-first: `Feat > Refactor > Fix > {Area-specific or Custom Sections} > Chore`
41
+
42
+
Here is an example workflow of how CHANGELOG.md might be updated.
43
+
44
+
```sh
45
+
# checkout master and pull latest changes
46
+
git checkout master
47
+
git pull
48
+
49
+
# output the CHANGELOG content for the next release (assuming next release is v0.5.0-rc1)
50
+
go run github.com/git-chglog/git-chglog/cmd/git-chglog -o CHANGELOG_updates.md --next-tag v0.5.0-rc1
51
+
52
+
# reconcile CHANGELOG_updates.md into CHANGELOG.md applying the preferred section order
53
+
vi CHANGELOG*.md
54
+
rm CHANGELOG_updates.md
55
+
56
+
# commit changes
57
+
git add CHANGELOG.md
58
+
git commit -m 'chore(docs): Update CHANGELOG for v0.5.0-rc1'
59
+
```
60
+
61
+
Here is an [example of how the diff might look](https://github.com/filecoin-project/sentinel-visor/pull/326/commits/9536df9e39991a3b78013d1d1b36fef94562556d).
0 commit comments