First customer pain point pull request - default-hook
Marco Ceppi
marco.ceppi at canonical.com
Fri Aug 22 03:43:16 UTC 2014
So there is already a JUJU_HOOK_NAME environment variable. So that is easy
enough. I'm not sure what the issue is with having a default-hook file that
is executed when juju can't find that hook name.
I don't want to make it an all or nothing solution where you either have
one file or hooks per file, there doesn't seem to be any real advantage to
that. For example my default - hook might be written in a language not on
the cloud image, now I need an install hook which installs that interpreter.
I'm a plus one to a fall back of default-hook when hook isn't found and a
+1 to the already existent environment variable.
Marco
On Aug 21, 2014 4:59 AM, "Adam Collard" <adam.collard at canonical.com> wrote:
> The charms I maintain and write are in Python and use charm-helpers. I
> have a file called hooks.py and a bunch of symlinks pointing to it.
> Presumably this change would push me to rename hooks.py to default-hook.
>
> The issue I have is that then I cannot (easily) test that file, because
> it's not a valid Python module name. So I'd end up still having hooks.py
> and a symlink from default-hook to that. I'm not sure that this fix would
> then alleviate the pain point...
>
>
> On 20 August 2014 23:43, Tim Penhey <tim.penhey at canonical.com> wrote:
>
>> On 21/08/14 02:50, Nate Finch wrote:
>> > I would expect a lot of people will implement their charms as a single
>> > script (especially given the number of charms we've seen implemented
>> > that way even with minimal support for it). If the special hook file is
>> > called "default-hook", it makes those single-script charms seem like
>> > less of a hack than if the single file is called "missing-hook". It
>> > would also makes more sense to a new charm author, I think.
>>
>> +1 to default-hook
>> -1 to missing-hook
>>
>> As Aaron mentioned, it isn't missing if it is there.
>>
>> I agree that default-hook is more likely to make sense to newcomers.
>>
>> Tim
>>
>>
>> --
>> Juju-dev mailing list
>> Juju-dev at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>>
>
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140821/bb9424b2/attachment.html>
More information about the Juju-dev
mailing list