Detect corrupted build logs and report them by incrementing Prometheus counter
What does this MR do?
This merge request adds a new Prometheus counter used to measure a rate / increase of corrupted build logs detected.
A build log is considered to be corrupted when:
- A CRC32 checksum does not match to a checksum reported by a runner
AND
- A build log size in bytes differs from the size reported by a runner
Runner merge request
Migration
git@b8cc83b4b873:~/gitlab$ bin/rails db:rollback && bin/rails db:migrate
== 20201204141038 AddTraceBytesizeToCiBuildPendingStates: reverting ===========
-- remove_column(:ci_build_pending_states, :trace_bytesize, :bigint)
-> 0.0034s
== 20201204141038 AddTraceBytesizeToCiBuildPendingStates: reverted (0.0056s) ==
== 20201204141038 AddTraceBytesizeToCiBuildPendingStates: migrating ===========
-- add_column(:ci_build_pending_states, :trace_bytesize, :bigint)
-> 0.0013s
== 20201204141038 AddTraceBytesizeToCiBuildPendingStates: migrated (0.0013s) ==
Conformity
Issues
See #273444 (closed)
Edited by Grzegorz Bizon