fpb, shows incorrect message if task doesn't have timeout

Bug #1396234 reported by Evgeniy L
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Evgeniy L

Bug Description

Steps to reproduce:

1. create a plugin with the next tasks.yaml file

- role: ['controller']
  stage: post_deployment
  type: shell
  parameters:
    cmd: ./deploy.sh

2. run "fpb --check fuel_plugin_name"

Actual Result:

2014-11-25 19:27:18 ERROR 6514 (cli) Wrong value format "0 -> parameters", for file "fuel_plugin_name/tasks.yaml", {'cmd': './deploy.sh'} is not valid under any of the given schemas
Traceback (most recent call last):
  File "/home/eli/job/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/cli.py", line 90, in main
    perform_action(args)
  File "/home/eli/job/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/cli.py", line 80, in perform_action
    ValidatorManager(args.check).get_validator().validate()
  File "/home/eli/job/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/validator_v1.py", line 39, in validate
    self.check_schemas()
  File "/home/eli/job/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/validator_v1.py", line 46, in check_schemas
    self.validate_file_by_schema(v1.TASKS_SCHEMA, self.tasks_path)
  File "/home/eli/job/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/base.py", line 47, in validate_file_by_schema
    self.validate_schema(data, schema, path)
  File "/home/eli/job/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/base.py", line 43, in validate_schema
    value_path, path, exc.message))
ValidationError: Wrong value format "0 -> parameters", for file "fuel_plugin_name/tasks.yaml", {'cmd': './deploy.sh'} is not valid under any of the given schemas

Expected result:
More readable message

fpb version - 1.0.1

Tags: plugin
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

Fix proposed to branch: master
Review: https://review.openstack.org/137149

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

Reviewed: https://review.openstack.org/137149
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugins/commit/?id=f361ae87789a099f9cd612b1a66481f9e69ce250
Submitter: Jenkins
Branch: master

commit f361ae87789a099f9cd612b1a66481f9e69ce250
Author: Evgeniy L <email address hidden>
Date: Tue Nov 25 19:27:11 2014 +0400

    fpb shows incorrect message if task doesn't have timeout field

    * oneOf/anyOf statement in jsonschema provides hard to
      understand message, in order to solve this problem was created
      base jsonschema for parameters where timeout is required
      field
    * print error messages to stderr instead of stdout

    Closes-bug: #1396234
    Change-Id: I6dc6b8b77cdd4576a239303726ec42f69a1a0e73

Changed in fuel:
status: In Progress → Fix Committed
Evgeniy L (rustyrobot)
tags: added: plugin
removed: plugins
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.