Menu

#5211 Custom Command doesn't show output during command runtime anymore

1.890
closed-fixed
Ilia
None
5
2018-11-20
2018-11-07
EnSER
No

I'm heavily using the "Custom Commands" module and did an update from 1.840(I think) to 1.890. When I now run a command/script that takes longer, Webmin doesn't show any output during the script runtime. Output is shown only after the command has finished.
Is this by design or a bug? If by design, can the old behavior been brought back, maybe by a setting? I'm running commands that take several minutes with useful output during runtime, so I really want to see what is happening.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2018-11-09

    Looking at the history of this code, it doesn't look like the progress of commands was ever output, sorry. Instead the full output is only shown at the end.

     
  • EnSER

    EnSER - 2018-11-10

    I've set up a fresh ubuntu vm and can confirm the change in output behavior between 1.860 and 1.870. Until 1.860, the custom command output is updated during command runtime. Beginning with 1.870, there is only the red activity bar on top of the browser window and output is shown only after the command has finished. This is easily reproducible.

     

    Last edit: EnSER 2018-11-10
  • EnSER

    EnSER - 2018-11-15

    Could you please look into this a second time? Maybe there is a misunderstanding. I have recorded my browser with 1.860 and 1.870. The first minute with 1.860 shows the old custom command output style, which is really important to me.

     
  • Jamie Cameron

    Jamie Cameron - 2018-11-17
    • assigned_to: Ilia Rostovtsev
     
  • Jamie Cameron

    Jamie Cameron - 2018-11-17

    I see the issue now .. this is actually theme-dependent.

    I will ask the new theme developer to take a look.

     
  • Ilia

    Ilia - 2018-11-17

    I can also confirm that the latest theme version 19.21 supports proggress on Custom Command module for run.cgi and for sql.cgi files.

    Example of how it works in video-screencast.

     
  • Ilia

    Ilia - 2018-11-17

    The reason why you might not see the output at once, is that there is no output produced by your script.

    Once there is an output, it's starting to show it immediately.

     
  • Ilia

    Ilia - 2018-11-17

    Peter, what is the command example that doesn't retur output?

     
  • EnSER

    EnSER - 2018-11-17

    The example is this one liner:
    sleep 10 && echo "10s" && sleep 10 && echo "20s" && sleep 10 && echo "30s"

    I tried out different themes after Jamie mentioned it and I can confirm that this issue only occures with the "Authentic Theme", the other two default themes work fine. Never thought about changing themes...

     
  • Ilia

    Ilia - 2018-11-18

    sleep 10 && echo "10s" && sleep 10 && echo "20s" && sleep 10 && echo "30s"

    The command above executes/outputs exactly as expected:

    10s 20s 30s

    The issue still happening on the immediate, very-very first output, that is always send second. It's displayed but with a delay, untill second line in the output is sent.

    So, if you have first line contain something and then wait for 2 minutes, you will not see the first line containing something, untill the second line something 2 is sent to the browser.

    This is unrealistic example, and very minor "issue". The initial point was to show the container fully, when it's sent, intead of showing empty page. I could probably do more checks in that part of the code. To make it even more precise; besdies, it's not always sent by the server.

     

    Last edit: Ilia 2018-11-18
  • Jamie Cameron

    Jamie Cameron - 2018-11-19

    What's really odd is that I just re-tested this, and on my local LAN there is no delay .. the first line appears immediately!

     
  • Ilia

    Ilia - 2018-11-19

    Yes, it works if it started with delay - example above.

    However, if it starts with immediate print then there is no output untill second line, after small delay is ready, example:

    echo "Starting..." && sleep 5 && echo "1...5s" && sleep 1 && echo "6s" && sleep 1 && echo "7s" && sleep 1 && echo "8s" && sleep 1 && echo "9s" && sleep 1 && echo "10s"

    I will check if I can fix it effectively.

     

    Last edit: Ilia 2018-11-19
  • Ilia

    Ilia - 2018-11-19

    What's really odd is that I just re-tested this, and on my local LAN there is no delay .. the first line appears immediately!

    I was testing it on Debian with Webmin 1.894, while wring the comment above and after upgrading to 1.900 it's working on the command above just fine - first line ('Starting...') appears immediately. :/

     
  • EnSER

    EnSER - 2018-11-19

    I did further testing and I think I got it sorted out:
    The described issue is directly reproducible with versions 1.870 - 1.881.
    Since 1.890, you have to clone the Custom Commands module to experience the issue. Just clone custom commands including the working command and run it from the clone -> no progress.

     
  • Ilia

    Ilia - 2018-11-20

    Just clone custom commands including the working command and run it from the clone

    There is no way to run it from the clone?

    There are only **Save Clone Delete ** buttons?

     
  • Ilia

    Ilia - 2018-11-20

    It works fine for me on 1.900.

     
  • EnSER

    EnSER - 2018-11-20

    I have made another recording:
    0:00 - 0:42 - Everythin fine, "Custom Commands" works as expected
    0:43 - 1:06 - I'm cloning "Custom Commands" to "CC-2"
    1:07 - 1:46 - The "CC-2" module runs without progress, it also looks different.
    1:47 - End - I run both modules again to show the differences between the original module and the clone.

    I hope this helps understanding what the issue is and what I'm doing.

     
  • Ilia

    Ilia - 2018-11-20

    Okay, it's fixed.

    It will be added to upcoming 19.22.

    Meanwhile, you could test it installing latest developemnt version of the theme from Theme Configurations.

     
  • Ilia

    Ilia - 2018-11-20
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB