Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packer push fails due to pushed box version not following SemVer #14

Closed
TuningYourCode opened this issue Jan 7, 2021 · 1 comment
Closed

Comments

@TuningYourCode
Copy link
Contributor

TuningYourCode commented Jan 7, 2021

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

@dlundgren
Copy link
Owner

A PR sounds great, sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants