Skip to content

refactor: collect-deps.sh#1261

Draft
bk201 wants to merge 2 commits intoharvester:masterfrom
bk201:wip-10312
Draft

refactor: collect-deps.sh#1261
bk201 wants to merge 2 commits intoharvester:masterfrom
bk201:wip-10312

Conversation

@bk201
Copy link
Copy Markdown
Contributor

@bk201 bk201 commented Mar 30, 2026

Problem:

The previous method is to determine the latest dependency chart versions by listing the chart directories in the image. It's unreliable because RC version is considered newer than the formal version. For example:

$ yq e '.entries.fleet[].version' rancher-charts.yaml | sort -V -r
109.0.0+up0.15.0-rc.6
109.0.0+up0.15.0-rc.5
109.0.0+up0.15.0-rc.3
109.0.0+up0.15.0-rc.2
109.0.0+up0.15.0-rc.1
109.0.0+up0.15.0-beta.4
109.0.0+up0.15.0

This causes the ISO contain the wrong chart/appVersion and upgrade script will waiting for the wrong versions.

Solution:

  • Get dependency chart versions from build.yaml because it's the single source of truth.
  • Get appVersions from rancher/charts.
  • Create a static file "scripts/rancher/deps.yaml" to store the dependency versions.
    Append the content to harvester-release.yaml during build time.
    This file should be updated when a developer bumps Rancher.
  • Add a workflow to ensure the deps is bumped and the corresponding Rancher image contains the correct dependency charts.

Related Issue(s):

harvester/harvester#10312

Test plan:

  • Validate the script
    Run
./scripts/collect-rancher-deps.sh

cat scripts/rancher/deps.yaml should get (for Rancher v2.14.0)`

rancherDependencies:
  fleet:
    chart: 109.0.0+up0.15.0
    app: "0.15.0"
  fleet-crd:
    chart: 109.0.0+up0.15.0
    app: "0.15.0"
  rancher-webhook:
    chart: 109.0.0+up0.10.0
    app: 0.10.0
  • You can also validate the output by editing scripts/version-rancher to a different version.
  • Build an ISO and ensure iso_root/harvester-release.yaml contain the above dependency info.

Additional documentation or context

bk201 added 2 commits March 31, 2026 15:14
- Get dependency chart versions from build.yaml because it's the
  single source of truth.
- Get appVersions from rancher/charts.
- Create a static file "scripts/rancher/deps.yaml" to store the dependency versions.
  Append the content to harvester-release.yaml during build time.
  This file should be updated when a developer bumps Rancher.

The previous method is to determine the latest dependency chart versions by
listing the chart directories in the image. It's unreliable because RC version
is considered newer than the formal version. For example:

```
$ yq e '.entries.fleet[].version' rancher-charts.yaml | sort -V -r
109.0.0+up0.15.0-rc.6
109.0.0+up0.15.0-rc.5
109.0.0+up0.15.0-rc.3
109.0.0+up0.15.0-rc.2
109.0.0+up0.15.0-rc.1
109.0.0+up0.15.0-beta.4
109.0.0+up0.15.0
```

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
Add a workflow to ensure dependency versions are correct and a
workflow to validate chart tarball are packaged in the Rancher image.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant