JetBrains CodeCanvas 2024.3 Help

Update and Rollback

The way you should update your CodeCanvas instance depends on whether it is a minor or a major update. The CodeCanvas version consists of three parts: [Major version year].[Major version update].[Minor version], for example, 2024.1.1.

Minor updates

These updates change the minor CodeCanvas version, for example, from 2024.1.0 to 2024.1.1. Such updates don't bring any significant changes and typically include bug fixes and security patches.

To update CodeCanvas to the latest minor version

  1. Update local data on chart repositories:

    helm repo update
  2. Upgrade the Helm release:

    helm -n NAMESPACE_PLACEHOLDER upgrade codecanvas \ oci://public.registry.jetbrains.space/p/codecanvas/release-charts/codecanvas \ -f values.yaml

    Here values.yaml is the values file of your current CodeCanvas instance.

To roll back CodeCanvas to the previous minor version

  1. List the available revisions of the CodeCanvas release:

    helm history codecanvas -n NAMESPACE_PLACEHOLDER

    The command output will look similar to this:

    REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Mar 1 15:00:00 2024 SUPERSEDED codecanvas-2024.1.0 2024.1.0 Install complete 2 Mon Aug 1 16:30:00 2024 DEPLOYED codecanvas-2024.1.1 2024.1.1 Upgrade complete

    Say, you want to roll back to the 2024.1.0 version (revision 1).

  2. Roll back to the previous revision:

    helm rollback codecanvas 1 -n NAMESPACE_PLACEHOLDER

    Here 1 is the revision number of the previous release.

    If you view the release history again, the output will look similar to this:

    REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Mar 1 15:00:00 2024 SUPERSEDED codecanvas-2024.1.0 2024.1.0 Install complete 2 Wed Aug 1 16:30:00 2024 SUPERSEDED codecanvas-2024.1.1 2024.1.1 Upgrade complete 3 Fri Sep 1 16:45:00 2024 DEPLOYED codecanvas-2024.1.0 2024.1.0 Rollback to 1

Major updates

These updates change the major CodeCanvas version, for example, from 2024.1.1 to 2024.2.0, or from 2024.1.1 to 2025.1.1. Such updates bring new features and might require changes in databases and infrastructure configuration. To perform a major update, you should migrate CodeCanvas data as described in this section.

To update CodeCanvas to the latest major version

  1. Back up CodeCanvas data stored in the PostgreSQL database. You might need this data to roll back the update if something goes wrong. During major updates, the database schema is also updated. This means that you can't roll back to the previous version without restoring the database.

  2. Check the What's New section to learn about the changes in the Helm chart for the release you're upgrading to. If there are any changes, update the values.yaml file accordingly. For example, the new version may introduce changes to the default dev container image, see below.

  3. Update local data on chart repositories:

    helm repo update
  4. Upgrade the Helm release to the latest version:

    helm -n NAMESPACE_PLACEHOLDER upgrade codecanvas \ oci://public.registry.jetbrains.space/p/codecanvas/release-charts/codecanvas \ -f values.yaml

    Here values.yaml is the values file of your current CodeCanvas instance.

    CodeCanvas will perform data migration during CodeCanvas pod startup. It can take a noticeable amount of time, i.e., several minutes, if you have a lot of data. You can start using the new CodeCanvas version as soon as all pods are in the ready state.

To roll back CodeCanvas to the previous major version

  1. Stop the CodeCanvas application.

  2. Restore the CodeCanvas PostgreSQL database from the backup you created before the update.

  3. List the available revisions of the CodeCanvas release:

    helm history codecanvas -n NAMESPACE_PLACEHOLDER

    The command output will look similar to this:

    REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Mar 1 15:00:00 2024 SUPERSEDED codecanvas-2024.1.0 2024.1.0 Install complete 2 Mon Aug 1 16:30:00 2024 DEPLOYED codecanvas-2024.2.0 2024.2.0 Upgrade complete

    Say, you want to roll back to the 2024.1.0 version (revision 1).

  4. Roll back to the previous revision:

    helm rollback codecanvas 1 -n NAMESPACE_PLACEHOLDER

    Here 1 is the revision number of the previous release.

    If you view the release history again, the output will look similar to this:

    REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Mar 1 15:00:00 2024 SUPERSEDED codecanvas-2024.1.0 2024.1.0 Install complete 2 Wed Aug 1 16:30:00 2024 SUPERSEDED codecanvas-2024.2.0 2024.2.0 Upgrade complete 3 Fri Sep 1 16:45:00 2024 DEPLOYED codecanvas-2024.1.0 2024.1.0 Rollback to 1

Major updates and default dev container image

When you update CodeCanvas to a new major version, the default dev container image is also updated. This might lead to issues in existing dev environments as the new image might introduce incompatible changes (for example, a new version of a tool that is not backward-compatible).

When a user restarts an existing dev environment, CodeCanvas in fact, creates a new dev environment and mounts the existing volume with the user's data to it. This means that if the user restarts the environment (based on the default image) after a major update, this dev environment will use the updated dev container image.

If this causes issues, system administrators can pin a specific version of the dev container image in the Helm chart values. This way, all new dev environments will use the pinned image. To do this, add the following properties to the values.yaml file:

application: # ... other properties config: # ... other properties rd: # ... other properties devContainer: registry: public.jetbrains.space repository: p/codecanvas/packages/container/releases/dev-container-default tag: 2024.1.3 # the version you want to pin (matches CodeCanvas version)
Last modified: 31 October 2024