lp://qastaging/~zyga/checkbox/better-provider-validation
- Get this branch:
- bzr branch lp://qastaging/~zyga/checkbox/better-provider-validation
Branch merges
- Checkbox Developers: Pending requested
-
Diff: 555 lines (+301/-58)7 files modifiedplainbox/plainbox/abc.py (+15/-0)
plainbox/plainbox/impl/commands/checkbox.py (+1/-1)
plainbox/plainbox/impl/highlevel.py (+1/-1)
plainbox/plainbox/impl/providers/special.py (+1/-1)
plainbox/plainbox/impl/providers/v1.py (+19/-6)
plainbox/plainbox/impl/secure/providers/test_v1.py (+141/-5)
plainbox/plainbox/impl/secure/providers/v1.py (+123/-44)
Related bugs
Related blueprints
Branch information
Recent revisions
- 2584. By Zygmunt Krynicki
-
plainbox: use NotUnsetValidator for Provider1Defini
tion.version Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2583. By Zygmunt Krynicki
-
plainbox:providers: use the public `base_dir` attribute
Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2582. By Zygmunt Krynicki
-
plainbox:providers: add_get{
user,secure} _path() Those confusingly named methods return the directory from which
user and secure providers are loaded. This patch will need some work
as we also need to include /usr/local in the secure part thus making
this a list instead of a single directory. The names could be a little
bit more fortunate as wellSigned-off-by: Zygmunt Krynicki <email address hidden>
- 2581. By Zygmunt Krynicki
-
plainbox:
secure: providers: allow Provider1Plugin to fail This patch enforces validation of Provider1Definition data that is
interpreted by Provider1Plugin and translates any ValidationError
exceptions into PlugInError, thus preventing problematic providers
from being loaded.It also ensures that the specified location is an existing directory,
preventing typos or "ghost" providers.Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2580. By Zygmunt Krynicki
-
plainbox:
secure: providers: ensure that location and name are set Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2579. By Zygmunt Krynicki
-
plainbox: prefer Provider1.
load_all_ jobs() over get_builtin_jobs() Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2578. By Zygmunt Krynicki
-
plainbox:
secure: providers: add Provider1. load_all_ jobs() This method acts just like get_builtin_job() that it replaces with two
important differences. First, it never raises RFC822SyntaxError, instead
it collects all such exceptions into a list. This allows it to keep
loading jobs from subsequent files even if the first file has a syntax
problem early on. Second is that the full list of problems is returned
to the caller.This allows it to be more resilient in face of user errors and makes it
a valuable method to have for tools that are aimed at provider developers.The old get_builtin_jobs() is retained for compatibility but has been
re-implemented on top of load_all_jobs().Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2577. By Zygmunt Krynicki
-
plainbox:
secure: providers: drop Provider1. load_jobs( ) This method is no longer used, having been completely replaced by the
JobDefinitionPlugIn and FsPlugInCollection so it can be safely removed.Signed-off-by: Zygmunt Krynicki <email address hidden>
- 2576. By Zygmunt Krynicki
-
plainbox:
secure: providers: rewrite get_builtin_jobs() This patch rewrites get_builtin_jobs() to use the FsPlugInCollection
class along with the new JobDefinitionPlugIn class. This simplifies the
implementation and testing lot since none of the new code needs to deal
with filesystem-related APIs.Signed-off-by: Zygmunt Krynicki <email address hidden>
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://qastaging/checkbox