-
Notifications
You must be signed in to change notification settings - Fork 294
Notes for project maintainers
Below is a random collection of notes for project maintainers.
A release is created by creating a semver tag in the GerritHub repository as a member of the CUE Super Admins
group, such as Chief Cueckoo. This is most simply done via the Gerrit tag UI. This tag will then replicate to GitHub, at which point the release workflow will be triggered. This workflow is responsible for creating the release assets, Docker images etc. Release notes should then be manually added to the corresponding GitHub release, using cueckoo releaselog
.
Feature releases such as v0.7.0
are typically tagged from master
, which is frozen to prevent new features around the time the first release candidate is out. Once the final release is out, master
can optionally stay frozen for a few weeks if we already anticipate a follow-up bugfix release like v0.7.1
. Once development in master
begins for the next feature release, its following commit should be tagged like v0.8.0-0.dev
, to ensure that the master
commits developing the next feature release v0.8
don't get semver pseudo-versions such as v0.7.1-timestamp-commit
, which would be considered as a lower version compared to any further v0.7.x
bugfix releases.
Once master
is open for development of the next feature release, any further bugfix releases should come from a release branch where we backport fixes to via cherry-pick CLs. To use such a branch, remember that:
- The branch should have the prefix
release-branch.
, such asrelease-branch.v0.7
, to trigger CI properly - Just like creating tags, creating the branch should be done via the Gerrit UI by a
CUE Super Admin
, starting at a tag likev0.7.0
- Typically, CLs will be backported from
master
to the release branch via the "Cherry pick" button at the top right of the Gerrit UI - Manual cherry-picking can also be done locally via git, for example to resolve conflicts - as long as the Change-Id trailer is deleted and re-generated, to mail a new CL against the release branch
- When no more bugfix releases will be done, the release branch should be deleted via the Gerrit UI
Note that the Goreleaser setup and config are only minimally tested via CI before and after each commit is merged. For any non-trivial changes before a release, consider tagging a version such as v0.0.0-goreleaser.202211181000
to double check that it still succeeds on a tag release.
Whilst some config changes can be made via the Gerrit UI, the majority cannot. Changes to Gerrit config files should be submitted for review in the usual way, but pushed for review against the meta/config
branch.
Note that Gerrit exposes this branch as refs/meta/config
on the remote, so git fetch
will not fetch it alongside all other branches under refs/heads/*
by default. The simplest solution to that is to configure your local git repository:
# Fetch all meta branches from the Gerrit "origin" remote as well.
git config --add remote.origin.fetch '+refs/meta/*:refs/remotes/origin/refs/meta/*'
# Fetch refs/meta/config for the first time.
git fetch origin
Then, send a CL like you usually would - just making sure that you start from meta/config
rather than master
or main
.
# You can also use a similar command to create a local tracking branch, like with master or main.
git switch -c my_config_change origin/refs/meta/config
# Make config changes
git codereview change -s -a -m 'Important configuration changes'
git codereview mail
When you git codereview mail
, GerritHub validates the configuration. If it is not valid for whatever reason, it will not accept the change.
Config changes can be approved by a member of the CUE Admins
group but can only be submitted by a member of the CUE Super Admins
group.
The contribution guide describes the workflow for both Gerrit-based and GitHub PR-based contributions. The GerritHub repository is the source of truth for the CUE project, and as such GitHub PRs should not be merged. Rather, they must be imported via the GerritHub UI.
Given that GerritHub is the source of truth, Pull Requests need to be imported into GerritHub to be submitted as part of the usual change workflow. It's generally easier for the contributor to participate in the Pull Request (familiar code review process), and then have a CUE approver import and submit the Pull Request when it's ready.
Note that we always try to review PR contributions directly on GitHub first. In the case where the contributor doesn't respond after a few weeks, and the adjustments needed aren't major, you can apply them yourself as long as you add yourself as a second author via git commit trailers:
Co-authored-by: Your Name <[email protected]>
Signed-off-by: Your Name <[email protected]>
To import a Pull Request, use cueckoo importpr
as follows:
go install github.com/cue-sh/tools/cmd/cueckoo@latest
cueckoo importpr 123 # replacing 123 with the PR number to be imported