SDK click review errors due to missing apparmor-easyprof-ubuntu.json

Bug #1622188 reported by SiCoe
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical Click Reviewers tools (obsolete)
Won't Fix
Medium
Jamie Strandboge

Bug Description

Error shows on fresh install of the ubuntu SDK.

Running the "Build and validate click package" within the Publish tab on SDK shows error at bottom of log:

Error: Traceback (most recent call last):
  File "/usr/bin/click-review", line 162, in <module>
    main()
  File "/usr/bin/click-review", line 156, in main
    results.run_all_checks(overrides)
  File "/usr/bin/click-review", line 105, in run_all_checks
    section = self._run_module_checks(module, overrides)
  File "/usr/bin/click-review", line 97, in _run_module_checks
    review.do_checks()
  File "/usr/lib/python3/dist-packages/clickreviews/common.py", line 384, in do_checks
    func()
  File "/usr/lib/python3/dist-packages/clickreviews/cr_security.py", line 691, in check_policy_groups
    if len(policy_groups) < 1:
TypeError: object of type 'NoneType' has no len()

This is caused by the apparmour-easyprof-ubuntu.json file missing from my home folder's .cache/click-reviewers-tools/

The SDK should download it if it's missing but the address it uses is: http://bazaar.launchpad.net/~click-reviewers/click-reviewers-tools/trunk/download/head:/apparmoreasyprofubun-20140711222314-oeohtxzvf9a58fa6-1/apparmor-easyprof-ubuntu.json and this link currently returns 404.

On putting a copy of the apparmour-easyprof-ubuntu.json file in the .cache/click-reviewers-tools/ folder, the error goes away.

Revision history for this message
Stuart Langridge (sil) wrote :
Zoltan Balogh (bzoltan)
Changed in click-reviewers-tools:
status: New → Confirmed
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

The JSON file is back it seems. Easy fix it was.

Revision history for this message
Stuart Langridge (sil) wrote :

The bug is that the SDK relies on a file on the network being present and won't work without it, which breaks if the file disappears or the network isn't available. Putting the file back on the network doesn't really solve the problem :-) Shipping a "backup" copy of this file in the package and falling back to it if the network isn't available or the file vanished would solve it...

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The way it is supposed to work is that the tools fetch it the first time, then if the network is done they will continue using it. However, clearly the first use is a problem. We can ship the file and fallback to using it in this case.

Changed in click-reviewers-tools:
status: Confirmed → Triaged
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → Medium
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Marking this as Won't Fix since the review tools won'tbe getting updates for click and snap v1 any more.

Changed in click-reviewers-tools:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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