modules/mu/config.rb in cloud-mu-3.1.0 vs modules/mu/config.rb in cloud-mu-3.1.1

- old
+ new

@@ -346,11 +346,11 @@ @mommacat = MU::MommaCat.getLitter(@deploy_id, set_context_to_me: false) elsif @mommacat and !@deploy_id @deploy_id = @mommacat.deploy_id end - kitten if @mommacat # try to populate the actual cloud object for this + kitten(shallow: true) if @mommacat # try to populate the actual cloud object for this end # Comparison operator def <=>(other) return 1 if other.nil? @@ -474,11 +474,11 @@ # Return a {MU::Cloud} object for this reference. This is only meant to be # called in a live deploy, which is to say that if called during initial # configuration parsing, results may be incorrect. # @param mommacat [MU::MommaCat]: A deploy object which will be searched for the referenced resource if provided, before restoring to broader, less efficient searches. - def kitten(mommacat = @mommacat) + def kitten(mommacat = @mommacat, shallow: false) return nil if !@cloud or !@type if @obj @deploy_id ||= @obj.deploy_id @id ||= @obj.cloud_id @@ -507,11 +507,11 @@ else # MU.log "Failed to find a live '#{@type.to_s}' object named #{@name}#{@id ? " (#{@id})" : "" }#{ @habitat ? " in habitat #{@habitat}" : "" }", MU::WARN, details: self end end - if !@obj and !(@cloud == "Google" and @id and @type == "users" and MU::Cloud::Google::User.cannedServiceAcctName?(@id)) + if !@obj and !(@cloud == "Google" and @id and @type == "users" and MU::Cloud::Google::User.cannedServiceAcctName?(@id)) and !shallow begin hab_arg = if @habitat.nil? [nil] elsif @habitat.is_a?(MU::Config::Ref) @@ -1654,10 +1654,10 @@ descriptor['#MU_VALIDATED'] = true end end - descriptor["dependencies"].uniq! + descriptor["dependencies"].uniq! if descriptor["dependencies"] @kittencfg_semaphore.synchronize { @kittens[cfg_plural] << descriptor if append }