User Preferences

User Preferences

While the majority of JDP's config is set in the conf directory on the JDP host. User preferences are taken from other, more accessible places. Where they can be written and read by other applications.

OpenQA

Notifications preferences can be set by adding TOML sections to OpenQA job group descriptions. These are at least read by the Status Difference report which interprets the pattern strings as regular expressions and matches them against test names and suites. The script also takes the job group where the TOML was written into account, so notification settings are not shared between job groups. This means you can use the pattern '.' and it will notify you for all tests on a given job group and no others.

The functions below extract and interpret the TOML and show an example of what the TOML may look like.

dict = extract_toml("text... <code data-type='TOML'>[JDP.some.toml]<br> ... </code>")

Find the first instance of toml contained inside some text formatted for OpenQA job comments or group descriptions.

Only toml inside a the first code tag will be parsed. Code tags which don't have a data-type of TOML will be ignored. The <br> tags just effect the appearance in OpenQA. You should include them to make it readable.

load_notify_preferences(from::String) -> Array{JDP.Trackers.OpenQA.NotifyPref,1}

This loads and parses TOML formatted user notification preferences stored in the OpenQA job group descriptions. Each user can set one or more patterns which could be matched against test suit, test name, test flags, etc. or something else depending on the script.

Arguments

  • from: This is the TLA of the tracker (e.g. "osd") where the description text should be loaded from.

OpenQA Input

The raw OpenQA job group description text should contain something like the following.

<code data-type='TOML'>
[JDP.notify.on-status-diff] <br>
rpalethorpe = ['LTP', 'OpenQA'] <br>
metan = '.' <br>
pvorel = 'LTP' <br>
</code>

For each user name you can set a single string or a vector of strings. These may then be interpreted as plain text, globs or Regexs depending on the script.

Returns

This returns a vector of NotifyPref structures. You may wish to call Functional.groupby on these to build an index.