AL-Go icon indicating copy to clipboard operation
AL-Go copied to clipboard

[Question]: How to add app during deployment from the appDependencyProbingPaths

Open louagej opened this issue 1 year ago • 10 comments

Question

Hi,

My CICD builds,, but fail during deployment stage:

image

During the Build stage, the app got downloaded from the appDependencyProbingPaths

Downloaded dependencies: D:\a\GTM-BC-9ARaptorDocumentManagement-W1\GTM-BC-9ARaptorDocumentManagement-W1.dependencies\GTM-BC-9AAdvMan-License-main-Apps-1.1.14.0.zip, (D:\a\GTM-BC-9ARaptorDocumentManagement-W1\GTM-BC-9ARaptorDocumentManagement-W1.dependencies\GTM-BC-9AAdvMan-License-main-TestApps-1.1.14.0.zip) Downloaded dependencies apps: D:\a\GTM-BC-9ARaptorDocumentManagement-W1\GTM-BC-9ARaptorDocumentManagement-W1.dependencies\GTM-BC-9AAdvMan-License-main-Apps-1.1.14.0.zip Downloaded dependencies test apps: (D:\a\GTM-BC-9ARaptorDocumentManagement-W1\GTM-BC-9ARaptorDocumentManagement-W1.dependencies\GTM-BC-9AAdvMan-License-main-TestApps-1.1.14.0.zip)

But during deployment, the action show this error:

Deploying to UAT failed. Status Code 422 : Unprocessable Entity Extension compilation failed error AL1024: A package with publisher '9altitudes', name '9A Advanced Manufacturing - License', and a version compatible with '1.0.0.0' could not be loaded

Is there another setting I forgot, so the apps in the appDependencyProbingPaths are deployed as well?

louagej avatar Sep 19 '24 14:09 louagej

I forgot to mention, the depended app 9altitudes_9A Advanced Manufacturing - License_24.8.14.0.app is added in the artifacts folder of the CICD pipeline

image

louagej avatar Sep 19 '24 14:09 louagej

Hey, i think we have the same issue already mentioned in #1178 .

AlexanderRichter avatar Sep 20 '24 13:09 AlexanderRichter

If you set the setting "GenerateDependencyArtifact" to true - it should create another build artifact with the dependencies used to build the app - and these should be deployed to the environment as well. See https://aka.ms/algosettings#generatedependencyartifact

freddydk avatar Sep 23 '24 10:09 freddydk

Hi,

the settings.json contains this property:

{
  ...
  "deliverToAppSource": {
    "productId": "...",
    "continuousDelivery": false,
    "mainAppFolder": "9A Raptor Document Input",
    "includeDependencies": [
      "9A Raptor Document Management/9A Productivity Suite - Raptor Document Warehouse*.app",
      "dependencies/*.app"
    ]
  },
  "generateDependencyArtifact": true
}

And the artifacts also contains the dependend apps: image

But the deployment to our UAT fails.

louagej avatar Sep 23 '24 10:09 louagej

Could I get the full log of the deploy step?

freddydk avatar Sep 23 '24 10:09 freddydk

Hi, attached the deployment log:

logs_28592431426.zip

louagej avatar Sep 23 '24 11:09 louagej

I can see that currently external dependencies are not automatically included. I thought they would be - will investigate and see what the right approach is here, but currently - you would have to install that dependency yourself.

freddydk avatar Sep 23 '24 14:09 freddydk

Hi,

I manually installed the dependency, but the problem persists in PublishToAppSource workflow. Somehow, this dependent app doesn’t get installed during the AppSource validation, even though the app is included in the downloaded artifacts:

Downloading release 2.0.7, projects GTM-BC-9ARaptorDocumentManagement-W1, type Dependencies
project 'GTM-BC-9ARaptorDocumentManagement-W1'
AssetPatterns: 'GTM-BC-9ARaptorDocumentManagement-W1-*-Dependencies-*.zip' | 'GTM-BC-9ARaptorDocumentManagement-W1-Dependencies-*.zip'
https://api.github.com/repos/9altitudes/GTM-BC-9ARaptorDocumentManagement-W1/releases/assets/194591315
'D:\a\GTM-BC-9ARaptorDocumentManagement-W1\GTM-BC-9ARaptorDocumentManagement-W1\.artifacts\GTM-BC-9ARaptorDocumentManagement-W1-main-Dependencies-2.2.60.0.zip'
Project 'GTM-BC-9ARaptorDocumentManagement-W1'
Artifacts:
- GTM-BC-9ARaptorDocumentManagement-W1-main-Apps-2.2.60.0
- GTM-BC-9ARaptorDocumentManagement-W1-main-Dependencies-2.2.60.0

The AppSource validation returns this error for every country/version:

Some dependencies could not be found for the country/region 'US' and release '24.5.0' of Business Central. Make sure that these dependencies are part of your submission or that they have already been uploaded to AppSource and that they are available for the targeted country/region and release: '9A Advanced Manufacturing - License' (e340d5b5-f7eb-44db-b802-fd3b7896e0a7) by '9altitudes' version '24.8.0.0'.

image

Attached you can find the PublishToAppSource log

logs_28592431426.zip

louagej avatar Sep 24 '24 14:09 louagej

Hi, I added 2 lines of code in the Actions/Deploy/Deploy.ps1 file that might solve this error. Can you check PR 1123 to see if I'm on the right track?

louagej avatar Sep 25 '24 10:09 louagej

I will run through the code and have a look.

freddydk avatar Sep 25 '24 13:09 freddydk

@freddydk ,

Any idea when the Install dependencies #1225 will be released?

louagej avatar Oct 22 '24 18:10 louagej