...

where 'user-defined' would require yet another attribute
that defines the sequence. 'user-defined' would also have to
handle the 'unspecified' condition.

I think this is too complicated, but I offer it as a counter-example.


Random is default, and I fail to see the practical use of lexical.
About user-defined, I was trying to avoid (at this point) code based
ordering.

Please be careful with the wording here: I think you mean
arbitrary or undefined, not random.

If you're not purposefully implementing random ordering (by
reading from an entropy source such as /dev/random), then it's
simply undefined or arbitrary (dependent of an external,
undefined source, such as the file-system ordering, or the
behavior of a library).

The problem with undefined behavior is that users might start
trusting it if they always see the same behavior in practice. For
example, plugins will always execute in the same order if the
user is not touching the file-system. Then, the order *might*
change when the user upgrades avocado.

If you're implementing plugin ordering, the default should be
something stable and predictable.

It is stable and very unpredictable. IIRC it's in the order you made the egg links, therefor it's always the same till you re-install, add, manually add or modify the egg links. It's similar to `os.walk` which walks the directory not by alphabetical, but by "created" order.

Lukáš


Thanks.
   - Ademar


Finally, the typo got me to thinking: should it be "plugin" or
"plugins"? I don't care one way or the other. However, I do believe
that the attribute should be named consistent with the rest of
avocado. If there isn't a style guide for avocado proposals and naming
conventions, it would be good to have one. Consistency is going to be
hard to establish and maintain without it.


I would go with "plugins", because we already have a global section that
configures "all plugins behavior", and that section is called "plugins".
 Then, I see "plugins.<type>" as "sub section" (logically only) of that
main one, that configures plugins of a given type.

-Jeff



Thanks for the feedback!


--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]


--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]






Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to