return code should not be always 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Lint |
Triaged
|
Medium
|
Unassigned |
Bug Description
In my opinion juju-lint should return different return code if any warning or error was found,
and returning 0 should be only if no issues was found.
An example of misbehavior where I expected to see 1 or a return code other than 0.
```bash
x1:➜ juju-lint git:(1.0.6) ✗ juju-lint -c /snap/juju-
2023-05-31 11:30:49 [INFO] juju-lint version 1.0.6 starting...
* Config directory: /home/rgildein/
* Cloud type: openstack
* Manual file: tests/resources
* Rules file: /snap/juju-
* Log level: INFO
2023-05-31 11:30:49 [WARNING] Regex autodetection feature of the eq operator is deprecated. It will only check for equality in the future. Please use the search operator for regex checks.
2023-05-31 11:30:49 [INFO] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] [tests/
2023-05-31 11:30:50 [WARNING] endpoint: elasticsearch not found on filebeat
2023-05-31 11:30:50 [ERROR] [tests/
2023-05-31 11:30:50 [ERROR] [tests/
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'grafana' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'prometheus' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'prometheus' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'grafana' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'prometheus' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'graylog' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'grafana' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'grafana' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'graylog' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'landscape-server' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'nagios' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'nagios' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'prometheus' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'prometheus' is from another model
2023-05-31 11:30:50 [WARNING] Multi-model is not supported yet. Please check if 'prometheus' is from another model [0.69s]
x1:➜ juju-lint git:(1.0.6) ✗ echo $?
0 [0.01s]
```
Potentially we can use same returns codes as we are using w/ nrpe checks. So 0 - ok, 1 - any warning,
2 - any error and 3 - other?
Changed in juju-lint: | |
importance: | Undecided → Medium |
status: | New → Triaged |