Bug 1991 - Define the flow after user finish a build, still able to retrieve the build log
Summary: Define the flow after user finish a build, still able to retrieve the build log
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.3 M3
Assignee: anliming
QA Contact:
URL:
Whiteboard: (P1)(QA Test Plan Ready)(development)...
: 2252 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-16 11:30 UTC by Jessica
Modified: 2012-08-18 13:58 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
Image details screen with button for logs (201.62 KB, image/png)
2012-03-29 16:45 UTC, Giulia
no flags Details
Packages screen with View log action (125.47 KB, image/jpeg)
2012-04-06 08:09 UTC, Belen Barros Pena
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jessica 2012-02-16 11:30:25 UTC
I've noticed this with the existing impl and from the new HOBv2 movie that we're missing a capability that after a build, user still able to retrieve the build log/build info.  At ELC Bill Mills pointed out this as well.
Comment 1 Belen Barros Pena 2012-03-19 10:36:25 UTC
Assigning this to Giulia, since it seems to need some design work.

Cheers

Belen
Comment 2 Giulia 2012-03-29 16:45:00 UTC
Created attachment 417 [details]
Image details screen with button for logs
Comment 3 Giulia 2012-03-29 16:46:59 UTC
The button 'View logs' will open a text file in a new window
Comment 4 Shane Wang 2012-04-04 12:12:21 UTC
Patch has been submitted, Belen has the comments below:

Sorry: this was an omission on the design side. If deemed appropriate, we
can incorporate an option to retrieve the packages build log in the
Packages screen. I'll leave it to Jessica, who reported 1991, to decide if
this is something we should provide.

Cheers

Belen


Jessica, and Giulia, can both of you follow up?
Comment 5 Belen Barros Pena 2012-04-06 08:09:36 UTC
Created attachment 451 [details]
Packages screen with View log action

There are 3 use cases, covered by the existence of a 'View log' action in the Packages screen and the Image details screen:

1. User build an image which includes build packages. In this case the log will show the build info for both packages and image

'View log' in the Image details screen will provide access to this log file 

2. User just build packages. In this case the log will show build package info only.

'View log' in the Packages screen will provide access to this log file

3. User has previous build packages then do image customization and build the image. Then the log will contain build image info.

'View log' in the Image details screen will provide access to this log file
Comment 6 Saul Wold 2012-04-06 16:46:33 UTC
*** Bug 2252 has been marked as a duplicate of this bug. ***
Comment 7 Shane Wang 2012-04-16 05:26:12 UTC
I was told Jessica wants to retrieve the build details screen from the packages screen or the image details screen instead of the log files. Jessica, can you confirm?
Comment 8 Jessica 2012-04-16 05:41:18 UTC
THe original requirement was from TI.  But I think we should be able to retrive the logs firstly, also should be able to save them to files for easier retrieve/acess after running hob.
Comment 9 Shane Wang 2012-04-16 05:44:14 UTC
retrieve the log first, or retrieve the build details screen which has the log first?

If the log file can be retrieved, no need to save them to a file;-) Am I right?
Comment 10 Jessica 2012-04-16 05:50:42 UTC
Well, then that's the design details.  You can either save the log to a file and open the log file for viewing. or you can show the build details and provide a mechanism to save the info to a file.  Are we talking the build detail screen info and log file content are the same?
Comment 11 Shane Wang 2012-04-16 05:55:06 UTC
No.

We are talking after I click the buttons designed by Belen and Giulia, what will happen next.

1. You can either save the log to a file and open the log file for viewing.
If that is the case, a notepad will be open to view the log files.


2. or you can show the build details and provide a mechanism to save the info to a file. 
If that is the case, the Hob will go to the build details screen.

I prefer 2. to be implemented first.
Comment 12 Shane Wang 2012-04-16 06:01:41 UTC
By the way, obviously the log shown in the build details screen and the content of the log file are the same.
Comment 13 Jessica 2012-04-16 06:12:05 UTC
Yeah, I understand we're talking about the flow.  Probably my last question should be worded that the detail info screen and the log file content are the same, or they are not?

If the info are the same, then either way provides what TI wants.  IIRC, Shane mentioned that flow 2 is easier from impl point of view.  Belen, any reason from design point of view that you propose view log file approach?
Comment 14 Shane Wang 2012-04-16 07:53:43 UTC
One more issue comes to me when I implement option 2.

If I go to the build details screen, how can I get back to the previous screen e.g., the package screen or the image detail screen?

From impl point of view, each should be OK, not hard regarding the complex logic "go forward" and "go back":-). For option 1, probably writting log to the file will affact the performance and make Hob a bit slower.
Comment 15 Shane Wang 2012-04-16 07:54:38 UTC
(In reply to comment #14)
> One more issue comes to me when I implement option 2.
> If I go to the build details screen, how can I get back to the previous screen
> e.g., the package screen or the image detail screen?
> From impl point of view, each should be OK, both are the same regarding the complex
> logic "go forward" and "go back":-). For option 1, probably writting log to the
> file will affact the performance and make Hob a bit slower.
Comment 16 Belen Barros Pena 2012-04-16 17:30:21 UTC
The 'build' screens were conceived as temporary stages: you are only at the 'build' screens while the build takes place. They were never conceived as a location you can return to, that's why there is no way to navigate from them. 

That's also why I would rather go with option 1: when we designed this feature, we assumed a log file would be generated and saved somewhere, and we just needed to provide a way to open that file. That's what the 'view log' buttons are: when you click on them, the log file opens in a text editor.

Talking to Paul E, he tells me the build process produces a separate log file for each task that is executed, so it looks like our assumption was not fully accurate. Shane also mentions that the log file must be generated and that can slow down Hob performance. Is there any way we could generate the log file only when requested (i.e. when users click the 'view log' button)?

Belen

(In reply to comment #14)
> One more issue comes to me when I implement option 2.
> 
> If I go to the build details screen, how can I get back to the previous screen
> e.g., the package screen or the image detail screen?
> 
> From impl point of view, each should be OK, not hard regarding the complex
> logic "go forward" and "go back":-). For option 1, probably writting log to the
> file will affact the performance and make Hob a bit slower.
Comment 17 Belen Barros Pena 2012-05-04 11:18:18 UTC
This bug was assigned to Giulia, who is no longer contributing. I've reassigned to myself.

Belen
Comment 18 Shane Wang 2012-06-13 00:47:56 UTC
I have an old version of commit which is based on the old version of poky master for Valentin (or someone else who owns Hob in ROM after transition) to refer to.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=shane/hob-fixes-1&id=1b154fde4b6b403c8cea5b473baa029f9f264281
Comment 19 Belen Barros Pena 2012-06-19 08:56:58 UTC
Hi Shane,

I still think the 'View log' buttons should open a text file. Going back to the build screen makes no sense, because they are just temporary screens that provide feedback while the build is in progress. Would you be ok with implementing it this way?

Belen

(In reply to comment #18)
> I have an old version of commit which is based on the old version of poky
> master for Valentin (or someone else who owns Hob in ROM after transition)
> to refer to.
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=shane/hob-
> fixes-1&id=1b154fde4b6b403c8cea5b473baa029f9f264281
Comment 20 Shane Wang 2012-06-19 14:42:01 UTC
Can't finish the implementation in M1. Let's postpone it to M2.
Comment 21 Belen Barros Pena 2012-06-19 15:07:24 UTC
Just adding some additional conversations that happened over email. 

From: Barros Pena, Belen 

Hi Shane,

Creating a single log file would be the neatest solution for the user. That way they won't need to go fishing for the right log file containing the thing they want to look at.

Is it possible? Will there be a big delay between clicking the 'view log' button and seeing the text file with the log?

Sorry about the assigning stuff: didn’t send the bug back to you because we still needed to work out what would happen after hitting the button, so I wasn't sure it was appropriate.

I've copied this conversation into the bug so there is a record of it in buzgilla.

Cheers

Belen

From: <Wang>, Shane

Belen, sorry, I have further question. I knew you finished it by adding two buttons to view log.
What happens after users click “View Log”, open the log file or open the directories containing the log files (that seems impossible), regarding many log files in many directories?
 
Do all of you agree to create a uniform log file to contain all outputs?
 
--
Shane
 
From: Wang, Shane 
 
Thank you, Belen. We can start to implement. (By the way, next time please assign the bug back to me if you finished the design. So we can query it outJ)
 
For “View Log”, I invite Dongxiao into the thread. AFAIK, there would be several logs in the build directories (one log for one recipe).
 
That is, there is not a log file to store all outputs on the screen from knotty when I use the command line, am I correct, Jessica and Dongxiao?
So, we need to create the file for users to retrieve by “View Log”, right?
 
--
Shane

From: Barros Pena, Belen 
 
Hi all,
 
Just commented on the bug. The design (as to where the button should be located on the Packages and Image details screens) is already done. You can see it on the files attached to the bug:
 
https://bugzilla.yoctoproject.org/attachment.cgi?id=417
https://bugzilla.yoctoproject.org/attachment.cgi?id=451
 
We still need to work out what happens when you click the 'View log' buttons. I still think this button should open a text file. Opening the 'Building' screen doesn't make much sense (it has been conceived as a temporary screen to provide feedback while the building is in progress). We would need to design and code a special state of the 'Building' screen and it would complicate the navigation structure of Hob. 
 
Cheers
 
Belen
 
From: <Wang>, Shane <shane.wang@intel.com>

No other bug depends on that.
But we need Belen’s input to implement this feature to retrieve logs.
 
--
Shane

From: Liu, Song 
 
Hi Belen,
 
M1 is almost over in a couple of weeks. Do you think you can still complete this one in M1?
 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=1991
 
 
Shane,
 
Is there a development feature depending on this one? Or you are using this item for development tracking also?
 
 
Thanks!
Song
Comment 22 Belen Barros Pena 2012-07-10 13:43:13 UTC
Hi Shane,

Returning this bug to you. It needs more info from Dongxiao. See below my last email from June 20th with some suggestions.

Cheers

Belen

From: "<Barros Pena>", "Belen Barros Pena (Intel)" <belen.barros.pena@intel.com>
Date: Wednesday, 20 June 2012 09:40
To: "Wang, Shane" <shane.wang@intel.com>, "Xu, Dongxiao" <dongxiao.xu@intel.com>, "Liu, Song" <song.liu@intel.com>
Cc: "Zhang, Jessica" <jessica.zhang@intel.com>
Subject: Re: Schedule item 1991

Hi Dongxiao,

I totally see your point. But I guess the choices are:

1. Struggle to find the right log file
2. Struggle to find certain content in a single big log file

Option 2 seems better to me, since I don’t need to move between directories or open different files. But I can see how it could be difficult to find your way around a single big file, particularly if you don't know exactly what you are looking for and therefore you cannot search for a certain string.

Option 2 is probably not much different from bringing people back to the 'Building' screen. The Log tab there is just a big log file with the information grouped by package.

Can you think of any other options? Could we take the content of the Log tab and dump it into a text file that would be saved to a /deploy/logs/ directory? Could we open the Log tab in a separate Hob window? Just thinking wildly here. 

Belen


From: <Wang>, Shane <shane.wang@intel.com>
Date: Wednesday, 20 June 2012 05:16
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>, "Belen Barros Pena (Intel)" <belen.barros.pena@intel.com>, "Liu, Song" <song.liu@intel.com>
Cc: "Zhang, Jessica" <jessica.zhang@intel.com>
Subject: RE: Schedule item 1991

Another solution would be put all outputs (similar to knotty) to a log file, and only view it. But writing the logs will bring additional time which makes Hob slower.
 
--
Shane
From: Xu, Dongxiao 
Sent: Wednesday, June 20, 2012 8:50 AM
To: Barros Pena, Belen; Wang, Shane; Liu, Song
Cc: Zhang, Jessica
Subject: RE: Schedule item 1991
 
Hi Belen,
 
For a certain recipe, there are more than 10 log files, such as log.do_compile, log.do_install, etc. Some of the files may be more than 10k lines. And for sato image, we have more than 300 recipes. Therefore compositing all of them into a single file may cause a certain delay when opening it.
 
Besides, users may feel difficult to find a certain log in the big log file.
 
Just my two cents.
 
Thanks,
Dongxiao
 
From: Barros Pena, Belen 
Sent: Tuesday, June 19, 2012 11:06 PM
To: Wang, Shane; Liu, Song
Cc: Zhang, Jessica; Xu, Dongxiao
Subject: Re: Schedule item 1991
 
Hi Shane,
 
Creating a single log file would be the neatest solution for the user. That way the won't need to go fishing for the right log file containing the thing they want to look at.
 
Is it possible? Will there be a big delay between clicking the 'view log' button and seeing the text file with the log?
 
Sorry about the assigning stuff: didn’t send the bug back to you because we still needed to work out what would happen after hitting the button, so I wasn't sure it was appropriate.
 
I've copied this conversation into the bug so there is a record of it in buzgilla.
 
Cheers
 
Belen
 
From: <Wang>, Shane <shane.wang@intel.com>
Date: Tuesday, 19 June 2012 15:48
To: "Wang, Shane" <shane.wang@intel.com>, "Belen Barros Pena (Intel)" <belen.barros.pena@intel.com>, "Liu, Song" <song.liu@intel.com>
Cc: "Zhang, Jessica" <jessica.zhang@intel.com>, "Xu, Dongxiao" <dongxiao.xu@intel.com>
Subject: RE: Schedule item 1991
 
Belen, sorry, I have further question. I knew you finished it by adding two buttons to view log.
What happens after users click “View Log”, open the log file or open the directories containing the log files (that seems impossible), regarding many log files in many directories?
 
Do all of you agree to create a uniform log file to contain all outputs?
 
--
Shane
 
From: Wang, Shane 
Sent: Tuesday, June 19, 2012 10:41 PM
To: Barros Pena, Belen; Liu, Song
Cc: Zhang, Jessica; Xu, Dongxiao
Subject: RE: Schedule item 1991
 
Thank you, Belen. We can start to implement. (By the way, next time please assign the bug back to me if you finished the design. So we can query it outJ)
 
For “View Log”, I invite Dongxiao into the thread. AFAIK, there would be several logs in the build directories (one log for one recipe).
 
That is, there is not a log file to store all outputs on the screen from knotty when I use the command line, am I correct, Jessica and Dongxiao?
So, we need to create the file for users to retrieve by “View Log”, right?
 
--
Shane
From: Barros Pena, Belen 
Sent: Tuesday, June 19, 2012 5:03 PM
To: Wang, Shane; Liu, Song
Cc: Zhang, Jessica
Subject: Re: Schedule item 1991
 
Hi all,
 
Just commented on the bug. The design (as to where the button should be located on the Packages and Image details screens) is already done. You can see it on the files attached to the bug:
 
https://bugzilla.yoctoproject.org/attachment.cgi?id=417
https://bugzilla.yoctoproject.org/attachment.cgi?id=451
 
We still need to work out what happens when you click the 'View log' buttons. I still think this button should open a text file. Opening the 'Building' screen doesn't make much sense (it has been conceived as a temporary screen to provide feedback while the building is in progress). We would need to design and code a special state of the 'Building' screen and it would complicate the navigation structure of Hob. 
 
Cheers
 
Belen
 
From: <Wang>, Shane <shane.wang@intel.com>
Date: Tuesday, 19 June 2012 01:59
To: "Liu, Song" <song.liu@intel.com>, "Belen Barros Pena (Intel)" <belen.barros.pena@intel.com>
Cc: "Zhang, Jessica" <jessica.zhang@intel.com>
Subject: RE: Schedule item 1991
 
No other bug depends on that.
But we need Belen’s input to implement this feature to retrieve logs.
 
--
Shane
From: Liu, Song 
Sent: Tuesday, June 19, 2012 5:53 AM
To: Barros Pena, Belen; Wang, Shane
Cc: Zhang, Jessica
Subject: Schedule item 1991
 
Hi Belen,
 
M1 is almost over in a couple of weeks. Do you think you can still complete this one in M1?
 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=1991
 
 
Shane,
 
Is there a development feature depending on this one? Or you are using this item for development tracking also?
 
 
Thanks!
Song
Comment 23 Jessica 2012-07-10 17:51:57 UTC
Hi Song,

I'm assigning the bug back to you since you're more familiar with the transition plan and since this is a P1 feature for M2, you need to follow up to whoever that need to finish features for M2 according to transition plan.

Thx,
Jessica
Comment 24 Shane Wang 2012-07-11 03:38:36 UTC
Hi,

Since all of you agree we put logs into a single plain file as knotty does on the screen, and “View Log” shows the plain file, my previous patch http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=shane/hob-fixes-1&id=1b154fde4b6b403c8cea5b473baa029f9f264281 already addressed that (When I implemented that, I thought about it like that way). So I could mark it “80% done”, the only things left are:
-	Implement 2 buttons on the GUI (I will ask the GTK developer Liming to do)
-	Integrate the above patch and rebase onto the latest master (I am the owner)

My only concern is adding addition logs will cause Hob build slower, which is different from what Belen told, i.e. “View Log” will be slower.

--
Shane
Comment 25 Shane Wang 2012-07-11 03:39:40 UTC
Liming, can you implement those 2 buttons on the GUI and then give the bug back to me for me to rebase?
Comment 27 Laurentiu Serban 2012-08-18 13:58:20 UTC
Setting this to Verified after Shane's last comment.
Verified with commit id:8b8748c8f963900b83dc0fdd7757556f917fe4fd