db-migrate/node-db-migrate

AssertionError [ERR_ASSERTION]: ifError got unwanted exception: getaddrinfo ENOTFOUND <remote-host-name-in-azure>

raa-dev opened this issue · 1 comments

I'm submitting a...

  • Bug report
  • Feature request
  • Question

Current behavior

I'm running an ADO pipeline to automate db migration. I tested locally and it works both for localhost db host and azure remote db host (ran locally), but whenever I ran the same through the pipeline using a Bash task I got: [ERROR] AssertionError [ERR_ASSERTION]: ifError got unwanted exception: getaddrinfo ENOTFOUND

Expected behavior

I'm expecting to see the migration up and running just as I do locally targeting the remote host.

Minimal reproduction of the problem with instructions


...
...pipeline
- task: Bash@3
     inputs:
       targetType: 'inline'
       script: |
             export PGHOST= '{{ variables.postgresql_host}}'
             .... (rest of env vars)
             npm i;
             npm run migrate:up; // -> in package.json npm migrate:up is "db-migrate up --config database/database.json -m database/migrations -e true"

What is the motivation / use case for changing the behavior?

automate db migrations whenever a migration is added/modified.

Environment


"db-migrate": "^0.11.13" 
"db-migrate-pg": "^1.3.0" 

Additional information:
- Node version: 18.18.2 (agent pool) and 16.14.2 locally
- Platform:  locally macOS, I tested the agent pool both with Windows and Ubuntu (same output)

Others: