Scan deploy folder for extensions to install on startup
Description
Activity
Brad Wood 21 April 2020 at 17:52
the compress extension is a Lucee required extension ... This is unrelated.
@Michael Offner You are incorrectly assuming that someone is using the full version of Lucee. In Lucee Light, the Compress extension is NOT part of Lucee. In my case, I was testing CommandBox on Lucee Light and I need a file-system based way to specify extensions for Lucee to load immediately on startup. I ended up having to hack apart the core.lco file from the Lucee jar, and add the compress extension to the manifest in the core as that was the only way to force the extension to load right away. That was significantly more work than just being able to use the deploy folder. Environment variables were out of the question in my case since I cannot control how box will be run and I cannot override arguments a user may specify. So my point above was not unrelated at all. It was exactly what this ticket was asking for.
i added the following function call at the first line of calling Lucee as a scripting engine (JSR223), to make sure/test if required extensions are existing right away.
Unless you were using Lucee Light as I was and adding the extension via the deploy folder, this was not a valid test of what I reported above. This was just testing the extensions loaded by the core.lco manifest fie, which we already know works.
deploy folder get now check in sync at the end of the startup process.
This looks very promising, thx. I will test it.
Michael Offner 21 April 2020 at 14:06
https://github.com/lucee/Lucee/commit/883014bc3cf6d34cd906e4d7f1e2c34ef0db477f
deploy folder get now check in sync at the end of the startup process.
Michael Offner 21 April 2020 at 08:36
@Brad Wood i added the following function call at the first line of calling Lucee as a scripting engine (JSR223), to make sure/test if required extensions are existing right away.
they do. please also have in mind that extensions are not installed in a separate thread.
Michael Offner 21 April 2020 at 07:52
@Zac Spitzer the deploy folder already is read a second after startup, so that change is not necessary. so the point remains, can we install BEFORE startup ends?
@Brad Wood the compress extension is a Lucee required extension and because of that installed at startup and not after startup. If you think that is not the case, please raise a different ticket. This ticket is about extension inside the deploy folder, not required extensions. This is unrelated.
Brad Wood 20 April 2020 at 20:33
@Michael Offner One second is too long. I need the extensions to be ready immediately by the time Lucee is ready to run code or my code will fail. In the case of the CommandBox bootstrap, I load Lucee via JSR-223 and immediatley run the CFML bootstrap which instantly compiles code that requires extensions such as Compress so <cfzip> can compile. Any sort of "wait" period is unacceptable Lucee is simply not fully loaded until all extensions are installed and ready to go. This needs to be part of the Lucee bootstrap and cannot happen asynchronously.
Details
Assignee
UnassignedUnassignedReporter
Brad WoodBrad WoodLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
NoneFix versions
Priority
New
Details
Details
Assignee
Reporter
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
A very common procedure now is to "install" extensions into Docker, etc by placing them in the deploy folder. My understanding however is it can take up to a minute for these lex files to get picked up when the server comes online which forces people to do hacky workarounds where they keep checking the file in a loop until it disappears. Otherwise, their application code may error if the extensions are not present yet.
Let's change Lucee to check the deploy folder on startup and install any lex files right away without delay before it begins processing requests. This will simplify a lot of builds by guaranteeing that Lucee is fully operational as soon as it comes online.