Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/docs/MAINTAINING.md
Joe Previte 2530a0d265
release: 4.8.2 (#5743)
* chore: bump version to 4.8.2

* chore: update CHANGELOG

* docs: add back line in publishing release

See https://github.com/coder/code-server/pull/5732#discussion_r1010685933

* Revert "chore: bump version to 4.8.2"

This reverts commit 5d70994f22.

* fixup: use 4.8.2-rc.1

* docs: add release candidate notes

* refactor: warn plugin range incompatibble

* chore: bump version 4.8.2
2022-11-02 14:34:38 -07:00

8.6 KiB

Maintaining

This document is meant to serve current and future maintainers of code-server, as well as share our workflow for maintaining the project.

Team

Current maintainers:

  • @code-asher
  • @jsjoeio

Occasionally, other Coder employees may step in time to time to assist with code-server.

Onboarding

To onboard a new maintainer to the project, please make sure to do the following:

Offboarding

Very similar to Onboarding but Remove maintainer from all teams and revoke access. Please also do the following:

  • Write farewell post via Discussion (see example)

Workflow

The workflow used by code-server maintainers aims to be easy to understood by the community and easy enough for new maintainers to jump in and start contributing on day one.

Milestones

We operate mainly using milestones. This was heavily inspired by our friends over at vscode.

Here are the milestones we use and how we use them:

  • "Backlog" -> Work not yet planned for a specific release.
  • "On Deck" -> Work under consideration for upcoming milestones.
  • "Backlog Candidates" -> Work that is not yet accepted for the backlog. We wait for the community to weigh in.
  • "" -> Work to be done for said month.

With this flow, any un-assigned issues are essentially in triage state. Once triaged, issues are either "Backlog" or "Backlog Candidates". They will eventually move to "On Deck" (or be closed). Lastly, they will end up on a version milestone where they will be worked on.

Triage

We use the following process for triaging GitHub issues:

  1. Create an issue
  2. Add appropriate labels to the issue (including "needs-investigation" if we should look into it further)
  3. Add the issue to a milestone
    1. If it should be fixed soon, add to version milestone or "On Deck"
    2. If not urgent, add to "Backlog"
    3. Otherwise, add to "Backlog Candidate" for future consideration

Versioning

<major.minor.patch>

The code-server project follows traditional semantic versioning, with the objective of minimizing major changes that break backward compatibility. We increment the patch level for all releases, except when the upstream Visual Studio Code project increments its minor version or we change the plugin API in a backward-compatible manner. In those cases, we increment the minor version rather than the patch level.

Pull requests

Ideally, every PR should fix an issue. If it doesn't, make sure it's associated with a version milestone.

If a PR does fix an issue, don't add it to the version milestone. Otherwise, the version milestone will have duplicate information: the issue and the PR fixing the issue.

Merge strategies

For most things, we recommend the squash and merge strategy. There may be times where creating a merge commit makes sense as well. Use your best judgment. If you're unsure, you can always discuss in the PR with the team.

Changelog

To save time when creating a new release for code-server, we keep a running changelog at CHANGELOG.md.

If either the author or reviewer of a PR believes the change should be mentioned in the changelog, then it should be added.

If there is not a Next Version when you modify CHANGELOG.md, please add it using the template you see near the top of the changelog.

When writing your changelog item, ask yourself:

  1. How do these changes affect code-server users?
  2. What actions do they need to take (if any)?

If you need inspiration, we suggest looking at the Emacs changelog.

Releases

Publishing a release

  1. Create a new branch called release/v0.0.0 (replace 0s with actual version aka v4.5.0)
  2. Run yarn release:prep
  3. Bump chart version in Chart.yaml.
  4. Summarize the major changes in the CHANGELOG.md
  5. Download CI artifacts and make sure code-server works locally.
  6. Merge PR and wait for CI build on main to finish.
  7. Go to GitHub Actions > Draft release > Run workflow off main. CI will automatically upload the artifacts to the release.
  8. Add the release notes from the CHANGELOG.md and publish release. CI will automatically grab the artifacts, publish the NPM package from npm-package, and publish the Docker Hub image from release-images.

Release Candidates

We prefer to do release candidates so the community can test things before a full-blown release. To do this follow the same steps as above but:

  1. Only bump version in package.json
  2. use 0.0.0-rc.0
  3. When you publish the release, select "pre-release"

AUR

We publish to AUR as a package here. This process is manual and can be done by following the steps in this repo.

Docker

We publish code-server as a Docker image here, tagging it both with the version and latest.

This is currently automated with the release process.

Homebrew

We publish code-server on Homebrew here.

This is currently automated with the release process (but may fail occasionally). If it does, run this locally:

# Replace VERSION with version
brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit

npm

We publish code-server as a npm package here.

This is currently automated with the release process.

Syncing with upstream Code

Refer to the contributing docs for information on how to update Code within code-server.

Testing

Our testing structure is laid out under our Contributing docs.

We hope to eventually hit 100% test coverage with our unit tests, and maybe one day our scripts (coverage not tracked currently).

If you're ever looking to add more tests, here are a few ways to get started:

  • run yarn test:unit and look at the coverage chart. You'll see all the uncovered lines. This is a good place to start.
  • look at test/scripts to see which scripts are tested. We can always use more tests there.
  • look at test/e2e. We can always use more end-to-end tests.

Otherwise, talk to a current maintainer and ask which part of the codebase is lacking most when it comes to tests.

Documentation

Troubleshooting

Our docs are hosted on Vercel. Vercel only shows logs in realtime, which means you need to have the logs open in one tab and reproduce your error in another tab. Since our logs are private to Coder the organization, you can only follow these steps if you're a Coder employee. Ask a maintainer for help if you need it.

Taking a real scenario, let's say you wanted to troubleshoot this docs change. Here is how you would do it:

  1. Go to https://vercel.com/codercom/codercom
  2. Click "View Function Logs"
  3. In a separate tab, open the preview link from github-actions-bot
  4. Now look at the function logs and see if there are errors in the logs