This is a list of the errors you may encounter when migrating from Effortless Scaffolding 0.16.0 to 0.17.0. This only pertain to Windows builds.
This document is to help you troubleshoot and the fix error you may get in your windows builds or runs after the release of scaffolding-chef-infra
and scaffolding-chef-inspec
The reason this doc exists is because many of the fixes to get the software working again are pretty simple but there may be more than one choice. This doc will documet the error then show you the recommended way to fix it.
If you were using scaffolding you had to put the $pkg_deps
array in your plan file in order for it to build properly.
This has been fixed by upgrading to habitat >= 1.5.0 and a scaffolding >= 0.17.0 and then removing the $pkg_deps
from your plan
During build time you will see a dependency conflict for the chef-client or the InSpec client. The error will tell you that you have two clients declared a dependencies.
This would be your plan.ps1
$pkg_name="effortless-config-baseline"
$pkg_origin="chef"
$pkg_version="0.1.0"
$pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
$pkg_license=("Apache-2.0")
$pkg_description="A Chef Policy for base"
$pkg_upstream_url="http://chef.io"
$pkg_build_deps=@("core/chef-dk")
$pkg_deps=@("stuartpreston/chef-client", "core/cacerts")
$pkg_scaffolding="chef/scaffolding-chef-infra"
$scaffold_policy_name="base"
When you run build you will get an error that looks like this
effortless-config-baseline: Resolved dependency 'core/cacerts' to C:\hab\studios\dev--effortless_config\hab\pkgs\core\cacerts\2019.08.28\20190829172945
WARNING:
WARNING: The following runtime dependencies have more than one version
WARNING: release in the full dependency chain:
WARNING:
WARNING: * stuartpreston/chef-client ( stuartpreston/chef-client/14.11.21/20190328012639 stuartpreston/chef-client/14.11.21/20190328012639)
WARNING:
WARNING: The current situation usually arises when a Plan has a direct
WARNING: dependency on one version of a package (`acme/A/7.0/20160101200001`)
WARNING: and has a direct dependency on another package which itself depends
WARNING: on another version of the same package (`acme/A/2.0/20151201060001`).
WARNING: If this package (`acme/A`) contains shared libraries which are
WARNING: loaded at runtime by the current Plan, then both versions of
WARNING: `acme/A` could be loaded into the same process in a potentially
WARNING: surprising order. Worse, if both versions of `acme/A` are
WARNING: ABI-incompatible, runtime segmentation faults are more than likely.
WARNING:
WARNING: In order to preserve reliability at runtime the duplicate dependency
WARNING: entries will need to be resolved before this Plan can be built.
WARNING: Below is an expanded graph of all `$pkg_deps` and their dependencies
WARNING: with the problematic lines noted.
WARNING:
WARNING: Computed dependency graph (Lines with '*' denote a problematic entry):
thelunaticscripter/effortless-config-baseline/0.1.0/20200206141344
stuartpreston/chef-client/14.11.21/20190328012639 (*)
core/cacerts/2019.08.28/20190829172945
stuartpreston/chef-client/14.11.21/20190328012639 (*)
core/cacerts/2019.08.28/20190829172945
_Exit-With : Computed runtime dependency check failed, aborting
At C:\hab\pkgs\core\hab-studio\1.5.0\20200122224907\bin\hab-plan-build.ps1:608 char:5
+ _Exit-With "Computed runtime dependency check failed, aborting" 3 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,_Exit-With
All you need to do to fix this is remove the $pkg_deps
line.