checkbox_ng:commands:certification: CertificationTransport constructor called with bad parameters

Bug #1302851 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
High
Daniel Manrique

Bug Description

This seems related to recent work on the transports code.

How to reproduce:
- use a plainbox.conf file that defines the [sru] secure_id key (a bogus value is fine)
- run canonical-certification-server
- deselect all tests and select "start testing"

expected results:

- tests saved and at least an attempt to submit

actual result:

2013.com.canonical.certification::virtualization: pass

Saving submission file to /home/ubuntu/.local/share/plainbox/submission.xml
View results (HTML): file:///home/ubuntu/.local/share/plainbox/results.html
Submitting results to https://certification.staging.canonical.com/submissions/submit/ for secure_id a00D000000IDqvl
Executable 'checkbox' invoked with Namespace(c3_url='https://certification.staging.canonical.com/submissions/submit/', check_config=False, command=<checkbox_ng.commands.certification.CertificationCommand object at 0x7f25cd017a90>, debug_console=False, debug_interrupt=False, exclude_pattern_list=[], include_pattern_list=[], log_level=None, not_interactive=False, pdb=False, providers=None, secure_id='a00D000000IDqvl', trace=[], whitelist=[]) has crashed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 513, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 509, in dispatch_command
    return ns.command.invoked(ns)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/certification.py", line 132, in invoked
    self.settings, ns).run()
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 594, in run
    self._run_jobs(ns, manager)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 646, in _run_jobs
    self.save_results(manager)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/certification.py", line 74, in save_results
    self.submit_results(session)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/certification.py", line 83, in submit_results
    self.config.c3_url, options_string, self.config)
TypeError: __init__() takes 3 positional arguments but 4 were given
Traceback (most recent call last):
  File "/usr/bin/canonical-certification-server", line 9, in <module>
    load_entry_point('checkbox-ng==0.3.dev', 'console_scripts', 'canonical-certification-server')()
  File "/usr/lib/python3/dist-packages/checkbox_ng/main.py", line 192, in cert_server
    CertificationNGTool().main(['certification-server'] + args))
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 291, in main
    return self.dispatch_and_catch_exceptions(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 513, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 509, in dispatch_command
    return ns.command.invoked(ns)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/certification.py", line 132, in invoked
    self.settings, ns).run()
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 594, in run
    self._run_jobs(ns, manager)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 646, in _run_jobs
    self.save_results(manager)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/certification.py", line 74, in save_results
    self.submit_results(session)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/certification.py", line 83, in submit_results
    self.config.c3_url, options_string, self.config)
TypeError: __init__() takes 3 positional arguments but 4 were given

checkbox_ng:certification has this constructor:

 def __init__(self, where, options):

but commands/certification.py calls it like this:

       # Create the transport object
        try:
            transport = CertificationTransport(
                self.config.c3_url, options_string, self.config)

there's an extra parameter here which the transport doesn't understand.

here are my package versions:

ii checkbox-ng 0.3~dev+bzr2889+pkg3~ubuntu all PlainBox based test runner
ii plainbox 0.6~dev+bzr2888+pkg2~ubuntu all toolkit for software and hardware integration testing
ii plainbox-insecure-policy 0.6~dev+bzr2888+pkg2~ubuntu all policykit policy required to use plainbox (insecure version)
ii plainbox-provider-certification-server 0.1~dev+bzr2884+pkg4~ubuntu all Server Certification
ii plainbox-provider-checkbox 0.4~dev+bzr2888+pkg1~ubuntu amd64 CheckBox provider for PlainBox
ii plainbox-provider-resource-generic 0.3~dev+bzr2889+pkg4~ubuntu amd64 CheckBox generic resource jobs provider
ii python3-checkbox-ng 0.3~dev+bzr2889+pkg3~ubuntu all PlainBox based test runner (Python 3 library)
ii python3-checkbox-ng-doc 0.3~dev+bzr2889+pkg3~ubuntu all PlainBox based test runner (documentation)
ii python3-checkbox-support 0.2~dev+bzr2888+pkg1~ubuntu all collection of Python modules used by PlainBox providers
ii python3-plainbox 0.6~dev+bzr2888+pkg2~ubuntu all toolkit for software and hardware testing (python3 module)

Related branches

Daniel Manrique (roadmr)
summary: - transport-related crash?
+ checkbox_ng:commands:certification: CertificationTransport constructor
+ called with bad parameters
Daniel Manrique (roadmr)
Changed in checkbox-ng:
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → Daniel Manrique (roadmr)
milestone: none → 0.3
importance: Critical → High
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: In Progress → Fix Committed
Zygmunt Krynicki (zyga)
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.