Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the MR(s) in each log line #315

Open
sir4ur0n opened this issue Jun 21, 2021 · 1 comment
Open

Log the MR(s) in each log line #315

sir4ur0n opened this issue Jun 21, 2021 · 1 comment

Comments

@sir4ur0n
Copy link

Current Marge Bot logs do not always tell which MR Marge is working on, which can make debugging unnecessarily tedious, as one needs to read previous log lines to find an MR number or branch name, and hope the current log line is related.

Examples of logging with not enough info in itself:

2021-06-21 06:29:50,578 WARNING Suspicious CI status: None
2021-06-21 06:29:14,476 WARNING git returned 128
2021-06-21 06:29:13,783 INFO Running git -C /tmp/tmp_izdcf04/tmpcs1u03ih config user.name 'Marge Bot'

It would be great if the MR (or MRs, in case of batching? We don't use batching on my project so I don't know) - if any - that triggers a log line was (optionally? a configuration flag?) part of the log line.

I reckon not all log lines would be eligible, e.g. such logs are - I guess - meta and not directly linked to an MR:


2021-06-21 07:09:41,561 INFO Got 1 requests to merge;
2021-06-21 07:09:41,562 INFO Attempting to merge the oldest MR...

That way, one could easily search all logs related to an MR in case it fails and Marge greets us with the famous "I am broken inside" 😁

Note: Such info should probably be easily parseable to be digested into a log system, e.g. ELK or Prometheus/Grafana

What do you think about this idea?

Thank you for this tool!

@snim2
Copy link
Contributor

snim2 commented Jul 14, 2021

This is a great idea, but many of us use marge-bot with groups of projects, so we really need to prepend group/project!MR to each log line. So,

2021-06-21 06:29:14,476 WARNING git returned 128

would become:

2021-06-21 06:29:14,476 WARNING group/project/!123 git returned 128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants