Skip to content

CI log download: Add label parameter to record discriminators like "slow" & "fast"

Katrin Leinweber requested to merge ci-job-log-labelling into main

What does this MR do and why?

Refactoring and implementation of --label= parameter to capture input that users consider relevant for log analysis.

Todo

  • De-duplicate code
    • Keeping it for now seems safer, at least until a 3rd variant helps understand a possible abstraction better.
  • Discuss, whether turning success/failure suffix into such a --label= input string as well would be useful? A limited set of options could also be predefined like: --slow, --fail, etc.
    • Let's keep success & failure as the default for now.

Screenshots, recordings or output

Before After
CI-…j-failed.log CI-slow-…j-failed.log

How to set up and validate locally

See opt :label instructions in diff.

MR acceptance checklist

  • I've tested this change on: macOS/Linux.
  • This change needs no other test and thus no review, because it's purely a Ruby code change. I'll merge it myself.
    • This does need at least 1 additional test on another machine, ideally using a different OS. I've facilitated this via: Slack thread / MR review.
Edited by Katrin Leinweber

Merge request reports