~pieq/plainbox:1663166-fix-stream-exporter

Last commit made on 2017-02-13
Get this branch:
git clone -b 1663166-fix-stream-exporter https://git.launchpad.net/~pieq/plainbox
Only Pierre Equoy can upload to this branch. If you are Pierre Equoy please log in for upload directions.

Branch merges

Branch information

Name:
1663166-fix-stream-exporter
Repository:
lp:~pieq/plainbox

Recent commits

9b60789... by Pierre Equoy

Send all data to stdout/stderr at once to avoid later decoding errors

When displaying a testing session results on screen (stdout/stderr), the
StreamTransport class copy the raw data to a ByteStringStreamTranslator that
then decode it into Unicode text in order to show it properly on screen.

The method used was using a buffer and sending 16 KB chunks, which sometimes
lead to a UnicodeDecodeError exception because a Unicode character would be
spread between two chunks of data, making its decoding impossible.

For instance, the Unicode character ☑ is composed of 3 bytes (0xE2 0x9C 0x93).
If this data is cut and only the first part (0xE2) sent in the data chunk, it
is impossible to decode it into a known Unicode character and plainbox crashes.

To avoid this, we make sure the whole data is sent at once.

LP: #1663166

f77088c... by PMR <pmr@pmr-lander>

Merge #316317 from plainbox:release

Release_2017_Week5

650dff8... by Sylvain Pineau

increment version to v0.34.0.dev0

8044ab2... by Sylvain Pineau

Bump to v0.33.0

b73d9a5... by Sylvain Pineau

Bump to v0.33.0rc1

06b48c2... by PMR <pmr@pmr-lander>

Merge #315414 from ~sylvain-pineau/plainbox:siblings

89d04d3... by PMR <pmr@pmr-lander>

Merge #315660 from ~kissiel/plainbox:exporters-fix

fe7dab5... by Maciej Kisielewski

commands: remove choice checking for --output-format in cmd_ phase

The problem was introduced with my "commands:cmd_session: don't
get_exporter_names() when not needed" 84e3b2c96566df7322a2dd661c260b60604b55bc.

For each subcommand that we have in plainbox we have split them to (at least)
two files. cmd_* and inv_*. The former having the declaration of arg and its
options and the latter having the implementation. This ensures that every
module that invocation needs is only loaded when we invoke the command.

With my 84e3b2 patch I removed checking of all available exporters in the cmd_
phase. This led to a plainbox starting up 4x faster. I left '?' as the only
possible value of --output-format, and when invoked with that arg, it would
actually pull all exporters from providers and list them, as it would run
through the inv_ phase.

fixes lp:1659508

Signed-off-by: Maciej Kisielewski <email address hidden>

c47a88c... by Sylvain Pineau

session:state: Add also-after-suspend/also-after-suspend-auto flags

Given the base job A:

id:foo
_summary: bar
flags: also-after-suspend also-after-suspend-auto
[...]

The also-after-suspend flag is a shortcut to create the following job:

id: after-suspend-foo
_summary: bar after suspend (S3)
depends: 2013.com.canonical.certification::suspend/suspend_advanced

also-after-suspend-auto is a shortcut to create the following job:

id: after-suspend-auto-foo
_summary: bar after suspend (S3)
depends: 2013.com.canonical.certification::suspend/suspend_advanced_auto

2a438e4... by Sylvain Pineau

unit:job: Add the siblings creation feature to JobDefinition

Using this field, creating slightly modified versions of a job does not require
duplicating it then changing just a field or two.

Typical use of this feature are job definitions for test we have to run before
and after suspend or even test that we usually replicate for multiple ports
when there's no resource to do the enumeration.

The syntax of this field must be a JSON array of dictionaries where the
keys/value pairs override or add fields to the base job.