Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: console
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      When installing any plugin from the repository, the progress bar fails to update correctly.

      1. GERONIMO-3746.patch
        15 kB
        Joseph Leong
      2. GERONIMO-3746-2.patch
        14 kB
        Joseph Leong
      3. GERONIMO-3746-3.patch
        15 kB
        Joseph Leong

        Activity

        Hide
        Kevan Miller added a comment -

        Applied patch from Joe. Thanks!

        Show
        Kevan Miller added a comment - Applied patch from Joe. Thanks!
        Hide
        Joseph Leong added a comment - - edited

        Patch 3:
        *Fixes Basic-Auth Issue
        *If an Exception Is Thrown, An Indicating Message Will Appear As Well As A Back Button To Bring User Back To Plugin Home.

        Issues Remaining:
        CSRF Issue that occurs when a user tries to initiate the install process a second time around

        *Note, Applying Patch 3 will also apply the changes from Patch 2, thus making Patch 2 unnecessary to apply with this.

        Show
        Joseph Leong added a comment - - edited Patch 3: *Fixes Basic-Auth Issue *If an Exception Is Thrown, An Indicating Message Will Appear As Well As A Back Button To Bring User Back To Plugin Home. Issues Remaining: CSRF Issue that occurs when a user tries to initiate the install process a second time around *Note, Applying Patch 3 will also apply the changes from Patch 2, thus making Patch 2 unnecessary to apply with this.
        Hide
        Joseph Leong added a comment -

        Update:

        Added an indicator message on the progress page to list an exception, if one is caught and a back button to bring the user back to the plugin install home page.

        Show
        Joseph Leong added a comment - Update: Added an indicator message on the progress page to list an exception, if one is caught and a back button to bring the user back to the plugin install home page.
        Hide
        Joseph Leong added a comment -

        Update:

        Basic-Auth screen was being caused by the output buffer being flushed on the page include. Turning off flushing fixed issue.

        Show
        Joseph Leong added a comment - Update: Basic-Auth screen was being caused by the output buffer being flushed on the page include. Turning off flushing fixed issue.
        Hide
        Joseph Leong added a comment -

        Patch 2:
        *Null Pointer Exception Fixed at ContinueForm.
        *Summary Page of Results is Now Compatible with ArrayConfigs
        *Aesthetic, Buttons renamed.. to support multi-plugin
        *Done Button At End Links Back To Index Page As Opposed to the ViewPlugin Page.

        Show
        Joseph Leong added a comment - Patch 2: *Null Pointer Exception Fixed at ContinueForm. *Summary Page of Results is Now Compatible with ArrayConfigs *Aesthetic, Buttons renamed.. to support multi-plugin *Done Button At End Links Back To Index Page As Opposed to the ViewPlugin Page.
        Hide
        Joseph Leong added a comment -

        Additions in this patch: Fixed results summary, NPE, Redirect page at Done to the index screen.

        -Joe

        Show
        Joseph Leong added a comment - Additions in this patch: Fixed results summary, NPE, Redirect page at Done to the index screen. -Joe
        Hide
        Joseph Leong added a comment -

        Update:

        Wrapped up results page to display the summary correctly. Having the Done button bring you back to index page of plugin installer instead of viewplugindownload page. Tackling CRSF issue next.

        Show
        Joseph Leong added a comment - Update: Wrapped up results page to display the summary correctly. Having the Done button bring you back to index page of plugin installer instead of viewplugindownload page. Tackling CRSF issue next.
        Hide
        Joseph Leong added a comment -

        The continue form page isn't resolving the CRSF issue, will explicitly handle this with a new session pairing.

        Show
        Joseph Leong added a comment - The continue form page isn't resolving the CRSF issue, will explicitly handle this with a new session pairing.
        Hide
        Jarek Gawor added a comment -

        Btw, I just added PluginInstallerGBean.checkOnInstall(Object key, boolean remove) function to PluginInstallerGBean so you should be able to use this method to get the DownloadResults from any place without passing the DownloadResults around in the session (committed in revision 617267). Just make sure to call PluginInstallerGBean.checkOnInstall(key, true) somewhere at the end to remove the DownloadResults from the cache. In all other places use PluginInstallerGBean.checkOnInstall(key, false).

        Show
        Jarek Gawor added a comment - Btw, I just added PluginInstallerGBean.checkOnInstall(Object key, boolean remove) function to PluginInstallerGBean so you should be able to use this method to get the DownloadResults from any place without passing the DownloadResults around in the session (committed in revision 617267). Just make sure to call PluginInstallerGBean.checkOnInstall(key, true) somewhere at the end to remove the DownloadResults from the cache. In all other places use PluginInstallerGBean.checkOnInstall(key, false).
        Hide
        David Jencks added a comment -

        I applied the patch in rev 617243 with a couple of minor changes to eliminate a NPE

        I don't know if its due to the problems with DownloadResults but after the progress bar page I was taken to a "start the plugin" page which wasn't relevant because the plugin had already been started. Pushing the button took me back to the "choose plugins to install" page which also seems odd... I think I'd prefer to go back to the first "plugins" page where you choose whether to install more plugins, export plugins, or assemble a server.

        Show
        David Jencks added a comment - I applied the patch in rev 617243 with a couple of minor changes to eliminate a NPE I don't know if its due to the problems with DownloadResults but after the progress bar page I was taken to a "start the plugin" page which wasn't relevant because the plugin had already been started. Pushing the button took me back to the "choose plugins to install" page which also seems odd... I think I'd prefer to go back to the first "plugins" page where you choose whether to install more plugins, export plugins, or assemble a server.
        Hide
        Joseph Leong added a comment -

        This patch is not complete, but up for review to help pipeline the process for gathering opinions for revisions.
        The following patch will take care of the following:
        -GERONIMO-2480, 3778, 3777,3746's Gui Issue
        -Array support for configIds
        -At the end of the installation the page is now submitting to 'ContinueForm'

        Remaining Issues:
        -Passing the results variable to the DownloadStatus handler so it can generate the summary page of what has been installed.
        ->A side effect of fixing the issue listed above may take care of the CRSF issue.

        Quirks:
        Jira 3746, regarding the progress bar gui, the bar will not fill at some instances when the file being downloaded is so small that it can be captured in one network burst. This is an improvement that might be considered in future implementation - but is not function critical.

        Show
        Joseph Leong added a comment - This patch is not complete, but up for review to help pipeline the process for gathering opinions for revisions. The following patch will take care of the following: - GERONIMO-2480 , 3778, 3777,3746's Gui Issue -Array support for configIds -At the end of the installation the page is now submitting to 'ContinueForm' Remaining Issues: -Passing the results variable to the DownloadStatus handler so it can generate the summary page of what has been installed. ->A side effect of fixing the issue listed above may take care of the CRSF issue. Quirks: Jira 3746, regarding the progress bar gui, the bar will not fill at some instances when the file being downloaded is so small that it can be captured in one network burst. This is an improvement that might be considered in future implementation - but is not function critical.
        Hide
        Joseph Leong added a comment -

        Update:

        Getting close! The configIds array is now successfully passing to the DSHandler ActionAfterView. The previous issue was request.getParameterValues was returning a string to the array's memory reference... and i can't make any use of that in java. So i discovered looping through setting the the same hidden fields allows the getParameterValue to create the string[] in a usable form.

        Last piece getting the (DownloadResults) results from ProgressMonitor and patching up some small type issues with the configIdarray and bingo we'll have the results page and everything in the plugin installer will be good to go.

        -Joseph Leong

        Show
        Joseph Leong added a comment - Update: Getting close! The configIds array is now successfully passing to the DSHandler ActionAfterView. The previous issue was request.getParameterValues was returning a string to the array's memory reference... and i can't make any use of that in java. So i discovered looping through setting the the same hidden fields allows the getParameterValue to create the string[] in a usable form. Last piece getting the (DownloadResults) results from ProgressMonitor and patching up some small type issues with the configIdarray and bingo we'll have the results page and everything in the plugin installer will be good to go. -Joseph Leong
        Hide
        Joseph Leong added a comment -

        Update;

        This JIRA will now consolidate the progresses of JIRAS: GERONIMO-3778, GERONIMO-3788, GERONIMO-3781 due to the fact that these issues occur in several overlapping files.

        Thanks!
        Joseph Leong

        Show
        Joseph Leong added a comment - Update; This JIRA will now consolidate the progresses of JIRAS: GERONIMO-3778 , GERONIMO-3788 , GERONIMO-3781 due to the fact that these issues occur in several overlapping files. Thanks! Joseph Leong
        Hide
        Joseph Leong added a comment -

        In the upcoming patch:

        A check has been added to update the message / bar in the event results.isFinished() was returned true on the first poll.

        In addition, the getCurrentFilePercent is reflective of the progress of each individual file and not of the overall progress so the problem was not polling each individual progress fast enough to catch the '100%'.

        Polling speed increased slightly to catch the progress for the really small dependency files.

        Another check implemented at the end to fill the progress bar before redirecting to continue form.

        Show
        Joseph Leong added a comment - In the upcoming patch: A check has been added to update the message / bar in the event results.isFinished() was returned true on the first poll. In addition, the getCurrentFilePercent is reflective of the progress of each individual file and not of the overall progress so the problem was not polling each individual progress fast enough to catch the '100%'. Polling speed increased slightly to catch the progress for the really small dependency files. Another check implemented at the end to fill the progress bar before redirecting to continue form.
        Hide
        Jarek Gawor added a comment -

        Maybe that's what you mean by "a small aesthetic 250-500millisecond delay after the '100' values" but I think the key is to always update the bar (and maybe other info) to 100% (when the installation was successful) whether the while(!results.isFinished()) loop executes or not. Changing the loop delay will make the bar fill up nicer but it won't fix the problem especially when results.isFinished() returns true on the very first time. So I'm not sure we need to change the loop delay as long as we add code outside of the loop to update the bar accordingly.

        Show
        Jarek Gawor added a comment - Maybe that's what you mean by "a small aesthetic 250-500millisecond delay after the '100' values" but I think the key is to always update the bar (and maybe other info) to 100% (when the installation was successful) whether the while(!results.isFinished()) loop executes or not. Changing the loop delay will make the bar fill up nicer but it won't fix the problem especially when results.isFinished() returns true on the very first time. So I'm not sure we need to change the loop delay as long as we add code outside of the loop to update the bar accordingly.
        Hide
        Joseph Leong added a comment -

        Update: The progress bar isn't updating because the thread delay is set at an interval that isn't sampling the progress fast enough. Another factor occurring is that some of the plugins / dependencies we are downloading is so small that the bandwidth burst can grab it in one shot.. so there is no appearance of an incremental download. After the burst of this download, the download poller will grab a percent value of 0 (technically -1) immediately because it is querying the next file. Thus, the progress bar appearance for a lot of small files will seem as though nothing is downloading. In effect of this, i will be increasing the sampling time and implementing a small aesthetic 250-500millisecond delay after the '100' values so the user can see a full bar. Some issues that will arise because of this, if two files are queried and downloaded sequentially under 250-500ms it won't do a double lapse of a full progress bar.

        Another issue occurring is that when a plugin fails to install for whatever reason (missing file .. ) it throws an exception which doesn't lead for a proper exit, so the next time someone goes into the plugin installer it will flag the CSRF attack because of a session mismatch. I will open a new Jira for this. One last issue, after everything is downloaded and installed. Expecting to submit a patch shortly

        -Joseph Leong

        Show
        Joseph Leong added a comment - Update: The progress bar isn't updating because the thread delay is set at an interval that isn't sampling the progress fast enough. Another factor occurring is that some of the plugins / dependencies we are downloading is so small that the bandwidth burst can grab it in one shot.. so there is no appearance of an incremental download. After the burst of this download, the download poller will grab a percent value of 0 (technically -1) immediately because it is querying the next file. Thus, the progress bar appearance for a lot of small files will seem as though nothing is downloading. In effect of this, i will be increasing the sampling time and implementing a small aesthetic 250-500millisecond delay after the '100' values so the user can see a full bar. Some issues that will arise because of this, if two files are queried and downloaded sequentially under 250-500ms it won't do a double lapse of a full progress bar. Another issue occurring is that when a plugin fails to install for whatever reason (missing file .. ) it throws an exception which doesn't lead for a proper exit, so the next time someone goes into the plugin installer it will flag the CSRF attack because of a session mismatch. I will open a new Jira for this. One last issue, after everything is downloaded and installed. Expecting to submit a patch shortly -Joseph Leong
        Hide
        Joseph Leong added a comment - - edited

        Update: So it may appear that part of the UI process is interfering with properly allowing the installation of a second plugin or following plugins (from the console side). The first plugin attempt installs.. (although not properly updating the UI with the progress bar). In that process something causes request.isRequestedSessionIdValid() or request.isRequestedSessionIdFromCookie() to invalidate. The side of effect of this is [BATCH] in the DWR files stopping the installation of any plugins in that 'session' because it believes its a CSRF attack.

        Current direction i'm heading, resolving why the sessions are getting invalidated or consolidate our ajax implementations and move from DWR to DOJO. Still need to research a bit on DOJO and DWR to make sure this effort is possible.

        Thoughts?

        Thanks,
        Joseph Leong

        Show
        Joseph Leong added a comment - - edited Update: So it may appear that part of the UI process is interfering with properly allowing the installation of a second plugin or following plugins (from the console side). The first plugin attempt installs.. (although not properly updating the UI with the progress bar). In that process something causes request.isRequestedSessionIdValid() or request.isRequestedSessionIdFromCookie() to invalidate. The side of effect of this is [BATCH] in the DWR files stopping the installation of any plugins in that 'session' because it believes its a CSRF attack. Current direction i'm heading, resolving why the sessions are getting invalidated or consolidate our ajax implementations and move from DWR to DOJO. Still need to research a bit on DOJO and DWR to make sure this effort is possible. Thoughts? Thanks, Joseph Leong

          People

          • Assignee:
            Kevan Miller
            Reporter:
            Joseph Leong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development