microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
796 stars 622 forks source link

[Extensibility Bug] codeunit 457 "Environment Information" - IsOnPrem #22059

Closed pri-kise closed 5 months ago

pri-kise commented 1 year ago
/// <summary>
/// Checks the deployment type is OnPremises.
/// </summary>
/// <returns>True if the deployment type is OnPremises, false otherwise.</returns>
procedure IsOnPrem(): Boolean
begin
    exit(EnvironmentInformationImpl.IsOnPrem());
end;

In our Pipelines with Sandbox Dockers the procedure IsOnPrem returns true.

I would expect that we receive false for Sandbox Dockers and true for OnPrem Dockers.

as an alternative it might be helpful to know the difference if it is real OnPrem or only a docker for testing. Internal work item: AB#538600

JesperSchulz commented 1 year ago

@freddydk, here's another issue related to Docker deployments. The assumption seems to be, that Sandbox Docker containers emulate that they're SaaS. In reality they aren't - they also don't have entitlements enabled etc. There seems to be some confusion / missing functionality we must address.

freddydk commented 5 months ago

For testing whether you are running on Saas or not you should use IsSaasInfrastructure.

JesperSchulz commented 5 months ago

In that case, I will close this issue. @pri-kise, please reopen if you disagree.