[katello-devel] Modelling of environments, products, etc in Katello (related to renaming of environments)

Dmitri Dolguikh dmitri at redhat.com
Tue Aug 14 12:19:10 UTC 2012


On 14/08/12 12:57 PM, Jan Pazdziora wrote:
> On Tue, Aug 14, 2012 at 12:37:06PM +0100, Dmitri Dolguikh wrote:
>> On 14/08/12 12:05 PM, Jan Pazdziora wrote:
>>> How do you propose to solve situation when you have a resource
>>>
>>> 	prod
>>>
>>> and it gets renamed to
>>>
>>> 	prod-old
>>>
>>> and then the admin wants to create new resource named
>>>
>>> 	prod
>>>
>>> ? Will you allow them to create that resource with this name (breaking
>>> the expectation because the new prod content might be completely
>>> different), or will the (now) prod-old occupy the prod name forever?
>> I would not allow the user to create new resource named 'prod', as
>> it would introduce ambiguity.
> What is the difference between renaming prod to prod-old, and removing
> prod and creating prod-old with the same content?
the difference is going to be subtle. In a general case you can't create 
a resource that's identical to another one, some things are going to 
differ - id's for example.

In that light: moving, semantically assumes continuation. Deletion and 
re-creation does not.
-d
>
>>> The labels are just a human readable names assigned to resources.
>> labels remain human-readable only in a subset of all locales. With a
>> completely non-ascii based locale, the labels will be anything but
>> human readable. Think Russian, Chinese, Japanese, Korean, etc.
> It's still better for a Russion user to have environment called
> "prod" in US-ASCII than to be forced to spell "29f920a8ee9f829b8cdd8"
> everywhere.
Where's everywhere? What if the language doesn't translate to latin 
ascii as easily as Russian?
>
>>> If
>>> the admin on the server decides that the
>>>
>>> 	prod
>>>
>>> label should now point to different object, why stop them?
>> Because something, somewhere is possibly using the url before change
>> to point to the original resource. Now it's pointing to a completely
>> different resource, and there's no way to notify the user of the
>> change.
> If the admin completely changes attributes / internals / content
> of that resource, it will also be pointing to different resource,
> semantics-wise.
I'd argue no matter how extensively changed, some attributes are going 
to stay constant (we use them for identification) - there's a continuity 
in resource's life. One can potentially track all the changes of a given 
resource by looking at its audit trail.
>
>>> point to the same resource? Here the first will likely be used
>>> internally and could be used by the super careful user who want to
>>> protect from any label manipulation, and the second one would be used
>>> by users who trust the admin and they always want to use their
>>> production environment, no matter if it was just created from scratch
>>> or renamed three times in the mean time.
>> Why introduce TWO ways to identify a resource, one of them
>> non-uniquely, if we can use a url + search for resource based on
>> metadata (labels, names, what have you).
> Well sure,
>
> 	/something/search?label=prod
>
> is just as good as
>
> 	/something/label/prod
I can't judge if those are equally good, but semantically they are 
different: the former doesn't provide any guarantees as to uniqueness or 
availability of a resource matching the query. The latter states that 
there is one.

-d





More information about the katello-devel mailing list