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

RFE: Have a standard way to report errors #80

Closed
nmasse-itix opened this issue Dec 14, 2018 · 2 comments · Fixed by #246
Closed

RFE: Have a standard way to report errors #80

nmasse-itix opened this issue Dec 14, 2018 · 2 comments · Fixed by #246

Comments

@nmasse-itix
Copy link
Contributor

nmasse-itix commented Dec 14, 2018

The 3scale toolbox is being improved to become the recommended way to configure and deploy services in 3scale. This fits in a broader approach of Continuous Delivery that has been started by several customers / communities (I personally maintain the threescale-cicd ansible role. Those approaches are using different means to drive the 3scale admin portal, some are using the 3scale-cli other (like the threescale-cicd role) are using the 3scale REST APIs.

If we want to make the 3scale_toolbox the de facto standard for interacting with 3scale, we need it to be usable in a CI/CD approach.

At a glance, here are the features I expect from the 3scale toolbox :

A standard way to report errors

Since the 3scale toolbox will be used from scripts / pipelines / etc, any error must be reported without any ambiguity.

Proposition

The plugins have a standard way to report errors, the unix return code is set appropriately and the output can be parsed easily by a script (JSON / YAML for instance).

Examples

If the requested operation cannot be completed, the Unix return code is > 1 and if the operation has been completed successfully the Unix return code is 0.
If the requested operation cannot be completed, the output would look like :

{
  "error_code": "E_CANNOT_READ_OPENAPI",
  "error_message": "Cannot parse OpenAPI Specs: missing field bla bla bla",
  "kind": "local",
  "stacktrace": "..."
}

This feature needs to be in the toolbox's core so that every plugin can leverage this feature.

@eguzki
Copy link
Member

eguzki commented Dec 19, 2018

👍

Reasonable and acceptable

@eguzki
Copy link
Member

eguzki commented Dec 19, 2018

We implemented a global error handler #73. We defined a set of expected errors. When an expected error accurs, simple output message is generated. On the other hand, when unexpected error occurs, report with stacktrace and environment information is generated both on screen (stderr) and in a crash.log file

But did not define any output format and can be, indeed, valuable.

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

Successfully merging a pull request may close this issue.

2 participants