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

Update the release instructions after v16 code freeze #373

Merged
merged 2 commits into from
Feb 8, 2023
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
42 changes: 22 additions & 20 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ build/Dockerfile.release
go.mod
```

### Update Compatibility Table

Add a new entry for the planned minor version to the [compatibility table](https://github.com/planetscale/vitess-operator/blob/main/README.md#compatibility)
in the README file.

The recommended Kubernetes versions depend on the version of the Kubernetes
client libs that Vitess Operator uses:

https://github.com/planetscale/vitess-operator/blob/111ac173e1c473853e66e270486ba8a9a47ecc54/go.mod#L35
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to be a permanent/static link?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fine to keep it that way. The link redirects to an old commit but at least it will always point to the same line of code. That line:

// Pinned to kubernetes-1.16.2

Is visible in all the versions of our go.mod, with the 1.16.2 being the only thing we change.


The recommended server versions are those that match the minor version for the
client libraries, as well as server versions that are +/- one minor version
relative to the client libraries.

Note that we don't necessarily update to newer Kubernetes libraries at the same
time that we update to build against a newer Vitess release.
The Kubernetes library version is determined by the version of [Operator SDK](https://github.com/operator-framework/operator-sdk)
that's in use.

## Cut Release

### Update Vitess Dependency

Each Vitess Operator minor version (`vX.Y.*`) is intended to correspond to a
Expand All @@ -45,26 +66,7 @@ so this command would update Vitess Operator to build against Vitess v9.0.0:
go get vitess.io/vitess@daa60859822ff85ce18e2d10c61a27b7797ec6b8
```

### Update Compatibility Table

Add a new entry for the planned minor version to the [compatibility table](https://github.com/planetscale/vitess-operator/blob/main/README.md#compatibility)
in the README file.

The recommended Kubernetes versions depend on the version of the Kubernetes
client libs that Vitess Operator uses:

https://github.com/planetscale/vitess-operator/blob/111ac173e1c473853e66e270486ba8a9a47ecc54/go.mod#L35

The recommended server versions are those that match the minor version for the
client libraries, as well as server versions that are +/- one minor version
relative to the client libraries.

Note that we don't necessarily update to newer Kubernetes libraries at the same
time that we update to build against a newer Vitess release.
The Kubernetes library version is determined by the version of [Operator SDK](https://github.com/operator-framework/operator-sdk)
that's in use.

## Cut Release
### Release

After the PR from the prepare phase is merged, make sure your local git dir is
up-to-date with HEAD, and then create a temporary release branch on top of the long-term release branch, for instance:
Expand Down
8 changes: 8 additions & 0 deletions tools/release/do_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ function updateVitessImages() {
rm -f $(find -E $ROOT/test/endtoend/operator/ -name "*.yaml.bak") $ROOT/pkg/apis/planetscale/v2/defaults.go.bak $ROOT/test/endtoend/operator/operator.yaml.bak
}

function updateOperatorYaml() {
new_operator_version=$1

sed -i.bak -E "s/planetscale\/vitess-operator:(.*)/planetscale\/vitess-operator:v$new_operator_version/g" "$ROOT/deploy/operator.yaml"
rm -f $ROOT/deploy/operator.yaml.bak
}

function updateVersion() {
version=$1

Expand All @@ -56,6 +63,7 @@ fi

updateVersion $NEW_OPERATOR_VERSION
updateVitessImages $OLD_VITESS_VERSION $NEW_VITESS_VERSION $NEW_OPERATOR_VERSION
updateOperatorYaml $NEW_OPERATOR_VERSION

git add --all
git commit -n -s -m "Release commit for $NEW_OPERATOR_VERSION"
Expand Down