What causes javascript error 'Response is not defined' for Synapse Analytics deployment command validate, task 'Synapse workspace deployment@2'

Jason Lee 21 Reputation points
2024-06-25T10:30:02.6133333+00:00

Hi

I would really appreciate some help with a build failure in ADO build pipeline. We haven't changed the underlying code base, and the node.js version is the same as the last successful build.

This ADO build yaml snippet installs node.js and then calls the 'Synapse workspace deployment@2' command validate.

          - task: NodeTool@0
            displayName: 'Install Node.js'
            inputs:
              versionSpec: '16.x'
              checkLatest: true  
          - task: Synapse workspace deployment@2
            displayName: Build validate
            continueOnError: true    
            inputs:
              operation: 'validate'
              ArtifactsFolder: '$(Agent.BuildDirectory)/s/MyCompany.DLH'
              TargetWorkspaceName: $(DLH.deployWorkspaceName)    

Here is an excerpt from the build log:

Stdout:   ModelService: Dynamic connector - Finished registering dynamic connectors

Stdout:   ModelService: _createAndFetchEntities synchronizeInternal - start

Stdout:   ModelService: _createAndFetchEntities synchronizeInternal - end

Stdout:   BaseFileResourceProviderService: populateAllResources - start

Stdout:   CmdApiApp: Initializing publish config service...

Stdout:   PublishConfigService: _getLatestPublishConfig - retrieving config file.

Stderr:  D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:359820
          throw ex;
          ^

ReferenceError: Response is not defined
    at Module../node_modules/@trident/data-access-artifact/src/lib/models/http.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:362608:40)
    at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
    at Module../node_modules/@trident/data-access-artifact/src/lib/models/index.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:362698:63)
    at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
    at Module../node_modules/@trident/data-access-artifact/src/lib/clients/artifact-client.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:361495:65)
    at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
    at Module../node_modules/@trident/data-access-artifact/src/lib/clients/index.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:361976:74)
    at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
    at Module../node_modules/@trident/data-access-artifact/src/index.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:361472:70)
    at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)

Shell execution failed.
An error occurred during execution: Shell execution failed.
##[error]Encountered with exception:Shell execution failed.

Any pointers gratefully received!

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,687 questions
0 comments No comments
{count} votes

Accepted answer
  1. Smaran Thoomu 12,615 Reputation points Microsoft Vendor
    2024-06-26T03:45:30.51+00:00

    Hi @Jason Lee
    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .
    Ask: I would really appreciate some help with a build failure in ADO build pipeline. We haven't changed the underlying code base, and the node.js version is the same as the last successful build.

    This ADO build yaml snippet installs node.js and then calls the 'Synapse workspace deployment@2' command validate.

    YAMLAI ConvertCopy

              - task:
    

    Here is an excerpt from the build log:

    Windows Command PromptAI ConvertCopy

    Stdout:   ModelService: Dynamic connector - Finished registering dynamic connectors
    
    Stdout:   ModelService: _createAndFetchEntities synchronizeInternal - start
    
    Stdout:   ModelService: _createAndFetchEntities synchronizeInternal - end
    
    Stdout:   BaseFileResourceProviderService: populateAllResources - start
    
    Stdout:   CmdApiApp: Initializing publish config service...
    
    Stdout:   PublishConfigService: _getLatestPublishConfig - retrieving config file.
    
    Stderr:  D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:359820
              throw ex;
              ^
    
    ReferenceError: Response is not defined
        at Module../node_modules/@trident/data-access-artifact/src/lib/models/http.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:362608:40)
        at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
        at Module../node_modules/@trident/data-access-artifact/src/lib/models/index.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:362698:63)
        at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
        at Module../node_modules/@trident/data-access-artifact/src/lib/clients/artifact-client.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:361495:65)
        at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
        at Module../node_modules/@trident/data-access-artifact/src/lib/clients/index.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:361976:74)
        at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
        at Module../node_modules/@trident/data-access-artifact/src/index.js (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:361472:70)
        at __webpack_require__ (D:\VSTSAgents\LON86345-G1-02\_work\21497\s\downloads\main.js:665765:42)
    
    Shell execution failed.
    An error occurred during execution: Shell execution failed.
    ##[error]Encountered with exception:Shell execution failed.
    
    

    Any pointers gratefully received!

    Solution: According to this github issue thread, upgrading to node v18 should fix it.

    https://github.com/Azure/Synapse-workspace-deployment/issues/105

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    I hope this helps!

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jason Lee 21 Reputation points
    2024-06-25T10:44:50.1566667+00:00

    According to this github issue thread, upgrading to node v18 should fix it.

    https://github.com/Azure/Synapse-workspace-deployment/issues/105