[engine] Poor error reporting while resolving namespace

Bug #1460100 reported by Ekaterina Chernova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Invalid
Medium
Unassigned

Bug Description

The application class contains the following line

 - $._environment: $.find(std:Environment).require()

But std namespace is not defined at namespaces section:
Namespaces:
  =: io.murano.apps.apache
  res: io.murano.resources
  sys: io.murano.system

Deployment failed with message Unable to run find.

It will be better to add information, where the function was searched and what namespaces exist.

Revision history for this message
Rohini Choudhary (enthurohini) wrote :

Please specify where does this application class is defined?

Revision history for this message
Ekaterina Chernova (efedorova) wrote :

It's just an example. I've updated the description

description: updated
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

To reproduce whole class definition may consist of:

Namespaces:
  =: io.murano.apps.apache

Methods:
  initialize:
    Body:
      - $._environment: $.find(std:Environment).require()

summary: - [engine] Poor error reporting
+ [engine] Poor error reporting while resolving namespace
Changed in murano:
assignee: nobody → Rohini Choudhary (enthurohini)
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

We can make the message like this:
"Unable to find function 'find' in any of loaded namespaces (list of namespaces here)"

Since we can't know which namespaces actually can exist — there is no way we can instruct someone to add 'std' or other namespace.

description: updated
Revision history for this message
Stan Lagun (slagun) wrote :

what we can do is to catch attempts to use prefixes that were not defined and report it correctly. That is low-hanging-fruit

tags: added: kilo-backport-potential liberty-backport-potential low-hanging-fruit
Stan Lagun (slagun)
Changed in murano:
status: Confirmed → Invalid
Revision history for this message
Rohini Choudhary (enthurohini) wrote :

I have tried to reproduce the bug and deploymnet get failed with error `[exceptions.KeyError]: 'Unknown namespace prefix <unknown prefix>'`. In addition, list of available namespaces can be provided only. Although current error is also sufficient to debog the problem.

Changed in murano:
assignee: Rohini Choudhary (enthurohini) → nobody
Changed in murano:
milestone: 2015.1.1 → mitaka-2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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