Open
Description
Component
infrahubctl
Infrahub SDK version
1.13.3
Current Behavior
Assuming I have the following hierarchy:
└── vlan
├── README.md
└── vlan.yml
Essentially a folder that contains my schema yaml file and a small md piece of documentation.
If I try to load this schema pointing to the folder I have the following output:
infrahubctl schema load vlan
vlan/README.md does not exist!
Expected Behavior
I expect the command to ignore .md
files (and everything which is not .yml
)
Steps to Reproduce
- Create a folder that contains both a
.yml
and a.md
file - Try to schema load that folder
Additional Information
infrahub-sdk-python/infrahub_sdk/yaml.py
Lines 121 to 134 in 02b4f12
- here having .json in a class that is called YAML tickles something
- I believe we need to add an extra statement to differentiate
user passes an invalid path
fromthat path contains a file which is not a yaml file