intersystems / ipm

InterSystems ObjectScript Package Manager
MIT License
28 stars 19 forks source link

How to suppress license check during image build? #494

Open isc-tstolker opened 1 month ago

isc-tstolker commented 1 month ago

Right now loading a package using ZPM during the Docker Image build phase fails due to the license check. Is there a way to suppress this license check?

isc-tleavitt commented 1 month ago

There's currently no way to suppress it. We should add one. Calling this a "bug" rather than enhancement because of the severe impact.

@isc-tstolker what does this look like in the docker logs? Could you add a snippet?

isc-tstolker commented 1 month ago

image

isc-tstolker commented 1 month ago

In the ZPM ##class(%ZPM.PackageManager.Developer.Utils).CheckLicenseKey() we found this only happens in the so-called programmer mode, but I have not been able to find a way to move away from programmer mode.

isc-tleavitt commented 1 month ago

For context, the license check is important because things can go subtly wrong later in package installation if there's no license. I would recommend mounting a license key during the container build - see https://docs.docker.com/build/building/secrets/

isc-tleavitt commented 1 month ago

More detail on what can go wrong with no license (based on the implementation of this check in the HS package manager about 6 years ago, internal reference HSAI-587): Installation of packages is multithreaded. Without a license key activated, a developer experienced a hang during package installation as part of a build process. I believe this was because of background jobs failing to start because they caused the license limit on the system to be exceeded.