Feature #27

replace the current license list facility with a new batch agent to generate report and store as a file

Added by Mary Laser over 1 year ago. Updated about 1 month ago.

Status:New Start date:02/06/2012
Priority:Normal Due date:
Assignee:larry shi % Done:

0%

Category:Reporting agent
Target version:2.3.0
Rank:3 Tester:

Description

Hi Larry,
It looks like this needs some more clarification.

Use an agent (a license list module) for the background process.
Having an agent write to report_cache isn't a good idea. The report_cache is just that, a report cache, not a repository for scan results.

Let me recap:
1) we can't create and display a license list in real time because:
1.1) it takes too long to generate the list for more than a few thousand files. I think this is mostly due to resolving the file path names.
1.2) it takes too long to send and render more than a few thousand lines in a browser.

This means that we have to either do it batch or do small lists in real time and larger ones batch. For simplicity of the UI, I vote for doing them all batch. Hence, we need a license list module, agent, and UI.
[larry] that means we will add a new module ./src/licenselist, include agents and ui, right?

Yes.
2.2) When the user clicks on "License List", queue the job, display the job link, but leave the user on the license browser page. This may be best done with a popup.
[larry] my suggestion is: when the user click on “License List”
a) If the list is already created, just stay in the [browse] page (looks like /repo/?mod=browse&upload=4&folder=1&item=3&show=detail), the default page when you click on a package, then download the list automatically.
b) If the list is not created, queue the job, leave the user on the job page(looks like /repo/?mod=showjobs&show=job&job=1).
c) Do not popup any window. The user can check if the job is done via the mail notification or check the job status manually.

You have to tell the user that the job was queued.

3) Where should the agent store the license list?
I recommend a new repo section "licenselist". A side effect of this is that delagent needs to remove the list.
[larry] one license list file looks like /srv/fossology/repository/ licenselist/uploadtree_pk.txt

Don't use the uploadtree_pk by itself. Upload tree's can have different license lists if done with different versions of the nomos.

We will save the license list info in report_cache,
The key is the job link, looks like: /repo/?mod=showjobs&show=job&job=1
The value is the license list file, looks like: /srv/fossology/repository/ licenselist/uploadtree_pk.txt
Make sense?

No. The report_cache table is to cache reports, not save filenames. The licenselist_ars table would contain enough information to find the file in the repo.

4) How does a user know when the job is done?
4.1) The usual, scheduler email notification or user manually checks. See the email from earlier today on email notification. The license list agent needs to include a link to the results (see UI below). This link will download the results.

5) What does the license list UI do?
There are two parts to the UI, one is to process the link when someone clicks on "license list". This code should look to see if a list has already been generated and if it has, download the file to the user. We already have a common function to handle downloads. If the list hasn't been generated, it queues the license list agent.

Comments?

History

Updated by Mary Laser over 1 year ago

  • Subject changed from replace the current license list facility with a new batch agent to generate list and store as a file to replace the current license list facility with a new batch agent to generate report and store as a file
  • Description updated (diff)

In our meeting tonight, Larry asked for clarification of the enhancement description. Specifically, "2.2 When the user clicks on "License List", queue the job, display the job link, but leave the user on the license browser page." He noted that "License List" is on the Browse page not License Browser, and asks Bob to confirm.

Updated by Bob Gobeille 8 months ago

  • Target version changed from 2.1.0 to 2.2.0

Updated by Bob Gobeille 8 months ago

  • Rank set to 99

Change unranked issues to rank 99 so they show up in a ranking report at the bottom. Otherwise, they show up on top.

Updated by Mary Laser 5 months ago

  • Rank changed from 99 to 3

please reevaluate if we want to still do this. Who originally requested this and is it still needed/wanted?

Updated by larry shi 5 months ago

  • Status changed from New to Feedback
  • Assignee changed from larry shi to Bob Gobeille

remaining questions:
1) I still can not understand what will be stored into report_cache? what is the report_cache_key? what is the report_cache_value?
2) what time will begin to run licenselist agent,
promptly when you click on [license list] sub-menu?
or wait for more than a fixed time(e.g. 10s) when you click on [license list] sub-menu?
3) when you click on [license list] sub-menu, if take more than a fixed time, will begin to run licenselist agent, then popup one window to download the license list report, do not display the license list report on UI (original behavior), correct?
4) if you have to wait for a fixed time, how about use fo_nomos_license_list from command line to get the license list report?
you always have to wait for a fixed time at the 1st time, certainly if you want get the same license list report at the 2nd time, create on licenselist agent is useful.
create new licenselist module, my draft estimate is >40 points.

So besides the solution creating a new licenselist module, one simple proposal is:
when you click on [license list] sub-menu, if wait for more than a fixed time, pop up one windows notice the user that: this action will take a long time, you can run fo_nomos_license_list from command line, ok or not?
if you click ok: exist; if you click on no: keep going on.

want to talk with bob, tonight?

Updated by Bob Gobeille 5 months ago

  • Status changed from Feedback to In Progress
  • Assignee changed from Bob Gobeille to larry shi

1) Like mentioned in the original comment, do not use the report_cache, use the repo for saving the report.
2)Right now we have "License List" and "License List Download". Get rid of "License List Download" since that will be the default action. When the user clicks on "License List", download the list if it has already been created. If it has not been created, queue it up immediately and display the Show Jobs link.
3) See 2) Never display the license list report on the UI. Always download it.
4) See 2) Always queue up the license list agent.

Updated by larry shi 5 months ago

  • Status changed from In Progress to New

Updated by Bob Gobeille about 1 month ago

  • Target version changed from 2.2.0 to 2.3.0

Also available in: Atom PDF