PreTeXtBook / pretext-cli

Command line interface for quickly creating, authoring, and building PreTeXt documents.
https://pretextbook.org
GNU General Public License v3.0
18 stars 19 forks source link

Unattended builds stalled waiting for sudo password #517

Closed bnmnetp closed 1 year ago

bnmnetp commented 1 year ago

I think I understand what is going on here. Periodically (but way too often IMHO) the build script stalls waiting for me to enter the root password. In each case it seems to want to install some version of Playwright.

But I'm confused because this happened several times within the 5 hours it took to rebuild the books. It seems as though if it is installed for one book it should remain installed for others. I am using the same version of PreTeXt and CLI to do all the builds, is there something in a publisher file or project file that would be requesting a specific version of playwright? Or maybe something is just overeager in requesting the installation? I haven't even tried to look at the code to see what the logic is for requesting this upgrade. I just know that for my use case it is annoying.

Not to mention that this will ideally go back into a cron job where I would never get the prompt.

Brad

bjones1 commented 1 year ago

Some guesses: the CLI runs playwright install-deps and playwright install every time it generates interactive preview assets. Perhaps this causes playwright to update its browser binaries if these get updated? If so, https://playwright.dev/docs/browsers#managing-browser-binaries looks like ways to install these locally (they call it a hermetic install). Another option: set an env variable to skip browser downloads https://playwright.dev/docs/browsers#skip-browser-downloads.

Bryan

On Fri, Aug 4, 2023 at 1:51 PM Bradley Miller @.***> wrote:

I think I understand what is going on here. Periodically (but way too often IMHO) the build script stalls waiting for me to enter the root password. In each case it seems to want to install some version of Playwright.

But I'm confused because this happened several times within the 5 hours it took to rebuild the books. It seems as though if it is installed for one book it should remain installed for others. I am using the same version of PreTeXt and CLI to do all the builds, is there something in a publisher file or project file that would be requesting a specific version of playwright? Or maybe something is just overeager in requesting the installation? I haven't even tried to look at the code to see what the logic is for requesting this upgrade. I just know that for my use case it is annoying.

Not to mention that this will ideally go back into a cron job where I would never get the prompt.

Brad

— Reply to this email directly, view it on GitHub https://secure-web.cisco.com/1Q3GzsFZ-KawFVLJeczEq27G690_DME9rekjpsdx34UBw-RaSaUrgcmXnFvY1Y4o0YHBGR1tvYyFYkYuDDyWvVfIOVgNIQQDqYo86MCeZPv9KggBBuzKMyU6X_6P5TVqXIAn2kIywRL4YKRX0myjp2rVxhg4KnedBFCWRJZlSLs-sxYu0aJ2MWlUgzUxg7YOi8P1ePUlPhESHj0NJub16U95-eBcxOKpPizG6GnkNNoPy0gdEbH3rDk5l5mkisSd-EbZWNwlExI0MsU66tVNH9j0HOmEmwMh8I8ZiHhIBu3lAnKsGMsPgi2kj1uFmUzhm/https%3A%2F%2Fgithub.com%2FPreTeXtBook%2Fpretext-cli%2Fissues%2F517, or unsubscribe https://secure-web.cisco.com/1PO2JtxMnglKFK57dFOKADLjO48zwICxOpcv_lr_NTo5p_oxbv3mR5NL-yyddY0Pui8h_3lkKHtZjaz697D1wOJVYkyCCdAb7esgqIC_gSOTt9dDdXwhcVWxrnwgBVwoEWVYPxc0O6FPOwvc9cwEnvszXjXhVDDJRGDO_C3Himo2Q31JIlNCWu9QtyLgEbCnV-f-T7yWNqJ0jChXPx-YKWWDJdGECGooAoCDlYpzeVqvwCbCVaiF6jmvgVKn51sl4XBHpGhqQ5RDJ7BcbWYfECDy5LPbrRM_gm_V2jUy2saKgAOG2Ro33a23EPk_Qa_7y/https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQG6EHKN3RH7CNZHTF3YTDXTU76HANCNFSM6AAAAAA3ESHG7M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi State, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

oscarlevin commented 1 year ago

I have modified our playwright install helper to be slightly less helpful but more consistent, so that it will never ask you for the password. Once tests finish on #518 , I'll release a patch.

bnmnetp commented 1 year ago

Thank you @oscarlevin !