Hi folks,

The 2019.12 tag has been pushed to master on git.lavasoftware.org.
.deb packages have been built in GitLab CI and are published at

  https://apt.lavasoftware.org/release

Docker images for amd64 and arm64 have been built in GitLab CI and
are available from

  https://hub.lavasoftware.org/

and

  https://hub.docker.com/u/lavasoftware

Changes in this release
=================

Device-types
============

New device-types
----------------

New supported devices:

* odroid-n2 (Amlogic)
* sun50i-h6-orangepi-3 (Olimex)

docker
------

A docker device can now use capabilities by setting `docker_capabilities` in the device dictionary:

```jinja
{% set docker_capabilities = ["NET_ADMIN"] %}
```
TC2
---

Set `test_character_delay` to `50ms` by default to mitigate some serial corruptions.

u-boot
------

In u-boot boot action, the `type` parameter has been removed. The type of a kernel should be specified in the deploy action.

```yaml
- boot:
    method: u-boot
    type: bootz
```

Should be replaced by:

```yaml
- deploy:
    to: tftp
    kernel:
      url: http://example.com/kernel
      type: zimage
```

This support has been deprecated for more than a year.

Interactive test
================

echo: discard
-------------

When using interactive test with shells, LAVA will look for successes and failures in the full output, including the command that was echoed by the shell.

For example, when interacting with u-boot, LAVA will match the full output of the DUT, including the shell echo:

```shell
=> echo "foo"
bar
```

LAVA would match the string `foo` echoed by the DUT.

This release adds a `echo` option allowing to skip the echoed string.

```yaml
- test:
    interactive:
    - name: network
      prompts: ["=>", "/ # "]
      echo: discard
      script:
      - name: dhcp
        command: dhcp
[...]
```

unnamed commands
----------------

When using an interactive test action, if a command fail LAVA will:
* if the command is named: record the test case and execute the next command
* if the command is unnamed: raise a `TestError`

More information in the [documentation](https://docs.lavasoftware.org/lava/actions-test.html#interactive).

Multinode
=========

Multinode jobs can now make use of `interactive` and `monitor` test actions. However, the support for multinode is limited as these test actions does not support synchronization.

If synchronization is required, use the `lava-test-shell` action.

REST API
========

Using display names when querying REST API
------------------------------------------

The choice fields in LAVA where previously queried in the following manner in REST API when using filters:

```/api/v0.1/jobs/?health=2```

This is now fixed, fields like health and status, will use their display names for filtering like so:

```/api/v0.1/jobs/?health=Incomplete```


API version bump
----------------

The new REST API version 0.2 is now available. New endpoints are available for accessing the LAVA results (specifically test suites and test cases). The old version is also available for compatibility with current API clients.

New endpoints available:

* /api/v0.2/jobs/<job_id>/csv/
* /api/v0.2/jobs/<job_id>/yaml/
* /api/v0.2/jobs/<job_id>/suites/<suite_id>/
* /api/v0.2/jobs/<job_id>/suites/<suite_id>/csv/
* /api/v0.2/jobs/<job_id>/suites/<suite_id>/yaml/
* /api/v0.2/jobs/<job_id>/suites/<suite_id>/tests/
* /api/v0.2/jobs/<job_id>/suites/<suite_id>/tests/<test_id>/

Old endpoints removed:

* /api/v0.2/jobs/<job_id>/tests/


lxc protocol
============

Jobs using the lxc protocol to update resources inside the lxc test shell, can now have access to the `NFS_ROOTFS` and `NFS_SERVER_IP` environment variable.
This will allow jobs to boot using adb and nfs.

Database migrations
===================

This release includes a database migration to remove effects of an old bug that was creating duplicated database objects. The duplicated objects are anyway not accessible from the web interface nor the APIs.
The duplicated `TestData` objects will be removed from the database.

Device config schema
====================

`lava-schema`, the tool currently used to check job definition schema, can now also check for device configuration schema.

```shell
/usr/share/lava-common/lava-schema.py device device.jinja2
```

By default, `lava-schema` will expect a `jinja2` template as first argument. This file would be rendered prior to run the schema checker.

To check an already rendered device dictionary, add `--no-render`.

```shell
/usr/share/lava-common/lava-schema.py device --no-render device.yaml
```

By default, `lava-schema` will look for base templates in `/etc/lava-server/dispatcher-config/device-types`. You can specify the path to use by adding `--path``.

Checksum
========

LAVA is now able to check `sha512sum` checksums of downloaded resources:

```yaml
- deploy:
    images:
      system:
        url: http://example.com/system.img.xz
        compression: xz
        sha512sum: e0e82b5adfae84ff97f4f6488e5b4c64b0dfc7ad8a37b4bcbb887d9f85a6be0a

```

Test shell variables
=====================

Users can now set environment variables in the lava test shell by adding `environment` to the job definition:

```yaml
environment:
  FOO: bar
  BAR: baz
```

The variables will be made available in the lava test shell.

More information in the [documentation](https://docs.lavasoftware.org/lava/dispatcher-format.html#provide-environment-variables-for-the-device-in-the-job-description).

Performances
============

The performances of the lava-server services has been dramatically improved.

With this release, the lava server and master can schedule, start and handle 2.5 times more parallel jobs than in the previous version.

Moreover submitting jobs is now 3 times faster.

We will continue in the following releases to improve the performances.

Caching
=======

LAVA dispatcher can now make use of simple caching service like [KissCache](https://git.lavasoftware.org/ivoire/KissCache).

Admin would have to update the dispatcher configuration in `/etc/lava-server/dispatcher.d/<hostname>/dispatcher.yaml`:

```shell
# Set this variable when using http caching service based on url substitution
# like KissCache
# When downloading resources, lava dispatcher will use this formating string
# instead of the original url.
http_url_format_string: "https://cache.lavasoftware.org/api/v1/fetch/?url=%s"
```

More information in the [documentation](https://docs.lavasoftware.org/lava/proxy.html#using-the-http-cache).

Bazaar
======

The support for pulling test definition from bazaar repositories has been dropped due to the lack of users.


Thanks

--
Rémi Duraffort
LAVA Architect
Linaro