Skip to content

Commit

Permalink
ci: check for minor chart upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Apr 16, 2024
1 parent 1948d62 commit 155ca97
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ci/check_dependencies/helm_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
CREATED_IDX = 1

# We ignore Prometheus here, as we're locked to whatever version is CRD-compatible with OpenShift
DEPENDENCIES_TO_IGNORE=("kube-prometheus-stack", "falco")
DEPENDENCIES_TO_IGNORE=("kube-prometheus-stack")
DEPENDENCIES_ONLY_MINOR_UPGRADES=("falco", "metrics-server")

def get_info() -> list[str]:
output_lines = []
Expand Down Expand Up @@ -43,9 +44,13 @@ def get_info() -> list[str]:
pd_entries["created date"] = pd.to_datetime(
pd_entries["created"], format=time_formate_with_zone
)

pd_sorted_entries = pd_entries.sort_values("created date", ascending=False)
latest_release = pd_sorted_entries.loc[0].values
if dep["name"] in DEPENDENCIES_ONLY_MINOR_UPGRADES:
major_version, *_ = current_version.split(".")
compatible_entries = pd_entries[pd_entries["version"].str.startswith(major_version)]
else:
compatible_entries = pd_entries
pd_sorted_entries = compatible_entries.sort_values("created date", ascending=False)
latest_release = pd_sorted_entries.iloc[0].values
current_release = (
pd_sorted_entries.loc[pd_sorted_entries["version"] == current_version]
.values.flatten()
Expand Down

0 comments on commit 155ca97

Please sign in to comment.