Rancher Version | Observability UI Extension Version |
---|---|
>= 2.8.0 < 2.9.0 | maintenance 0.2.x |
>= 2.9.0 < 2.10.0 | maintenance 1.x.x |
>= 2.10 | latest 2.x.x |
In order to preview your changes on a Rancher test server, you need to get comfortable with the idea that this requires "making a release". The extension uses an ideosyncratic release/preview process. While the code (UI and manifests) can be found in the different branches, they are packaged into helm charts by GitHub actions. And then made available in a Helm repository that is defined by the gh-pages
branch. All this is (only) triggerred automagically when merging a PR into a release branch.
To preview changes in a deployed Rancher:
- Add https://stackvista.github.io/rancher-extension-stackstate as a repository to the
local
cluster - Merge a PR with your changes and a suitable
changeset
into a release branch (see below for details) - Install the release that's been created on the extension helm repository
If you find out that some changes need to be made, by far the easiest thing to do is just create a new release. This will push the patch number up quickly, but at least will preserve your sanity.
When you are satisfied with the changes, it can be published to the "ui plugin charts" repository - the public helm repository maintained by the Rancher team.
Here is the comprehensive guide to provision a Rancher environment for testing against SUSE Observability.
This project uses Changesets to manage versioning and generate changelogs.
A changeset is a markdown file that records project changes, organized into two parts:
- YAML Frontmatter: Specifies the affected packages and the change type (
major
,minor
, orpatch
). - Markdown Content: Describes the changes in more detail.
Run the following command to create a new changeset:
yarn changeset
Then, follow the prompts:
- Select the change type (
major
,minor
,patch
) for each package:major
for breaking changesminor
for new featurespatch
for bug fixes
- Enter a summary of the change, which can be edited later in the generated markdown file.
This will create a new changeset file in the .changeset
directory. Each changeset filename is a unique, randomly generated string, so do not try to make sense of it.
The pkg/observability
package has a maintenance branch for each minor and major version:
v[\d+].x.x
supports the minor and patch versions for specified major versions, ex:v1.x.x
supports1.0.0
,1.1.0
,1.2.3
, etc.v[\d+].[\d+].x
supports the patch version for specified minor versions, ex:v1.2.x
supports1.2.0
,1.2.1
,1.2.2
, etc.main
is the latest version and can include breaking changes.
This section explains the complete workflow for making changes to the pkg/observability
package and releasing them.
- Clone the repository and navigate to the project directory.
- Make the necessary changes to the code in the
pkg/observability
package.
- After making your changes, create a changeset by running:
yarn changeset
- Follow the prompts to specify the type of change (
major
,minor
, orpatch
) and provide a summary of the changes. - A new changeset file will be created in the
.changeset
directory.
- Commit your changes along with the changeset file.
- Push your changes to a new branch.
- Open a pull request (PR) to the
main
OR maintenance branchvx.x.x
.
- When you open a PR, the CI pipeline will automatically run typecheck, linting, tests, build, and more to make sure everything is working correctly.
- Merge the changes once the CI checks pass and the PR is approved.
- On every push to the
main
OR maintenancevx.x.x
branches, the CI pipeline will:- Read the changeset status to determine the version bump.
- Create/update a release pull request
Once the release PR is merged, the CI pipeline will:
- Assemble the release notes based on the changesets and update the
CHANGELOG.md
file. - Delete the changesets that have been released.
- Bump the version in the
package.json
file. - Create a new release tag based on the version bump specified in the changeset.
- Create a new release in the GitHub repository.
- Commit the Helm charts and other artifacts to the
gh-pages
branch.
Open a PR to the rancher/ui-plugin-chart repository with changes to the manifest.json file to list the new version of the plugin for the StackVista/rancher-extension-stackstate
repository (refer to this PR example).
Note: You can include multiple versions at once.
- The
checks.yml
workflow ensures that only valid version bumps are allowed based on the branch type. - The
release-tag
script handles tagging and duplicating release tags for compatibility.