Merge lp://staging/~zyga/checkbox/flexible-resources into lp://staging/checkbox

Proposed by Zygmunt Krynicki
Status: Work in progress
Proposed branch: lp://staging/~zyga/checkbox/flexible-resources
Merge into: lp://staging/checkbox
Diff against target: 588 lines (+223/-119)
7 files modified
plainbox/plainbox/impl/applogic.py (+2/-0)
plainbox/plainbox/impl/commands/inv_special.py (+6/-5)
plainbox/plainbox/impl/ctrl.py (+37/-29)
plainbox/plainbox/impl/resource.py (+126/-60)
plainbox/plainbox/impl/session/jobs.py (+4/-3)
plainbox/plainbox/impl/session/test_jobs.py (+16/-0)
plainbox/plainbox/impl/test_resource.py (+32/-22)
To merge this branch: bzr merge lp://staging/~zyga/checkbox/flexible-resources
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Needs Fixing
Zygmunt Krynicki (community) Needs Resubmitting
Review via email: mp+243801@code.staging.launchpad.net

Description of the change

818e12c plainbox:sesssion: allow FAILED_RESOURCE not to have a job reference
92bc352 plainbox: allow resource programs on variable number of resources
7b554e5 plainbox:resource: allow {True,False} expressions

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

One minor fix in plainbox dev special --dot

review: Needs Fixing
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'm blind, I was looking at the OLD tree, nothing to worry about here

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've fixed a bug in applogic related to skipping jobs though.

review: Needs Resubmitting
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Extremely valuable, +1

review: Approve
Revision history for this message
Daniel Manrique (roadmr) wrote :
Download full text (12.9 KiB)

The attempt to merge lp:~zkrynicki/checkbox/flexible-resources into lp:checkbox failed. Below is the output from the failed tests.

[precise] starting container
[precise] (timing) 0.05user 0.02system 0:04.20elapsed 1%CPU (0avgtext+0avgdata 7868maxresident)k
[precise] (timing) 0inputs+32outputs (0major+5775minor)pagefaults 0swaps
[precise] provisioning container
[precise] (timing) 36.98user 10.96system 1:17.36elapsed 61%CPU (0avgtext+0avgdata 51600maxresident)k
[precise] (timing) 0inputs+16424outputs (0major+4458603minor)pagefaults 0swaps
[precise-testing] Starting tests...
Found a test script: ./checkbox-gui/requirements/container-tests-checkbox-gui-build
[precise-testing] container-tests-checkbox-gui-build: PASS
[precise-testing] (timing) 31.38user 2.38system 0:34.17elapsed 98%CPU (0avgtext+0avgdata 116388maxresident)k
[precise-testing] (timing) 0inputs+4240outputs (0major+478239minor)pagefaults 0swaps
Found a test script: ./checkbox-ng/requirements/container-tests-checkbox-ng-unit
[precise-testing] container-tests-checkbox-ng-unit: FAIL
[precise-testing] stdout: http://paste.ubuntu.com/9487249/
[precise-testing] stderr: http://paste.ubuntu.com/9487250/
[precise-testing] (timing) Command exited with non-zero status 1
[precise-testing] (timing) 0.33user 0.09system 0:00.45elapsed 95%CPU (0avgtext+0avgdata 33636maxresident)k
[precise-testing] (timing) 0inputs+1592outputs (0major+18614minor)pagefaults 0swaps
Found a test script: ./checkbox-support/requirements/container-tests-checkbox-support
[precise-testing] container-tests-checkbox-support: PASS
[precise-testing] (timing) 16.18user 0.17system 0:16.45elapsed 99%CPU (0avgtext+0avgdata 83076maxresident)k
[precise-testing] (timing) 0inputs+1096outputs (0major+31393minor)pagefaults 0swaps
Found a test script: ./checkbox-touch/requirements/container-tests-touch-unit-tests
[precise-testing] container-tests-touch-unit-tests: PASS
[precise-testing] (timing) 0.00user 0.00system 0:00.02elapsed 40%CPU (0avgtext+0avgdata 2024maxresident)k
[precise-testing] (timing) 0inputs+8outputs (0major+2342minor)pagefaults 0swaps
Found a test script: ./plainbox/plainbox/impl/providers/categories/requirements/container-tests-provider-categories
[precise-testing] container-tests-provider-categories: FAIL
[precise-testing] stdout:
[precise-testing] stderr: http://paste.ubuntu.com/9487251/
[precise-testing] (timing) Command exited with non-zero status 1
[precise-testing] (timing) 0.10user 0.01system 0:00.13elapsed 88%CPU (0avgtext+0avgdata 9340maxresident)k
[precise-testing] (timing) 0inputs+16outputs (0major+4769minor)pagefaults 0swaps
Found a test script: ./plainbox/requirements/001-container-tests-plainbox-egg-info
[precise-testing] 001-container-tests-plainbox-egg-info: PASS
[precise-testing] (timing) 0.16user 0.03system 0:00.21elapsed 93%CPU (0avgtext+0avgdata 10500maxresident)k
[precise-testing] (timing) 0inputs+88outputs (0major+4982minor)pagefaults 0swaps
Found a test script: ./plainbox/requirements/container-tests-plainbox
[precise-testing] container-tests-plainbox: FAIL
[precise-testing] stdout: http://paste.ubuntu...

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

ast NameConstant is only Python 3.4 (was added in https://hg.python.org/cpython/rev/03f92a9f0875)

Unless there's an ast way to do the same in older version, this MR can't land.

review: Needs Fixing

Unmerged revisions

3480. By Zygmunt Krynicki

plainbox:resource: allow {True,False} expressions

This patch changes the static analyzer for resource programs to allow
the constants True and False to be used. This, coupled with the
preceeding patch, allows False to be used as a simple constant
expression that causes a job to be skipped all the time.

Signed-off-by: Zygmunt Krynicki <email address hidden>

3479. By Zygmunt Krynicki

plainbox: allow resource programs on variable number of resources

This patch changes resource handling (specifically expression resources
and programs) to allow expressions based on variable number of resource
objects to exist. Specifically, this generalizes the current resource
expressions to have a list of resources, rather than always one. In
practice more than one resource cannot be used but zero resources can.

This allows constant expressions to work, for example, by using "False"
or "0" as a valid resource program.

Along the way some simplifications were made to the ResourceExpression
initializer and to the resource_id_list property (which no longer
computes anything) and, to a smaller extent, to other methods in that
class.

In technical terms the ResourceExpression.resource_id and
ResourceExpression.resource_alias properties were changed to be
resource_id_list and resource_alias_list respectively.

Various pieces of code that handled resource_id or resource_alias were
updated to loop over all appropriate elements. As a special session
controller now inhibits jobs that don't depend on any resource but still
evaluated to a non-True value.

Signed-off-by: Zygmunt Krynicki <email address hidden>

3478. By Zygmunt Krynicki

plainbox:sesssion: allow FAILED_RESOURCE not to have a job reference

Signed-off-by: Zygmunt Krynicki <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches