requirements job failing on c-c-s causing submission-resources to appear as a skipped test
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Resource |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
There's a new job in resources:
id: requirements
estimated_duration: 0.01
plugin: resource
command: [ -f $PLAINBOX_
_description:
Provide links to requirements documents.
.
Each requirement should have two keys with their respective
values:
name: (to be used as the anchor text)
link: (the actual URL)
.
Providers wishing to use this feature need to:
1- Write a job that places a suitably-formatted file in $PLAINBOX_
2- Update their whitelists to run that job *before* miscellanea/
or the "requirements" resource job.
and that is a requirement of a new miscellanea job:
plugin: shell
id: miscellanea/
depends:
cpuinfo
dmi
dpkg
lsb
package
requirements
uname
dmi_attachment
sysfs_attachment
udev_attachment
estimated_duration: 1.0
command: true
_description:
A meta-job depending on the resources needed for a valid submission.
that is appearing as a skipped job because the "requirements" test has failed.
miscellanea/
I get the feeling this is being slurped in because of the new meta job that replaces the resources listing in whitelists, but I'm not familiar with either of these jobs and thus have no idea what they're for or why they exist or why "requirements" is failing on canonical-
Maybe not a bug, but maybe it is? I know not.
Related branches
- Zygmunt Krynicki (community): Approve
-
Diff: 37 lines (+18/-1)1 file modifiedproviders/plainbox-provider-resource-generic/jobs/resource.txt (+18/-1)
Changed in plainbox-provider-checkbox: | |
status: | New → Invalid |
Changed in plainbox-provider-resource: | |
status: | Triaged → In Progress |
assignee: | nobody → Daniel Manrique (roadmr) |
no longer affects: | checkbox |
no longer affects: | plainbox-provider-checkbox |
Changed in plainbox-provider-resource: | |
milestone: | none → 0.5 |
status: | In Progress → Fix Committed |
Changed in plainbox-provider-resource: | |
status: | Fix Committed → Fix Released |
requirements allows you to insert arbitrary links (name and URL) in the xml report. It was placed in miscellanea/ submission- resources to avoid maintaining resources "the old way", with the downside that, as you observed, if the files it depends on are not present, it will barf and cause inconsistent results. This is mostly cosmetic because all the other dependencies of submission- resources will run; and that's the whole point, other than that, we don't really care about submission- resources itself.
For correctness and to avoid confusion, requirements resource should NOT exit with failure if the file it tries to read doesn't exist.
The command for the requirements job is:
command: [ -f $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt ] && cat $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt
This can change to:
command: if [ -f $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt ]; then cat $PLAINBOX_ SESSION_ SHARE/requireme nts_docs. txt; else true; fi
Using if/then/else/fi is needed because just adding ||true at the end of the original command will not fail if the file *exists* but is unreadable (if cat blahblah returns error).