Skip to content

Commit

Permalink
helmupdater: ignore versions it can't parse as semver
Browse files Browse the repository at this point in the history
  • Loading branch information
farcaller committed Feb 21, 2024
1 parent b467a43 commit a1e6662
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions charts/rook-release/rook-ceph-cluster/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
chart = "rook-ceph-cluster";
version = "1.13.4";
chartHash = "sha256-Hnpp9dE1eHl841Wef6Jfx1Zm2X58yUL5OvhLPg2h7Zk=";
bogusVersion = true;
}
1 change: 1 addition & 0 deletions charts/rook-release/rook-ceph/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
chart = "rook-ceph";
version = "1.13.4";
chartHash = "sha256-kSLZ22AKeVfgHpaO7yilNip2WVnsgcv1Ec+j940uubM=";
bogusVersion = true;
}
9 changes: 6 additions & 3 deletions helmupdater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ def update_one_chart(
bogus_version_fixed = True
if len(version_str.split('-')) != 1:
continue
version = VersionInfo.parse(version_str)
if version > remote_version:
remote_version = version
try:
version = VersionInfo.parse(version_str)
if version > remote_version:
remote_version = version
except ValueError:
print(f"skipping version `{version_str}` for chart {chart_name}")

if remote_version <= my_version:
return
Expand Down

0 comments on commit a1e6662

Please sign in to comment.