Merge lp://staging/~zyga/checkbox/flexible-resources into lp://staging/checkbox
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 |
Related bugs: |
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
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 ResourceExpress
ion.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>
One minor fix in plainbox dev special --dot