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

Fix 972: handle compose_node_name #973

Merged
merged 3 commits into from
Mar 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions kapitan/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ def compile_targets(

# if '-t' is set on compile or only a few changed, only override selected targets
if updated_targets:
ademariag marked this conversation as resolved.
Show resolved Hide resolved
for target in updated_targets:
compile_path_target = os.path.join(compile_path, target)
temp_path_target = os.path.join(temp_compile_path, target)
for target in target_objs:
path = target["target_full_path"]
compile_path_target = os.path.join(compile_path, path)
temp_path_target = os.path.join(temp_compile_path, path)

os.makedirs(compile_path_target, exist_ok=True)

Expand Down Expand Up @@ -404,7 +405,7 @@ def load_target_inventory(inventory_path, targets, ignore_class_notfound=False):
raise InventoryError(
"InventoryError: {}: parameters.kapitan has no assignment".format(target_name)
)
target_obj["target_full_path"] = inv_target["__reclass__"]["node"].replace("./", "")
target_obj["target_full_path"] = inv_target["parameters"]["_reclass_"]["name"]["path"]
require_compile = not ignore_class_notfound
valid_target_obj(target_obj, require_compile)
validate_matching_target_name(target_name, target_obj, inventory_path)
Expand Down