lp:~zyga/checkbox/fix-1297746

Created by Zygmunt Krynicki on 2014-03-28 and last modified on 2014-03-28
Get this branch:
bzr branch lp:~zyga/checkbox/fix-1297746
Only Zygmunt Krynicki can upload to this branch. If you are Zygmunt Krynicki please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Zygmunt Krynicki
Project:
Checkbox
Status:
Merged

Recent revisions

2852. By Zygmunt Krynicki on 2014-03-28

plainbox:provider_manager: handle deprecated fields

This patch makes the `manage.py validate` command support the
Problem.deprecated problem which is used to report 'name' being used
inside job definitions.

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

2851. By Zygmunt Krynicki on 2014-03-28

plainbox:provider_manager: enforce strong validation in `manage.py validate`

This patch ironically allows the validate command to load broken job
definitions and inspect them manually inside the command core.

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

2850. By Zygmunt Krynicki on 2014-03-28

plainbox:secure:providers: expose control for job validation

This patch allows two settings (validate and validation_kwargs) to propagate
from Provider1 to JobDefinitionPlugIn. By default validation is enabled
but no validation keywords are supplied so only serious problems are
"reported" (as in preventing a job definition from being loaded).
Those can be changed by passing the two new keyword-only arguments.

They are passed from Provider1.from_definition(),
through Provider1.__init__() and to JobDefinitionPlugIn where they control
the validation block. The second argument (validation_kwargs) is passed
directly to the validator to control its behavior.

Some tests were altered not to overly validate everything where it is
obvious we don't care about valid jobs, just about getting some dummy
data across.

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

2849. By Zygmunt Krynicki on 2014-03-28

plainbox:secure:providers: drop useless import

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

2848. By Zygmunt Krynicki on 2014-03-28

plainbox:job: add strictness control to job validator

This patch adds two optional arguments to the validator, strict, which
effectively runs the validator at maximum strictness and deprecated
which makes it find deprecated fields or values.

The default settings will ignore harmless errors (thus making the
validator do no evil) while still reporting (and preventing) serious
problems that would definitely fail at job runtime.

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

2847. By Zygmunt Krynicki on 2014-03-28

plainbox:job: add Problem.deprecated

This attribute allows us to report problems related to field deprecation

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

2846. By Zygmunt Krynicki on 2014-03-28

plainbox:job: drop validator_cls argument

This patch drops the unused argument of JobDefinition.validate(). This
argument prevents us from just having a bunch of keyword arguments for
the validator itself.

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

2845. By Zygmunt Krynicki on 2014-03-28

plainbox:job: validate the presence of job.partial_id

We should validate partial_id, id is always there.

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

2844. By Zygmunt Krynicki on 2014-03-28

plainbox:job: don't require the id field

This patch removes the requirement to have the 'id' field (which maps to
the partial_id property) in each JobDefinition object created from
RFC822 record. The reason for that code was to originally provide some
form of validation and protection against broken records. Now that task
is better suited by the job validator subsystem so let's remove this
check and use the validator instead.

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

2843. By Zygmunt Krynicki on 2014-03-28

"automatic merge by tarmac [r=roadmr][bug=1298166][author=zkrynicki]"

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:checkbox
This branch contains Public information 
Everyone can see this information.

Subscribers