Merge ~sylvain-pineau/checkbox-ng:fix-1748371 into checkbox-ng:master
Proposed by
Sylvain Pineau
Status: | Merged |
---|---|
Approved by: | Sylvain Pineau |
Approved revision: | 289c513e8a4e8cf29bd1fe2d5b649c80fc117130 |
Merged at revision: | 7275e5675311b624e5911b374cc187379995f88d |
Proposed branch: | ~sylvain-pineau/checkbox-ng:fix-1748371 |
Merge into: | checkbox-ng:master |
Diff against target: |
147 lines (+29/-2) 3 files modified
docs/units/template.rst (+8/-2) plainbox/impl/session/assistant.py (+3/-0) plainbox/impl/unit/unit.py (+18/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Maciej Kisielewski | Approve | ||
Sylvain Pineau (community) | Needs Resubmitting | ||
Review via email: mp+337988@code.launchpad.net |
Description of the change
New parameter for jinja2 templated jobs (Nota: not only template units), the content of the checkbox config environment section.
Fixes the linked bug, to avoid job description with for example hardcoded <ap_name> where in config we set $AP_NAME.
To post a comment you must log in.
I'm going to call for a better solution for the problem.
I really don't like passing the config through provider units.
Runtime configuration should not be a provider's property (logically it isn't). I understand the need for environment info to be present when instantiating templates, but I think we don't need to get providers involved in this dynamic process (providers are fairly static monsters).
What I would advocate doing instead is:
- pass config to the code that does the instantiation (IDK how many steps in the callstack the config would have to be passed). or,
- exposing the current config (or current SA instance) through a module interface, I'm doing something similar for the remote functionality, see remote.py: 75-87