Generated 'git describe' based version strings can exceed 32 character version limit

Bug #1849935 reported by James Hebden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Confirmed
Undecided
Unassigned
snapd
Won't Fix
Undecided
Unassigned

Bug Description

When building a snap using the 'version: git' snapcraft.yaml parameter, it is possible for snapcraft to generate a version string longer than its own 32 character limit.

For example, a snap built from a forked branch of the upstream 'develop-2019-10-23' branch, with some dirty commits, produces the below error:

error: cannot validate snap "matrix-appservice-irc": invalid snap version "develop-2019-10-23+git10.fb1f3b2-dirty": cannot be longer than 32 characters (got: 38)

The snap in question can be cloned from https://github.com/devec0/matrix-appservice-irc/tree/add-snapcraft and built if you have trouble reproducing this behaviour.

Revision history for this message
Chris Patterson (cjp256) wrote :

The limitation currently exists in snapd.

Prior conversation on this stalled: https://forum.snapcraft.io/t/feature-request-extend-length-of-version-string/13335?page=2

affects: snapcraft → snapd
affects: snapd → snapcraft
Changed in snapcraft:
status: New → Confirmed
Revision history for this message
John Lenton (chipaca) wrote :

As far as snapd is concerned, the decision (as explained in the forum) is that the version is not going to get any longer.

Versions are for humans. Short, easy to compare, is key.

We'll be adding things to support the use case of having build tree hashes via attributes, also as mentioned in the forum.

Changed in snapd:
status: New → Won't Fix
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.