Closed slillibri closed 7 years ago
yea, that method is super fragile (only supports semantic versioned tags). I need to make it a bit more resilient to tags that aren't semver based.
Thanks for the bug report @slillibri, I'll see if I can find some time to fix that for you this week. (or you could send a Pull Request 😉 )
Hi, just to say I am also hitting this with tags named "2016.09_02", I tried to have a look if I could submit a Pull Request but I have no Ruby experience and doesn't look super easy having a quick glance of the sort_versions
method.
However, might be only a small change, at least in my case - I guess it would be to restrict the valid_version_numbers
regex to only match the semantic versioning you are talking about, and then append a naturally sorted version of whatever other tags are there - we chose ours intact so a natural sort would do the right thing, and from a quick Python trial I would guess Ruby would too :)
>>> versions = ["2017.02_07", "2016.01_03", "2016.10_02", "2017.01_14"]
>>> versions.sort()
>>> versions
['2016.01_03', '2016.10_02', '2017.01_14', '2017.02_07']
@elsmorian can you check with parabuzzle/craneoperator:2.1.5 and see if this is working now?
I can confirm I no longer hit this and the UI loads and populates fine, thanks very much for the update!
Our tags (as described above) are not being sorted, would be super handy to have even the non-semantic tags attempt to be sorted!
I have attempted https://github.com/parabuzzle/craneoperator/pull/34 which might help!?
fixed in 2.1.8.
I have a container with tags
which causes the sort_versions function to raise
Removing the call to sort_versions from container_tags fixed this for me.