Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make image list packing architecture-awared #682

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

brandboat
Copy link
Contributor

Problem:
The script archive-image-lists.sh lacks architecture awareness and could potentially lead to failures within our CI pipeline, particularly if newer versions (> 1.3.0) have been released.

Solution:
Compare the version in upgrade-matrix.yaml with v1.3.0, if version >= v1.3.0, which means that version already support different architecture images, and we need to download the image lists tarball from https://releases.rancher.com/harvester/{VERSION}/image-lists-{ARCH}.tar.gz.

Related Issue:
harvester/harvester#5313

Test plan:

  1. Download harvester repo
  2. replace this line with git clone --branch HARV-5313 --single-branch --depth 1 https://github.com/brandboat/harvester-installer.git ../harvester-installer
  3. add below yaml code snippet to upgrade-matrix.yaml
    - name: v1.3.0
      minUpgradableVersion: v1.2.1
  4. execute make build-iso without error

As you can see the console output shows that the script download v1.3.0 image list tarball with a specific architecture amd64, while others still use generic URL without architecture specification.
image

@brandboat brandboat self-assigned this Mar 25, 2024
Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@bk201
Copy link
Member

bk201 commented Mar 27, 2024

I created PRs to sync the upgrade matrix in the master and v1.3 branch:

Copy link
Member

@starbops starbops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nit. Please see the comment below.

curl -fL https://releases.rancher.com/harvester/"$prev_ver"/image-lists.tar.gz -o "$WORKING_DIR"/image-lists.tar.gz || ret=$?
image_lists_url=https://releases.rancher.com/harvester/"$prev_ver"/image-lists.tar.gz
# arch-aware image is available after v1.3.0
if [ "$(version_compare "$prev_ver" "v1.3.0")" -eq "1" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it works, we usually use -eq to compare integers. It's better to follow the rules. Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, yes it should be integer, my bad :(

@brandboat brandboat merged commit 5daab04 into harvester:master Mar 28, 2024
5 checks passed
@brandboat
Copy link
Contributor Author

@mergify backport v1.3

Copy link

mergify bot commented Mar 28, 2024

backport v1.3

✅ Backports have been created

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.

3 participants