Closed lordnynex closed 7 years ago
Fixed via #176
@lordnynex -- rather than raise an error if the version is miconfigured, the mentioned PR tracks fpm
's behavior and sets the version to 1.0
if it is not provided explicitly.
@bernd @BaxterStockman Just some feedback on this PR
The assumption of 1.0 carries mild risk for people using fpm-cookery as a part of a CI/CD flow if version is broken after the package is well established. Example, critical-package-1.5-1.deb is in production, and I mangle hiera config; apt install will always believe it's at the latest package version. I suppose the same can be said for backages using semver < 1.0, only in reverse.
This is not a huge deal as I can work around it with version checks in testing, but it may be worth calling out in the documentation.
Hello,
In my previous issue I mentioned hiera is looking for
common.yaml
by default. If this fails to load for whatever reason, the recipe crashes and burns with a very misleading exceptionIt seems version.rb has an opportunity to test for nil and exit with a meaningful error message. Additionally, maybe there is some sort of global indicator saying 'hiera failed to load' that can be checked. In this situation if there is no hiera files loaded and version is nil, it's pretty safe to assume the user misconfigured something and maybe throw an error with some explanation of why this is occurring.