Validator does not allow the "command" field of template jobs to be invariant

Bug #1441519 reported by Po-Hsu Lin
6
This bug affects 1 person
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.txt.in:10: error: job 'graphics/INDEX_driver_version_PRODUCT', field 'command', value must be variant (parametrized)

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 TemplateVariantValidator near 'command'
<zyga> PHLin: just remove that line and it should work

Related branches

Po-Hsu Lin (cypressyew)
Changed in plainbox:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

<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

Po-Hsu Lin (cypressyew)
Changed in plainbox:
milestone: none → 0.21
status: In Progress → Fix Committed
Po-Hsu Lin (cypressyew)
Changed in plainbox:
status: Fix Committed → In Progress
Po-Hsu Lin (cypressyew)
Changed in plainbox:
status: In Progress → Fix Committed
Po-Hsu Lin (cypressyew)
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
Zygmunt Krynicki (zyga)
Changed in plainbox:
importance: Undecided → Medium
Changed in plainbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.