Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent error reporting between planners #35

Open
jan-dolejsi opened this issue Jun 1, 2022 · 3 comments
Open

Inconsistent error reporting between planners #35

jan-dolejsi opened this issue Jun 1, 2022 · 3 comments

Comments

@jan-dolejsi
Copy link

jan-dolejsi commented Jun 1, 2022

Here is how enhsp reports parsing errors: in the result.output.plan element:

{
  "call": "enhsp-2020 -o domain -f problem >> plan",
  "output": {
    "plan": "Domain parsed\nDistributor not found\n",
  },
  "output_type": "generic",
  "stderr": "bash: cannot set terminal process group (1): Inappropriate ioctl for device\nbash: no job control in this shell\n",
  "stdout": "",
}

Plus you may notice the stderr polluted by some unrelated internal errors.

The topk planner returns this json body:

{
  "Error": "Some error...."
}

...that is without the status or result element.

The status element should be mandatory in the returned payload.

@haz
Copy link
Contributor

haz commented Jun 1, 2022

I'd like to start a discussion on the appropriate location of such an issue (and I agree, it's an issue worth fixing). If you check the call string, the enhsp-2020 planner just spits out the plan to stdout. There is no upper-level plan parser checking in on things, so it's an issue that resides either with PaaS (this repo), planutils (where the package is included), or with enhsp directly (if it even has a repo).

What are your thoughts on the appropriate location?

@jan-dolejsi
Copy link
Author

jan-dolejsi commented Jun 2, 2022

If we are talking about plan parsing, and which component should have the responsibility...

Reading the description of the planutils repo "tools for developing, testing and validating", it belongs there.
If there is interest, I have some Python code for parsing the plans and planner output in general.

But the issue is about consistency in error reporting. The OpenAPI description should standardize that.

@haz
Copy link
Contributor

haz commented Jun 3, 2022

Ya, I think what this project (PaaS) can ensure is a stated "you must follow this spec if you want to be included in the online service" set of rules. For those packages that aren't destined for remote hosting by the official PaaS deploy, they're welcome to do whatever they'd like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants