Database connection fine in 1.4.6 but failing in 1.5.0

Running into a funky error. I was upgrading our data infrastructure on local before moving it to AWS. We’re currently using dbt cli 1.4.6 with a Redshift backend. After upgrading to 1.5.0 and running dbt debug, I’m getting a database connection error. Quite literally nothing has changed in my profiles or dbt_project file – they work fine on 1.4.6 but fail on 1.5.0.

19:15:37  Running with dbt=1.5.0
19:15:37  dbt version: 1.5.0
19:15:37  python version: 3.9.7
19:15:37  python path: /Users/dra/opt/anaconda3/bin/python
19:15:37  os info: macOS-10.16-x86_64-i386-64bit
19:15:37  Using profiles.yml file at /Users/dra/.dbt/profiles.yml
19:15:37  Using dbt_project.yml file at /Users/dra/Code/Tandym Repos/data-dbt-projects/dbt_project.yml
19:15:37  Configuration:
19:15:38    profiles.yml file [OK found and valid]
19:15:38    dbt_project.yml file [OK found and valid]
19:15:38  Required dependencies:
19:15:38   - git [OK found]

19:15:38  Connection:
19:15:38    host: XXXX
19:15:38    port: 5439
19:15:38    user: XXXX
19:15:38    database: dev
19:15:38    schema: dbt_dev_dra
19:15:38    method: database
19:15:38    cluster_id: None
19:15:38    iam_profile: None
19:15:38    sslmode: None
19:15:38    Connection test: [ERROR]

19:15:38  1 check failed:
19:15:38  dbt was unable to connect to the specified database.
The database returned the following error:

  >list index out of range

Check your database credentials and try again. For more information, visit:
https://docs.getdbt.com/docs/configure-your-profile

Anyone else run into something similar? The error message isn’t making any sense to me. And when I run dbt debug --config-dir I get the following:

19:21:52  Running with dbt=1.5.0
19:21:52  [OpenCommand]: Unable to parse dict {'open_cmd': 'open', 'profiles_dir': PosixPath('/Users/dra/.dbt')}
19:21:52  To view your profiles.yml file, run:

Just for fun … here is the output for 1.4.6.

19:15:09  Running with dbt=1.4.6
dbt version: 1.4.6
python version: 3.9.7
python path: /Users/dra/opt/anaconda3/bin/python
os info: macOS-10.16-x86_64-i386-64bit
Using profiles.yml file at /Users/dra/.dbt/profiles.yml
Using dbt_project.yml file at /Users/dra/Code/Tandym Repos/data-dbt-projects/dbt_project.yml

Configuration:
  profiles.yml file [OK found and valid]
  dbt_project.yml file [OK found and valid]

Required dependencies:
 - git [OK found]

Connection:
  host: XXXX
  port: 5439
  user: XXXX
  database: dev
  schema: dbt_dev_dra
  search_path: None
  keepalives_idle: 4
  sslmode: None
  method: database
  cluster_id: None
  iam_profile: None
  iam_duration_seconds: 900
  Connection test: [OK connection ok]

All checks passed!

Upon further research, appears related to this issue. Amazing that this kind of stuff makes it to a release :upside_down_face:.

1 Like

For anyone else coming across this in the future, this has been resolved by Fix for #419: dbt-redshift 1.5 does not work with non-standard redshift hostnames by nssalian · Pull Request #420 · dbt-labs/dbt-redshift · GitHub.

As to why it got out into a public release, our Product Manager for adapters apologised for the issues in this discussion thread, along with a bit of backstory on how it happened.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.