<span style="line-height:18px">As a side note, and a bikeshed-prone rant which I won't embrace, naming it "tag" feels like a mistake.</span><br><br><div class="gmail_quote">On Fri Oct 24 2014 at 4:13:14 PM William Reade <<a href="mailto:william.reade@canonical.com">william.reade@canonical.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Oct 24, 2014 at 8:04 PM, John Weldon <<a href="mailto:johnweldon4@gmail.com" target="_blank">johnweldon4@gmail.com</a>> wrote:<br>
> Sure, that makes sense.  Right now the Tag encodes a legitimate sequence.<br>
> We should probably just clean up the representation so it doesn't expose the<br>
> internals and just exposes the unit and action sequence number.<br>
<br>
Yeah, that works for me. Please don't expose tags in the UI -- as<br>
gustavo says, they're implementation details. The only critically<br>
important property of a tag is that it be a *unique* entity identifier<br>
for API use -- and that requirement is generally at odds with a<br>
pleasant UX.<br>
<br>
But, yes, if the user representation happens to have a clean 2-way<br>
mapping with the relevant tags, that makes life easier in some<br>
respects, and I certainly won't complain about that.<br>
<br>
Cheers<br>
William<br>
<br>
><br>
><br>
> --<br>
> John Weldon<br>
><br>
> On Fri, Oct 24, 2014 at 10:58 AM, Gustavo Niemeyer<br>
> <<a href="mailto:gustavo.niemeyer@canonical.com" target="_blank">gustavo.niemeyer@canonical.<u></u>com</a>> wrote:<br>
>><br>
>> It was my mistake to call it a hash.. it may be just a random id, in hex<br>
>> form. Alternatively, use a service-specific sequence number so it's better<br>
>> suited to humans. In the latter case, the sequence number must realistically<br>
>> reflect the sequence in which the actions are submitted to units, otherwise<br>
>> it would be confusing.<br>
>><br>
>> On Fri Oct 24 2014 at 3:51:04 PM John Weldon <<a href="mailto:johnweldon4@gmail.com" target="_blank">johnweldon4@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Thanks Gustavo;<br>
>>><br>
>>> I think a hash would be good too.  I'll see what I can find in the juju<br>
>>> code base around hash representations of id's, or come up with something.<br>
>>> Any suggestions on how to generate and translate the hash are welcome<br>
>>> too.<br>
>>><br>
>>> Cheers,<br>
>>><br>
>>><br>
>>> --<br>
>>> John Weldon<br>
>>><br>
>>> On Fri, Oct 24, 2014 at 10:41 AM, Gustavo Niemeyer<br>
>>> <<a href="mailto:gustavo.niemeyer@canonical.com" target="_blank">gustavo.niemeyer@canonical.<u></u>com</a>> wrote:<br>
>>>><br>
>>>> The "tag" (which might be better named "internal id") looks like an<br>
>>>> implementation detail which doesn't seem right to expose. I'd suggest either<br>
>>>> giving it a proper representation that the user can understand (a sequential<br>
>>>> action number, for example), or use a hash. I'd also not use a UUID, btw,<br>
>>>> but rather just a unique hash.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Fri Oct 24 2014 at 2:55:45 PM John Weldon <<a href="mailto:johnweldon4@gmail.com" target="_blank">johnweldon4@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi;<br>
>>>>><br>
>>>>> The current actions spec indicates that the actions command line should<br>
>>>>> return a UUID as the identifier for an action once it's been en-queued using<br>
>>>>> 'juju do <action>'.<br>
>>>>><br>
>>>>> Is there a compelling reason to use UUID's to identify actions, versus<br>
>>>>> using the string representation of the Tag?<br>
>>>>><br>
>>>>><br>
>>>>> A UUID would require a command something like:<br>
>>>>>   juju status action:9e1e5aa0-5b9d-11e4-<u></u>8ed6-0800200c9a66<br>
>>>>><br>
>>>>> which maybe we could shorten to:<br>
>>>>>   juju status action:9e1e5aa0<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> I would prefer something like:<br>
>>>>>   juju status action:mysq/0_a_3<br>
>>>>><br>
>>>>> which would be the string representation of the actions Tag.<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> Is there a compelling reason to use UUID?<br>
>>>>><br>
>>>>> Cheers,<br>
>>>>><br>
>>>>> --<br>
>>>>> John Weldon<br>
>>>>> --<br>
>>>>> Juju-dev mailing list<br>
>>>>> <a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
>>>>> Modify settings or unsubscribe at:<br>
>>>>> <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/<u></u>mailman/listinfo/juju-dev</a><br>
>>><br>
>>><br>
><br>
><br>
> --<br>
> Juju-dev mailing list<br>
> <a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
> Modify settings or unsubscribe at:<br>
> <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/<u></u>mailman/listinfo/juju-dev</a><br>
><br>
</blockquote></div>