Validator does not allow the "command" field of template jobs to be invariant
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PlainBox (Toolkit) |
Fix Released
|
Medium
|
Po-Hsu Lin |
Bug Description
When creating a template job, the current design won't allow the command field to be "invariant"
$ ./manage.py validate
jobs/graphics.
This is easily to happen on graphic related job, because we will run the same command twice before and after switching the graphic card profile between the integrated and the dedicated graphic card.
This issue will block bug 1441415
<PHLin> but I found that template jobs won't pass the validation when the command won't change
<zyga> PHLin: yes, that's by design, the design might be wrong but that's what it is now
<PHLin> zyga, I've finished the graphics part, but most of them won't pass :P
<zyga> PHLin: it was assumed that the command should include something from the resource to be different each time
<PHLin> zyga, hmm
<zyga> PHLin: feel free to remove that
<zyga> PHLin: it's in units/job.py
<zyga> PHLin: at the end of the file
<zyga> PHLin: look for TemplateVariant
<zyga> PHLin: just remove that line and it should work
Related branches
- Zygmunt Krynicki (community): Approve
-
Diff: 29 lines (+0/-8)2 files modifiedplainbox/plainbox/impl/unit/job.py (+0/-1)
plainbox/plainbox/impl/unit/test_job.py (+0/-7)
Changed in plainbox: | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
status: | New → In Progress |
Changed in plainbox: | |
milestone: | none → 0.21 |
status: | In Progress → Fix Committed |
Changed in plainbox: | |
status: | Fix Committed → In Progress |
Changed in plainbox: | |
status: | In Progress → Fix Committed |
summary: |
- Template job does not allow the "command" field to be invarivant + Validator does not allow the "command" field of template jobs to be + invariant |
Changed in plainbox: | |
importance: | Undecided → Medium |
Changed in plainbox: | |
status: | Fix Committed → Fix Released |
<zyga> PHLin: perhaps we could think of extra ways to guard the user from making mistakes, eg, have a flag that says 'invariant-command' or something down the road but I don't have experience to know if it's useful at this stage