weaveworks / pctl

CLI for interacting with profiles
Other
7 stars 6 forks source link

PCTL add seems to ignore that path variable specified in a nested profile. #334

Closed steve-fraser closed 3 years ago

steve-fraser commented 3 years ago

What were you trying to accomplish?

I am trying to install a nested from profile inside a profile.

What happened?

It seems that is generating the profile from the source location, but when it imports the child profile is using the "." path location instead of the one specified in the profile location.

► generating profile installation from source: repository git@github.com:weaveworksREDACTIED.git, path: ./REDACTIED and branch demo-profile ✗ failed to make artifacts: failed to read profile.yaml in repo "git@github.com:weaveworks/REDACTIED.git" branch "main" path ".": open /var/folders/l5/z__sm53j3bs2p5znngsf96kc0000gn/T/cloned_profiledec0c6924581307/profile.yaml: no such file or directory make: *** [test] Error 1

- name: $NAME
  profile:
    source:
      url: git@github.com:weaveworks/{REDACTIED}.git
      tag: main
      path: ./REDACTIED

How to reproduce it?

Please reach out individual to me over slack for actual configuration file.

Logs

► generating profile installation from source: repository git@github.com:weaveworks/REDACTIED.git, path: ./REDACTIED and branch demo-profile ✗ failed to make artifacts: failed to read profile.yaml in repo "git@github.com:weaveworks/REDACTIED.git" branch "main" path ".": open /var/folders/l5/z_

Anything else we need to know?

Mac OS

Versions

pctl version 0.11.0

Skarlso commented 3 years ago

Huh, that is weird. Thank you for reporting it, we'll look into it as soon as we can! :)

aclevername commented 3 years ago

After pairing with @steve-fraser it appears this was confusion around how nested profile values work. Our docs state https://profiles.dev/docs/author-docs/nested-profiles:

          branch: # optional: the repo branch if the profile is somewhere other than `main`

This is wrong, it doesn't default and this confusion was causing the problem. Two actions: