rust-lang / rust-log-analyzer

Analyzing Travis and Azure Pipelines logs to find encountered errors
MIT License
40 stars 27 forks source link

Avoid learning the same job multiple times #53

Closed pietroalbini closed 3 years ago

pietroalbini commented 3 years ago

The current learning implementation was designed with Travis CI in mind, where a single check was sent when the job ended. Because of that, when a successful build was detected all the successful job outputs were learned. This assumption doesn't hold anymore for GitHub Actions though.

GHA sends a check for every job in the matrix, and that causes RLA to learn a successful job every time one of the following jobs in the same build finishes, learning it multiple times. For example, if a build contains 60 jobs, the first job to finish will be learned 60 times.

This fixes the problem by remembering which job IDs we learned before, and skipping the learning process if the ID was previously seen. Along with that the code to remember IDs was refactored.

r? @Mark-Simulacrum

pietroalbini commented 3 years ago

Addressed all the feedback.