Azure / Synapse-workspace-deployment

MIT License
27 stars 34 forks source link

Support Node 20 per GitHub Actions #103

Open lapellaniz opened 3 months ago

lapellaniz commented 3 months ago

Node 16 is end of life in GitHub Actions. As of Spring 2024, Node 20 will be available in GitHub actions.

This tasks should support Node 20.

An error occurs with this task when using Node 20:

Run azure/synapse-workspace-deployment@V1.8.0
  with:
    TargetWorkspaceName: MASK
    ArtifactsFolder: MASK
    resourceGroup: MASK
    operation: validate
    deployManagedPrivateEndpoint: true
    DeleteArtifactsNotInTemplate: false
Bundle source : https://web.azuresynapse.net/assets/cmd-api/main.js
Downloading asset file
Asset file downloaded at : MASK/downloads/main.js
Starting export operation
Executing shell command
Command : node MASK/main.js export "MASK" MASK ExportedArtifacts
Stderr: node:internal/errors:541
      throw error;
      ^

TypeError [ERR_INVALID_ARG_TYPE]: The "this" argument must be an instance of Performance. Received an instance of Object
    at Module.now (node:internal/perf/performance:1[3](MASK#step:4:3)5:5)
    at new Window (MASK/downloads/main.js:396355:[4](MASK#step:4:4)1)
    at exports.createWindow (MASK/downloads/main.js:396210:10)
    at new JSDOM (MASK/downloads/main.js:39[5](MASK#step:4:5)879:20)
    at MASK/downloads/main.js:[6](MASK#step:4:6)57320:21
    at MASK/downloads/main.js:65[7](MASK#step:4:7)324:3
    at Object.<anonymous> (MASK/downloads/main.js:657413:12)
    at Module._compile (node:internal/modules/cjs/loader:136[9](MASK#step:4:10):14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:[10](MASK#step:4:11))
    at Module.load (node:internal/modules/cjs/loader:1206:32) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.12.2

Shell execution failed.
Action failed -> Error
lapellaniz commented 3 months ago

@lordozb I saw that you worked on Node 12->16 for this. Seems we now need 16->20.

s461843 commented 2 months ago

I occur the same node.js version problem in AzureDevOps....

2024-05-21T09:30:04.0896082Z ==============================================================================
2024-05-21T09:30:04.0896370Z Task         : Synapse workspace deployment
2024-05-21T09:30:04.0900305Z Description  : Deployment task for synapse workspace v2
2024-05-21T09:30:04.0900563Z Version      : 2.3.0
2024-05-21T09:30:04.0900713Z Author       : Microsoft Corporation
2024-05-21T09:30:04.0909022Z Help         : Displays the name of your extension v2
2024-05-21T09:30:04.0910487Z ==============================================================================
2024-05-21T09:30:04.5656412Z Bundle source :  https://web.azuresynapse.net/assets/cmd-api/main.js
2024-05-21T09:30:04.5679133Z Downloading asset file
2024-05-21T09:30:06.4719329Z Asset file downloaded at :  /datadrive/azuredevopsagent/_work/r27/a/downloads/main.js
2024-05-21T09:30:06.4737640Z Starting export operation
2024-05-21T09:30:06.4740509Z Executing shell command
2024-05-21T09:30:06.4756785Z Command :  node /datadrive/azuredevopsagent/_work/r27/a/downloads/main.js export "/datadrive/azuredevopsagent/_work/r27/a/_datateam-synapse/Synapse" datateam-synapse-stg ExportedArtifacts
2024-05-21T09:30:07.6370971Z Stderr:  node:internal/errors:540
2024-05-21T09:30:07.6371824Z       throw error;
2024-05-21T09:30:07.6372396Z       ^
2024-05-21T09:30:07.6372605Z 
2024-05-21T09:30:07.6373450Z TypeError [ERR_INVALID_ARG_TYPE]: The "this" argument must be an instance of Performance. Received an instance of Object
2024-05-21T09:30:07.6374113Z     at Module.now (node:internal/perf/performance:135:5)
2024-05-21T09:30:07.6374732Z     at new Window (/datadrive/azuredevopsagent/_work/r27/a/downloads/main.js:400687:41)
2024-05-21T09:30:07.6375824Z     at exports.createWindow (/datadrive/azuredevopsagent/_work/r27/a/downloads/main.js:400542:10)
2024-05-21T09:30:07.6376631Z     at new JSDOM (/datadrive/azuredevopsagent/_work/r27/a/downloads/main.js:400211:20)
2024-05-21T09:30:07.6377225Z     at /datadrive/azuredevopsagent/_work/r27/a/downloads/main.js:660031:21
2024-05-21T09:30:07.6377786Z     at /datadrive/azuredevopsagent/_work/r27/a/downloads/main.js:660035:3
2024-05-21T09:30:07.6379518Z     at Object.<anonymous> (/datadrive/azuredevopsagent/_work/r27/a/downloads/main.js:660124:12)
2024-05-21T09:30:07.6380245Z     at Module._compile (node:internal/modules/cjs/loader:1434:14)
2024-05-21T09:30:07.6380855Z     at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
2024-05-21T09:30:07.6381481Z     at Module.load (node:internal/modules/cjs/loader:1249:32) {
2024-05-21T09:30:07.6383107Z   code: 'ERR_INVALID_ARG_TYPE'
2024-05-21T09:30:07.6383544Z }
2024-05-21T09:30:07.6383638Z 
2024-05-21T09:30:07.6383887Z Node.js v22.2.0
2024-05-21T09:30:07.6384052Z 
2024-05-21T09:30:07.6461672Z Shell execution failed.
2024-05-21T09:30:07.6462173Z An error occurred during execution: Shell execution failed.