Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

is the fully qualified pack namespace required? #474

Closed jstrachan closed 6 years ago

jstrachan commented 6 years ago

I banged my head trying to do this after installing draft 0.9.0 (via tarball or brew):

$ draft create --pack=java
Error: could not load /Users/jstrachan/.draft/packs/java: lstat /Users/jstrachan/.draft/packs/java/charts/: no such file or directory

I guessed this instead after noodling the ~/.draft dir:

draft  create --pack=github.com/Azure/draft/packs/java

which worked fine.

It makes lots of sense to let different pack repos be used; but I wonder if no pack is found for 'foo' that it should try "Azure/draft/packs/" + "foo" too?

If its expected behaviour I'll be happy to PR this doc https://github.com/Azure/draft/blob/master/docs/reference/dep-003.md#the-pack-structure to replace --pack=python with the fully qualified name

bacongobbler commented 6 years ago

This was something I missed after I introduced pack repositories. It was noted in #468 but I didn't file a ticket, so thank you for opening one! :)

The current behaviour is unintended. Right now we don't know what the --pack flag should look like (I'm looking for similarities across other tools), but what I was thinking was that a user would enter

$ draft create --pack=java

Which would search across all pack repositories for a "java" pack. If it found a single pack, it'll use that. But in the case where there are multiple packs with the same name, we would prompt the user to ask which one they'd like to use. e.g. #346.

bacongobbler commented 6 years ago

fixed via #654