environment_format returns a non informative error

Bug #1524257 reported by Removed by request
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Undecided
Unassigned
python-heatclient
In Progress
Medium
Neetu Jain

Bug Description

Parsing a long list of environment files and failing due to human error leaves the user unable to understand where the error was.
In my case I passed 7 environment files and some were custom built. I expect an error when I did something wrong but the error I got can be more useful:

ERROR:
.
.
.
.
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 166, in process_multiple_environments_and_files
    template_url)
  File "/usr/lib/python2.7/site-packages/heatclient/common/template_utils.py", line 188, in process_environment_and_files
    env = environment_format.parse(raw_env)
  File "/usr/lib/python2.7/site-packages/heatclient/common/environment_format.py", line 42, in parse
    raise ValueError(_('environment has wrong section "%s"') % param)
ValueError: environment has wrong section "outputs"

1. what 'outputs' have to do with it? none of those files had 'outputs'.
2. which environment file failed parsing?

Tested on killo
$ heat --version
0.6.0

Tags: tripleo
Revision history for this message
Steven Hardy (shardy) wrote :

So, this is a heatclient bug, and we need to output something like "you appear to be passing a heat template instead of an environment file"

The "outputs" part is because you're doing -e some_file.yaml, an some_file.yaml has a section called "outputs" in it, e.g it's a heat template.

Changed in python-heatclient:
status: New → Triaged
importance: Undecided → Medium
Changed in heat:
status: New → Invalid
Neetu Jain (nutshi)
Changed in python-heatclient:
assignee: nobody → Neetu Jain (nutshi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

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

Changed in python-heatclient:
status: Triaged → In Progress
Revision history for this message
Neetu Jain (nutshi) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-heatclient (master)

Change abandoned by Neetu Jain (<email address hidden>) on branch: master
Review: https://review.openstack.org/264925
Reason: abandoning since this changeset got created by mistake .. it should have been added in https://review.openstack.org/263889 instead

Revision history for this message
Neetu Jain (nutshi) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Takashi Kajinami <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/python-heatclient/+/263889
Reason: this hasn't been updated for 6 years and is stale.

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.