Azure / Synapse-workspace-deployment

MIT License
27 stars 36 forks source link

Action is rendering empty template and parameter files, when using the validate operation. #69

Closed cmendible closed 1 year ago

cmendible commented 1 year ago

Action is rendering empty templates when using the validate operation.

When using code and workflows from the following repo: https://github.com/cmendible/azure_synapse_notebook_tests

And using the validate operation:

- name: Validate
        uses: Azure/Synapse-workspace-deployment@V1.7.0
        with:
          TargetWorkspaceName: "cfmcfm"
          operation: "validate"

      - name: Upload Artifacts
        uses: actions/upload-artifact@v3
        with:
          name: synapse-artifacts
          path: ./ExportedArtifacts

The resulting template and parameter files are empty.

Seems there is an issue parsing the resource types. This is a sample output from the worflow logs:

Stdout:  WARNING === ModelService: synchronizeInternal - Failed to find model for the resource, ignoring this resource. Error: {"stack":"Error: Not able to find model for type - ipeline and subType - undefined\n    at Function.ModelFetchUtils.getModelByResourceType (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:266506:15)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166824:140)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)\n    at Object.next (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412910:14)\n    at /home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:4128[83](https://github.com/cmendible/azure_synapse_notebook_tests/actions/runs/3378540806/jobs/5608878580#step:3:84):67\n    at new Promise (<anonymous>)\n    at __awaiter (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412862:10)\n    at ModelService._createAndFetchEntities (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166787:65)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166781:44)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)","message":"Not able to find model for type - ipeline and subType - undefined"}

Stdout:  WARNING === ModelService: synchronizeInternal - Failed to find model for the resource, ignoring this resource. Error: {"stack":"Error: Not able to find model for type - inkedService and subType - undefined\n    at Function.ModelFetchUtils.getModelByResourceType (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:266506:15)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166824:140)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)\n    at Object.next (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412910:14)\n    at /home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412883:67\n    at new Promise (<anonymous>)\n    at __awaiter (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412[86](https://github.com/cmendible/azure_synapse_notebook_tests/actions/runs/3378540806/jobs/5608878580#step:3:87)2:10)\n    at ModelService._createAndFetchEntities (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166787:65)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166781:44)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)","message":"Not able to find model for type - inkedService and subType - undefined"}

Stdout:  WARNING === ModelService: synchronizeInternal - Failed to find model for the resource, ignoring this resource. Error: {"stack":"Error: Not able to find model for type - inkedService and subType - undefined\n    at Function.ModelFetchUtils.getModelByResourceType (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:266506:15)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166824:140)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)\n    at Object.next (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412910:14)\n    at /home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412883:67\n    at new Promise (<anonymous>)\n    at __awaiter (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412862:10)\n    at ModelService._createAndFetchEntities (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:1667[87](https://github.com/cmendible/azure_synapse_notebook_tests/actions/runs/3378540806/jobs/5608878580#step:3:88):65)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166781:44)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)","message":"Not able to find model for type - inkedService and subType - undefined"}

Stdout:  WARNING === ModelService: synchronizeInternal - Failed to find model for the resource, ignoring this resource. Error: {"stack":"Error: Not able to find model for type - ntegrationRuntime and subType - undefined\n    at Function.ModelFetchUtils.getModelByResourceType (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:266506:15)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166824:140)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)\n    at Object.next (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412910:14)\n    at /home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412[88](https://github.com/cmendible/azure_synapse_notebook_tests/actions/runs/3378540806/jobs/5608878580#step:3:89)3:67\n    at new Promise (<anonymous>)\n    at __awaiter (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412862:10)\n    at ModelService._createAndFetchEntities (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166787:65)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166781:44)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)","message":"Not able to find model for type - ntegrationRuntime and subType - undefined"}

Stdout:  WARNING === ModelService: synchronizeInternal - Failed to find model for the resource, ignoring this resource. Error: {"stack":"Error: Not able to find model for type - redential and subType - undefined\n    at Function.ModelFetchUtils.getModelByResourceType (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:266506:15)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166824:140)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)\n    at Object.next (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412910:14)\n    at /home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412883:67\n    at new Promise (<anonymous>)\n    at __awaiter (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412862:10)\n    at ModelService._createAndFetchEntities (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166787:65)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166781:44)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)","message":"Not able to find model for type - redential and subType - undefined"}

Stdout:  WARNING === ModelService: synchronizeInternal - Failed to find model for the resource, ignoring this resource. Error: {"stack":"Error: Not able to find model for type - otebook and subType - undefined\n    at Function.ModelFetchUtils.getModelByResourceType (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:266506:15)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166824:140)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)\n    at Object.next (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412[91](https://github.com/cmendible/azure_synapse_notebook_tests/actions/runs/3378540806/jobs/5608878580#step:3:92)0:14)\n    at /home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412883:67\n    at new Promise (<anonymous>)\n    at __awaiter (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412862:10)\n    at ModelService._createAndFetchEntities (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166787:65)\n    at ModelService.<anonymous> (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:166781:44)\n    at step (/home/runner/work/azure_synapse_notebook_tests/azure_synapse_notebook_tests/downloads/main.js:412979:17)","message":"Not able to find model for type - otebook and subType - undefined"}
lordozb commented 1 year ago

@cmendible You are missing ArtifactsFolder parameter.

cmendible commented 1 year ago

@lordozb Please reopoen since adding the ArtifactsFolder parameter does not help.

lordozb commented 1 year ago

Please confirm if you are providing correct path. For more help kindly raise a support ticket on azure portal

cmendible commented 1 year ago

Issue was that I was using the root folder of the repo for my files and folders and also the synapse data. Once I moved the synapse data to its own folder (i.e. workspace) and configured the ArtifactsFolder to use it everything started to work.

Thanks for your help!