Skip to content

queryCellProcess should not return an error if it can't find the process for the passed apmID #12

@phil-kahrl

Description

@phil-kahrl

Build info: "appgen": "@encapsule/holistic v0.0.46 crossroads KdclOLg3SyqYSF6u2YUbDg 8e52b7dc753f874256a631b2244721553e41a5dd 2020-09-29T18:58:04.000Z",

Using cell processor query such as:

          `holarchy: {
                CellProcessor: {
                    process: {
                        query: {
                            queryCellProcess: {
                                cellProcessNamespace: {
                                    apmID: "foo"
                               }
                          }
                   }
             }
      }`

I want to find if a process is running (the process may or may not be running).

If the process is not running, then the query should return some sort of empty result. Instead I get an error and a big orange box logged to the console with text like:

"ControllerAction request was successfully parsed and routed to plug-in filter delegate [r-JgxABoS_a-mSE2c1nvKA::Cell Process Manager: Process Query]. But, the plug-in rejected the request with error: Filter [r-JgxABoS_a-mSE2c1nvKA::Cell Process Manager: Process Query] failed while performing main operation. Filter [CxS4tmxfRdSF6C7pljlm5Q::cpmLib: Get Cell Process Descriptor] failed while performing main operation. Invalid cellProcessID specified. No active cell process with ID 'zkhowzwqMaTMU8prQEM_yA'. From the perspective of this error handler it's difficult to say precisely what this error means given the broad semantics of ControllerAction plug-in filters. Here is a list of possible problems in decreasing order of liklihood: Your request format may be invalid above the point in the request data where the message router made its delegate selection and this error is the plug-in rejecting the request entirely. Or, the selected ControllerAction plug-in filter may implement some sort of additional input value validation that constrains the permissible input beyond what's examined by the message router and ControllerAction plug-in filters. And, you've violated API constraints. Or, you have made a valid request but applied the action to the wrong type of cell (i.e. you think you're acting on a cell bound to APM X but it's really bound to a Y). Or, the cell you're attempting to act upon is not in the correct process step or otherwise prepared to accept or take action on behalf of the caller. Or, there's a bug in the ControllerAction plug-in filter itself. If you track down the source of this error and it's not on this list please report it!" ....

I would normally expect the semantics of a query to be such that not finding the thing that I query would return an empty result not an error.

Metadata

Metadata

Assignees

Labels

holarchy@encapsule/holarchy package issues.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions