db-migrate / node-db-migrate

Database migration framework for node
Other
2.32k stars 360 forks source link

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

Closed raa-dev closed 8 months ago

raa-dev commented 8 months ago

I'm submitting a...

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:

wzrdtales commented 8 months ago

This is not a db migrate issue this error means it couldn't resolve the hostname to an IP.

Sent from Nine

--

Best

-- Tobias Gurtzick CEO WizardTales GmbH

Additional Contacts: @github | @.***

Website: https://www.wizardtales.com @.*** nmlpm: -- coming soon & open source --

Please tag your mails with "request", "issue" or "proposal", unless none of these fit or there already exists a thread.

-- Why should one reach for what one may be capable reaching, that's awfully boring and after all one still be ones yesterday being. --

Sitz der Gesellschaft: Ratingen Kokkolastr. 5 40882 Ratingen Germany

Registergericht: Amtsgericht Düsseldorf, HRB 84140 Geschäftsführer: Tobias Gurtzick


Von: Ra @.***> Gesendet: Mittwoch, 8. November 2023 19:45 An: db-migrate/node-db-migrate Cc: Subscribed Betreff: [db-migrate/node-db-migrate] AssertionError [ERR_ASSERTION (Issue #825)

I'm submitting a... Bug report Feature request Question Current behavior Expected behavior Minimal reproduction of the problem with instructions What is the motivation / use case for changing the behavior? Environment

db-migrate version: X.Y.Z plugins with versions: X.Y.Z db-migrate driver with versions:

Additional information:

Others:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>