phagrancy
phagrancy copied to clipboard
Packer push fails due to pushed box version not following SemVer
Hi,
we had the issue that we pushed a box to phagrancy as "20201224" (or something similar ;)).
That's a totally valid version as of https://github.com/TuningYourCode/phagrancy/blob/5aef5376d114f0d021f7b690c8e18ef3050211c7/src/Model/Input/ValidatesVersion.php#L31
Sadly the following push by packer gave us an error because of something like "versions.version of type number is not of type string". We thought that we pushed a new false version but packer parses all existing versions before it will push new boxes.
As per https://www.vagrantup.com/docs/boxes/versioning#version-constraints versions have to be strictly in format "X.Y.Z" - even if they don't enforce it on their api themself (https://app.vagrantup.com/TuningYourCode/boxes/debian-buster64-puppet6).
That would be a breaking change in the api but would probably prevent new starters from doing the same mistake and headache during debugging.
@dlundgren if you agree i could prepare a PR to sharpen the version validation.
Best regards, TuningYourCode
A PR sounds great, sorry for the delay