Bug 1757892 - plugin 'compress_logs' doesn't work in case of build failure
Summary: plugin 'compress_logs' doesn't work in case of build failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-02 16:13 UTC by Dave Love
Modified: 2019-11-19 07:51 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-19 07:51:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dave Love 2019-10-02 16:13:11 UTC
Failed builds have .log and .log.gz versions of the log files. The mail from failed builds refers to the .gz versions, but you want build.log to see the failure. I think it's general, but a recent example is https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/01044291-proot/

Comment 1 Pavel Raiskup 2019-10-03 19:23:03 UTC
Can you post the mail contents here?  Each finished (not only failed) build contains
stub '*.log' and the full log '*.log.gz'.  So you really want the '*.log.gz' link.

Comment 2 Dave Love 2019-10-04 10:14:44 UTC
If you look at the logs from the failed build I referenced, you'll see that the information about why it failed is in build.log, not build.log.gz.  I think that's what's wrong.

Comment 3 Pavel Raiskup 2019-10-04 11:03:20 UTC
We don't send emails, that's why I was asking you to provide mail contents.

To judge who should I contact about the issue I needed to see the contents of the
email (perhaps).  But I was rather curious, I don't think we should do anything
about this because new copr code should already redirect you from
builder-live.log to builder-live.log.gz:

https://pagure.io/copr/copr/issue/921

Comment 4 Pavel Raiskup 2019-10-04 11:05:05 UTC
Ah, you mean build.log, not builder-live.log.  Sorry.  Nevermind, we don't
send those emails.  Please flip this bug against correct component, or provide
the needed info.

Comment 5 Dave Love 2019-10-04 14:00:36 UTC
I don't see any such redirect, and I don't see why this was closed.

The notification mail is below, but you're telling me it's correct, and I should look at build.log.gz.
But if you look at the example, the compilation messages are actually in build.log for failed builds.
Successful builds do have the messages in build.log.gz.  If I'm supposed to look at different logs depending on whether or not the build failed, I think that should be changed to avoid confusing users and potentially allow automation.

----------

From: <notifications>
Subject: loveshack's livhpc copr build of proot-5.1.0-6.git803e54d.el7 for
 epel-7-aarch64 finished with 'failed'
To: <loveshack>
Date: Tue, 1 Oct 2019 08:31:54 +0000 (3 days, 5 hours, 23 minutes ago)

Notification time stamped 2019-10-01 08:31:52 UTC

Package:  proot-5.1.0-6.git803e54d.el7
COPR:     loveshack/livhpc
Built by: loveshack
Status:   failed
ID:       01042960

Logs:
  Build:     https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/01042960-proot/build.log.gz
  Root:      https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/01042960-proot/root.log.gz
  Copr:      https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/build-01042960.log
  Mockchain: https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/01042960-proot/mockchain.log.gz
Results:     https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/01042960-proot/
Repodata:    https://copr-be.cloud.fedoraproject.org/results/loveshack/livhpc/epel-7-aarch64/repodata/

	https://copr.fedoraproject.org/coprs/loveshack/livhpc/build/1042960/

Comment 6 Pavel Raiskup 2019-10-04 15:09:26 UTC
So we need to fix fedora notification emails somewhere, so they only provide the link to `builder-live.log.gz`, nothing else.

But I'm not sure who to contact about this ATM.

Comment 7 Pavel Raiskup 2019-10-13 07:34:01 UTC
Ok, got it.  This is caused by broken mock, but fixed in git master:
https://github.com/rpm-software-management/mock/pull/368/files

The reason seem to be that in case of failure (exception), the postbuild
hooks has no chance to be executed.

Once there's a new mock release, even failed builds will have compressed
logs.

Comment 8 Sergio Basto 2019-11-19 02:51:20 UTC
Is fixed on copr , I think it is fixed with Mock Version: 1.4.21

Comment 9 Miroslav Suchý 2019-11-19 07:51:33 UTC
Yes, right. I forgot to link it to bodhi update,


Note You need to log in before you can comment on or make changes to this bug.