Failed to run resource validation using @microsoft/azure-data-factory-utilities on Github

ShaikNisharunnisa-3795 20 Reputation points
2025-10-23T13:20:01.8266667+00:00

Hi Team,

I am creating a workflow for ADF deployment on GitHub and encountering an issue when running the npm validate command. The validation fails with the following error:

ERROR === Validator: Unhandled validation error for: pipeline - ***, error: {"stack":"TypeError: Cannot read properties of undefined (reading 'parameters')\n at vt.getConceptParameters (/downloads/main.js:2:15899430)\n at vt.resolve (downloads/main.js:2:15897444)\n at jt._getResolution (downloads/main.js:2:15959027)\n at Object.resolve (downloads/main.js:2:15961112)\n at co.<anonymous> (/downloads/main.js:2:16005464)\n at Generator.next (<anonymous>)\n at r (/downloads/main.js:2:14419893)","message":"Cannot read properties of undefined (reading 'parameters')"}

Following are the commands i am using

npm install
npm run build validate `pwd` ${{ inputs.datafactory_id }} 
npm run build export `pwd` ${{ inputs.datafactory_id }} ArmTemplateOutput

However, the same commands work successfully in Jenkins, and validation from the ADF UI also passes. I am unsure why this issue occurs only on GitHub.

I have tested with multiple Node.js and @microsoft/azure-data-factory-utilities versions as follows:

On GitHub:

  • Node version: 20.x with @microsoft/azure-data-factory-utilities 1.0.0 and 1.0.3
  • Node version: 22.x with @microsoft/azure-data-factory-utilities 1.0.0 and 1.0.3

On Jenkins:

  • Node version: 22.15.1 with @microsoft/azure-data-factory-utilities 1.0.0

Could you please help me identify why the validation fails only on GitHub? Any guidance would be appreciated.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

2 answers

Sort by: Most helpful
  1. Vinodh247 39,201 Reputation points MVP Volunteer Moderator
    2025-10-23T13:45:55.7566667+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    the error Cannot read properties of undefined (reading 'parameters') suggests that the ADF pipeline JSON being validated is missing parameter resolution at runtime, likely because of path or environment context issues. Below are some of the suggestsions that you can try if not yet.

    1. In GitHub Actions, the default working directory may differ. Ensure the path for ADF artifacts (pwd) resolves correctly. Use $(pwd) instead of backticks or explicitly set working-directory in your YAML.
    2. Though both use Node 22.x, GitHub runners may have extra security restrictions or missing global modules. Pin your Node version (e.g., 22.15.1) using actions/setup-node.
    3. GitHub’s Linux runners are case sensitive, unlike Jenkins (if on windows). Check folder and file name casing in your ADF repo (especially pipeline, linkedService, and dataset JSONs).
    4. Ensure ADF_PATH or DATAFACTORY_ID inputs are correctly set and passed into the npm script.

    To debug further, add set -x or echo $(pwd) before the validate cmd to confirm paths. In most cases, aligning working directory and node version resolves this validation failure.

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.


  2. Sina Salam 25,761 Reputation points Volunteer Moderator
    2025-10-23T15:39:06.73+00:00

    Hello ShaikNisharunnisa-3795,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you have a failed to run resource validation using @microsoft/azure-data-factory-utilities on Github.

    Regarding your question on reason, it fails:

    GitHub Actions may handle JSON parsing, file paths, or permissions differently than Jenkins. If the pipeline JSON is malformed or missing expected fields, validation fails with cryptic errors. Also, the utility may not handle edge cases or missing fields gracefully, especially in newer Node.js versions and incorrect formatting (e.g., missing leading slash) in datafactory_id can cause validation to fail silently.

    However, the below steps can help resolve the issue:

    1. First make sure your pipeline JSON includes a valid parameters section:
         {
           "name": "MyPipeline",
           "properties": {
             "parameters": {
               "param1": {
                 "type": "String"
               }
             }
           }
         }
      
      https://free.blessedness.top/en-us/azure/data-factory/concepts-pipelines-activities
    2. Add Debug Logging to GitHub Workflow by print the pipeline JSON before validation:
         - name: Print pipeline JSON
           run: cat $(pwd)/path/to/pipeline.json
      
      This will confirm whether the file is correctly loaded and structured.
    3. Ensure no stale or corrupted files by clean and rebuild:
         rm -rf node_modules
         npm cache clean --force
         npm install
      
    4. At this point, use specific Node.js version as Jenkins (22.15.1):
         - name: Setup Node.js
           uses: actions/setup-node@v3
           with:
             node-version: '22.15.1'
      
      https://github.com/actions/setup-node
    5. Ensure datafactory_id starts with /subscriptions/... missing slash causes validation failure. Check some discussion on this similar topic on https://stackoverflow.com/questions/66596875/azure-data-factory-utilities-validation-fails
    6. Then run the same validation command locally with GitHub’s folder structure to replicate the issue.
    7. Be sure you're using the latest stable version of @microsoft/azure-data-factory-utilities:
         npm install @microsoft/azure-data-factory-utilities@latest
      
      https://www.npmjs.com/package/@microsoft/azure-data-factory-utilities

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.