T25987 kernelci.lab.lava: fix and simplify logic to handle LAVA aliases#590
Merged
Conversation
52ff715 to
c550b06
Compare
The code to get the list of aliases did not work as expected, all the
entries looked like this:
"aliases": [
{
"device_type": "",
"name": "am57xx-beagle-x15"
},
Fix it by using the scheduler.device_types.aliases XMLRPC entry point
for each device type present in the lab, and create a plain dictionary
to map the aliases with the standard device type names used by
KernelCI.
Also fix the call to LabAPI.device_type_online() to pass the device
type name rather than the device_type config object.
Drop the legacy standalone function get_device_type_by_name and use a
local method in the LAVA class instead to look up the device type used
in a lab if it's present in the aliases dictionary.
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
The code has been simplified so there is no need for a unit test. Aliases are now handled in the LAVA class with a plain dictionary. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Add missing docstrings to the public methods of the LabAPI class. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
c550b06 to
cbb8052
Compare
Collaborator
Author
|
Tested OK on staging, for example with lab-linaro-lkft: "devices": {
"aliases": {
"am57xx-beagle-x15": "x15",
"i386": "x86",
"qemu_arm": "qemu-arm",
"qemu_arm64": "qemu-arm",
"qemu_i386": "qemu",
"qemu_x86_64": "qemu",
"x86_64": "x86"
},
"device_type_online": {
"dragonboard-410c": false,
"dragonboard-845c": false,
"hi6220-hikey-r2": false,
"juno-r2": false,
"qcom-qdf2400": false,
"qemu": true,
"qemu-arm": false,
"x15": false,
"x86": false
}
}, |
Collaborator
Author
|
Tested also OK in LKFT lab: https://lkft.validation.linaro.org/scheduler/job/2213008 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code to get the list of aliases did not work as expected, all the
entries looked like this:
Fix it by using the scheduler.device_types.aliases XMLRPC entry point
for each device type present in the lab, and create a plain dictionary
to map the aliases with the standard device type names used by
KernelCI.
Drop the legacy standalone function get_device_type_by_name and use a
local method in the LAVA class instead to look up the device type used
in a lab if it's present in the aliases dictionary.
Signed-off-by: Guillaume Tucker guillaume.tucker@collabora.com