Renaming priorities |
|||
Issue descriptionThe priorities file http://cs/chromeos_public/src/third_party/autotest/files/client/common_lib/priorities.py has priorities mapping from string to int. However, some priorities such as "CQ" has its own pool and the jobs within does not compete with other jobs from other suite, which makes the priorities meaningless. In addition, if one would like to use priorities to manage jobs within its own pool, such as cts, the existing priorities string could not well present its meaning. For example, if we apply the current priority string to manage the cts pool, we have to order cts suite's priority using string such as "CQ", "PFQ"...etc. which makes it quite weird. So my initial proposal here is that we: Rename the suite priorities to P0, P1, P2, P3, ...P7 as P0 is the highest priorities.
,
Jul 12 2017
I'm not attached to the named-priorities. They are legacy. I think numbered ones would be clearer.
,
Jul 12 2017
Please replace.
,
Jul 13 2017
I had a chat with PoHsien about this. It seems the enum should just be a dictionary mapping names to priorities (to have some logical grouping). Dictionaries are much easier to maintain (add, delete). The problem with the enum currently is that it obfuscates (and is actually inconsistent with chromite). But for CTS needs we can just use/set priority numbers directly. They don't need to be strings, but if we define strings for our needs, we could maintain our own dictionary to keep the mapping separate.
,
Jul 13 2017
,
Jul 14 2017
Yeah, after discussion with Ilja, we think a dict is more desirable for priority so that we can assign multiple name to the same priority value. But for our initial purpose, as we added the ability to specify suite's priority with number explicitly with number (0-100) without mapping, we don't really need to rename the priorities to clarify our purpose. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ihf@chromium.org
, Jul 12 2017Components: Infra>Client>ChromeOS