Open rinatkhaziev opened 2 years ago
Hi,
Thanks for submitting this. I will have look and evaluate each change.
I will be working through this item by item :slightly_smiling_face:
Log verbosity
Had to tweak log levels to reduce the amount of information, so that only the errors are printed. For example, the entry is not printed when the scan result is empty.
How about that each log message has an associated log level? The levels would be: INFO
, DEBUG
and ERROR
. ERROR
would always be printed, but whether to log INFO
and DEBUG
messages would be configurable on the command line. This means that different use cases can make use of different log levels:
ERROR
when fully configured to scan repositories.
INFO
and ERROR
.vip-go-ci
in production would print INFO
and ERROR
.
INFO
, DEBUG
and ERROR
.What do you think?
ERROR would always be printed, but whether to log INFO and DEBUG messages would be configurable on the command line.
I like that, it seems to make the most sense and allows us the necessary flexibility depending on the use case.
Increase intervals
GH Issues API is throttling aggressively with "secondary rate-limits". To account for that, the VIPGOCI_HTTP_API_WAIT_TIME_SECONDS was bumped to 5.
This is resolved via #316 and https://github.com/Automattic/vip-go-compatibility-scanner/pull/44
I don't expect this ever to get merged, but maybe some of the things done can be worked in the codebase properly.
When running the scans, we have had to deal with a few issues:
To achieve better concurrency we had to reduce the number of IO operations.
I spotted that vip-go-ci copies over the file to a temporary file and then scans that - I'm not sure of the reason, but I don't think it's relevant when running locally. So I just circumvented the part.
Log verbosity
Had to tweak log levels to reduce the amount of information, so that only the errors are printed. For example, the entry is not printed when the scan result is empty.
Increase intervals
GH Issues API is throttling aggressively with "secondary rate-limits". To account for that, the
VIPGOCI_HTTP_API_WAIT_TIME_SECONDS
was bumped to 5.--error-severity vs --warning-severity
The production version uses
--severity=5
which means--error-severity=5 --warning-severity=5
. However, I discovered that having--severity=5
trumps both specific arguments.