Describe the bug
The KiBot DRC handler will return 0 from the binary, when there are actually errors. For ERC, I do not see this issue, as ERC will fail actually ...
kibot:
version: 1
import:
- file: 'kici_common.kibot.yaml'
preflight:
drc:
all_track_errors: true
dir: 'reports'
dont_stop: true
enabled: true
format: 'CSV,HTML,JSON,RPT'
warnings_as_errors: true
erc:
dir: 'reports'
dont_stop: true
enabled: true
format: 'CSV,HTML,JSON,RPT'
warnings_as_errors: true
To Reproduce
% cd /tmp
% docker run \
--env HOME='/tmp' \
--interactive \
--pull always \
--rm \
--tty \
--user "$(id -u):$(id -g)" \
--volume "$(pwd):/workdir" \
--workdir "/workdir" \
'ghcr.io/inti-cmnb/kicad9_auto_full:dev' \
'/bin/bash'
$ git clone https://gitlab.com/ci-includes/kici.git
$ cd kici/hello
$ git reset --hard v0.10.0
$ export CI_JOB_NAME='KiCi'
$ kibot --defs-from-env --plot-config '.kibot/kici_drc.kibot.yaml'
Expected behavior
When there are errors, we should always 'return -1' or similar so that CI/CD can catch these failed return values.
Screenshots
I have no name!@8d1bdcc025ab:/workdir/kici/hello$ kibot --defs-from-env --plot-config '.kibot/kici_drc.kibot.yaml'
Using SCH file: hello.kicad_sch
- Running the DRC
ERROR:1 DRC errors detected (kibot.pre_drc - pre_drc.py:151)
ERROR:(lib_footprint_mismatch) Footprint 'CP_Radial_D6.3mm_P2.50mm' does not match copy in library 'Capacitor_THT'.
@(125.32 mm, 57.46 mm): Footprint C1
Check: Violations (kibot.pre_drc - pre_drc.py:166)
ERROR:DRC errors: 1 (kibot.gs - gs.py:900)
Found 0 unique warning/s (1 total, 1 filtered)
Additional context
What I really want, in summary as I described a few times :p,
a) Warnings are Treated as Errors. While warnings are 'okay' in some cases, users may want to fix warnings. Since pipelines cannot tell you if it's a warning or an error, all warnings would be blindly 'green' as nothing is deemed wrong.
b) When there are errors, the return code should be non-0, so pipelines can fail on this.
c) Kibot should be able to continue running in certain cases, to produce all outputs. E.g. when doing ERC/DRC, kibot should not stop on the first error, make the user fix it, and then 'oh hey, there was another error'. Instead all errors/warnings should be printed so we can see this output. (e.g. internally a global 'return_status = 0' and whenever something generates an error return value, return_status = error and in the end exit return_status (in poor mans pseudo code) :)
Describe the bug
The KiBot DRC handler will return 0 from the binary, when there are actually errors. For ERC, I do not see this issue, as ERC will fail actually ...
To Reproduce
Expected behavior
When there are errors, we should always 'return -1' or similar so that CI/CD can catch these failed return values.
Screenshots
Additional context
What I really want, in summary as I described a few times :p,
a) Warnings are Treated as Errors. While warnings are 'okay' in some cases, users may want to fix warnings. Since pipelines cannot tell you if it's a warning or an error, all warnings would be blindly 'green' as nothing is deemed wrong.
b) When there are errors, the return code should be non-0, so pipelines can fail on this.
c) Kibot should be able to continue running in certain cases, to produce all outputs. E.g. when doing ERC/DRC, kibot should not stop on the first error, make the user fix it, and then 'oh hey, there was another error'. Instead all errors/warnings should be printed so we can see this output. (e.g. internally a global 'return_status = 0' and whenever something generates an error return value,
return_status = errorand in the endexit return_status(in poor mans pseudo code) :)