The release picked for build is based on release date, not version number

Bug #1990204 reported by James Simpson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
prometheus-snap
Fix Released
Critical
James Simpson

Bug Description

LATEST_RELEASE=$(curl https://api.github.com/repos/prometheus/prometheus/releases/latest -s | jq -r .tag_name)

The above line will cause a newly released bugfix of a lower version (i.e. 2.37.1) to be selected for build over the highest available version (i.e. 2.38.0).

This has the potential to cause issues where we build a new version with the snap which includes breaking changes, and then accidentally revert to a lower version later.

Related branches

Revision history for this message
James Simpson (jsimpso) wrote :

We should instead look for both the highest release:
HIGHEST_RELEASE=$(curl https://api.github.com/repos/prometheus/prometheus/releases -s | jq -r .[].tag_name | grep '^v2\.[0-9]*\.[0-9]*$' | sort -nr | head -n1)

We should then prefer the highest release for automatic builds to the edge channel.

The "latest release" could still be useful - we should monitor which minor versions we have releases for and automatically build/publish revisional releases for those versions to the appropriate channel.

Changed in prometheus-snap:
importance: Undecided → High
importance: High → Critical
assignee: nobody → James Simpson (jsimpso)
James Simpson (jsimpso)
Changed in prometheus-snap:
status: New → Fix Committed
James Simpson (jsimpso)
Changed in prometheus-snap:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.