Bug 212068 - Download progress bar stuck while downloading external NBM content
Download progress bar stuck while downloading external NBM content
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Autoupdate
7.2
PC Linux
: P3 (vote)
: 7.2
Assigned To: Jan Lahoda
au-issues
: API, API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-04 09:27 UTC by Jan Lahoda
Modified: 2012-05-16 11:28 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Proposed patch. (12.08 KB, patch)
2012-05-04 09:33 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2012-05-04 09:27:29 UTC
Consider an NBM with the external content ("<foo>.external"). When the update center is downloading this NBM, the progress bar is stuck until the external file is downloaded (on 99%/100% in some cases). Given the external content is typically bigger than the NBM itself, this may take considerable amount of time and the stuck progress bar may (and is) causing confusion. I propose to:
-optionally augment the .external files with the size of the file-to-be-downloaded
-make sure the downloadsize attribute in the AUC catalog is the sum of the actual NBM size and the declared sizes of all the external content in the NBM
-fix the download progress Plugins dialog to also show the progress in downloading the external content

I will attach a patch that tries to do that.
Comment 1 Jan Lahoda 2012-05-04 09:33:53 UTC
Created attachment 119073 [details]
Proposed patch.
Comment 2 Jan Lahoda 2012-05-04 09:34:41 UTC
Please review, thanks.
Comment 3 Jiri Rechtacek 2012-05-04 09:51:26 UTC
The patch looks good.
JR01: Increase Specification-Version to 1.32 (1.31 already in core-main repo)
JR02: Will be value of  element SIZE generated during build clusters?
Comment 4 Jan Lahoda 2012-05-04 10:36:32 UTC
JR01: sure
JR02: the "downloadsize" attribute in the module element in the AUC catalog is computed automatically, but the SIZE entry in the .external file needs to be filled manually by the developer, similarly to the CRC entry (I at least do not know about any automated way to generate the CRC entry into the .external file). We could create a tool that would generate these entries from a given jar, maybe even generate the m2 URL, but I don't see big need to that right now.
Comment 5 Jesse Glick 2012-05-04 13:37:10 UTC
(In reply to comment #4)
> We could create a tool that would generate these entries from a given
> jar, maybe even generate the m2 URL

In fact when you build an NBM wrapping Central JARs using the dev version of nbm-maven-plugin, creation of *.external incl. CRC and 'http' and 'm2' URLs is done automatically. I have no plans to copy such a feature into apisupport.harness, since it would be far harder to implement URL calculation in an Ant task for logistical reasons.

The Ant-based <makenbm> _could_ easily update a source *.external (containing just URLs) with CRC and SIZE provided that the input cluster also contained the raw JAR, which it typically would (since otherwise you could not run the module in place).

I will also update nbm-maven-plugin to add SIZE when generating *.external, and to quietly ignore it when unpacking an NBM (normally it warns about unrecognized lines).
Comment 6 Jan Lahoda 2012-05-14 11:25:08 UTC
Integrated:
http://hg.netbeans.org/jet-main/rev/61da60b8fb9d
Comment 7 Quality Engineering 2012-05-15 10:12:25 UTC
Integrated into 'main-golden', will be available in build *201205150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/61da60b8fb9d
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #212068: include the size(s) of external NBM content in the NBM download size, and show progress while downloading the external content
Comment 8 Quality Engineering 2012-05-16 11:28:03 UTC
Integrated into 'main-golden', will be available in build *201205160400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b077bef4a840
User: Jesse Glick <jglick@netbeans.org>
Log: #212068 fix broke NbmExternalTest.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo