checkbox crashes when there are no jobs in a test plan

Bug #1443901 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Low
Zygmunt Krynicki

Bug Description

I've created a small test provider:

(venv.fx)zyga@fx:~/checkbox/providers/plainbox-provider-checkbox$ cat units/debug.pxu
unit: test plan
id: thunderbolt-tests
_name: Thunderbolt Tests
include: monitor/thunderbolt

I can run it with plainbox:

(venv.fx)zyga@fx:~/checkbox/providers/plainbox-provider-checkbox$ plainbox run -T 2013.com.canonical.certification::thunderbolt-tests
===============================[ Analyzing Jobs ]===============================
=============================[ Session Statistics ]=============================
This session is about 0.00% complete
Oszacowany czas trwania zadań zautomatyzowanych to 1.00.
Oszacowany czas trwania zadań ręcznych to 30.00.
Size of the desired job list: 1
Size of the effective execution plan: 2
===========================[ Running Selected Jobs ]============================
-----------------------------[ Hardware Manifest ]------------------------------
ID: 2013.com.canonical.plainbox::manifest
Category: 2013.com.canonical.plainbox::uncategorised
(Command output hidden)
Outcome: job passed
---------------------[ Display connected via Thunderbolt ]----------------------
ID: 2013.com.canonical.certification::monitor/thunderbolt
Category: 2013.com.canonical.plainbox::uncategorised
Job cannot be started because:
 - wyrażenie zasobu "manifest.has_thunderbolt == 'True'" obliczone do fałszu
Outcome: job cannot be started
==================================[ Results ]===================================
 ☑ : Hardware Manifest
 ☐ : Display connected via Thunderbolt

I cannot, however, run it with checkbox-ng:

(venv.fx)zyga@fx:~/checkbox/providers/plainbox-provider-checkbox$ checkbox-cli
=========================[ Resume Incomplete Session ]==========================
There is 1 incomplete session that might be resumed
Do you want to resume session 'pbox-ilfhf8et'?
  r => resume this session
  n => next session
  c => create new session
[rnc]: c
==========================[ Selecting Job Generators ]==========================
===========================[ Running Selected Jobs ]============================
========================[ Selecting Jobs For Execution ]========================
================================[ Ostrzeżenie ]=================================
Wystąpiły problemy z wybranymi zadaniami
 * missing dependency: '2013.com.canonical.plainbox::manifest' (resource)
Problematyczne zadania nie zostaną wzięte pod uwagę
CRITICAL plainbox.crashes: Executable 'checkbox-launcher' invoked with Namespace(color=None, command=<checkbox_ng.commands.launcher.LauncherCommand object at 0x7fd4324f1320>, debug_console=False, debug_interrupt=False, dont_suppress_output=False, dry_run=False, exclude_pattern_list=[], include_pattern_list=[], launcher='/home/zyga/checkbox/venv.fx/bin/checkbox-cli', log_level=None, non_interactive=False, pdb=False, secure_id=None, test_plan=None, trace=[], url=None, whitelist=[]) has crashed
Traceback (most recent call last):
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 560, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 556, in dispatch_command
    return ns.command.invoked(ns)
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/launcher.py", line 90, in invoked
    self.provider_loader, lambda: self.config, ns, launcher
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/newcli.py", line 150, in run
    return self.do_normal_sequence()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/newcli.py", line 198, in do_normal_sequence
    self.interactively_pick_jobs_to_run()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/newcli.py", line 322, in interactively_pick_jobs_to_run
    self.display.run(ScrollableTreeNode(tree, title))
  File "/home/zyga/checkbox/plainbox/plainbox/vendor/textland/display.py", line 186, in run
    return super().run(app)
  File "/home/zyga/checkbox/plainbox/plainbox/vendor/textland/display.py", line 61, in run
    image = app.consume_event(event)
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/ui.py", line 167, in consume_event
    self._toggleNode()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/ui.py", line 250, in _toggleNode
    node.expanded = not(node.expanded)
AttributeError: 'NoneType' object has no attribute 'expanded'
Traceback (most recent call last):
  File "/home/zyga/checkbox/venv.fx/bin/checkbox-launcher", line 9, in <module>
    load_entry_point('checkbox-ng==0.19.dev0', 'console_scripts', 'checkbox-launcher')()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/main.py", line 62, in launcher
    raise SystemExit(CheckboxLauncherTool().main(argv))
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 324, in main
    return self.dispatch_and_catch_exceptions(ns)
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 560, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/home/zyga/checkbox/plainbox/plainbox/impl/clitools.py", line 556, in dispatch_command
    return ns.command.invoked(ns)
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/launcher.py", line 90, in invoked
    self.provider_loader, lambda: self.config, ns, launcher
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/newcli.py", line 150, in run
    return self.do_normal_sequence()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/newcli.py", line 198, in do_normal_sequence
    self.interactively_pick_jobs_to_run()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/commands/newcli.py", line 322, in interactively_pick_jobs_to_run
    self.display.run(ScrollableTreeNode(tree, title))
  File "/home/zyga/checkbox/plainbox/plainbox/vendor/textland/display.py", line 186, in run
    return super().run(app)
  File "/home/zyga/checkbox/plainbox/plainbox/vendor/textland/display.py", line 61, in run
    image = app.consume_event(event)
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/ui.py", line 167, in consume_event
    self._toggleNode()
  File "/home/zyga/checkbox/checkbox-ng/checkbox_ng/ui.py", line 250, in _toggleNode
    node.expanded = not(node.expanded)
AttributeError: 'NoneType' object has no attribute 'expanded'

It is worth noting that checkbox displayed an empty menu before the crash and I clicked enter to 'expand/collapse' the current node.

Related branches

Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Zygmunt Krynicki (zyga)
milestone: none → 0.19
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: In Progress → Fix Committed
Changed in checkbox-ng:
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

Remote bug watches

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