Skip to content

[Bug] Environment variable NO_PROXY is not honored when using thin client #168

Closed
@patped

Description

@patped

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The https proxy specified in the environment variable HTTPS_PROXY is used regardless of DNS specified in the environment variable NO_PROXY when using thin client. Thick (CX) client is honoring the NO_PROXY variable.

This behavior results in not being able to connect to databases on our local network.

Expected Behavior

When running thin client, the https proxy should not be used if the dns is listed in the environment variable NO_PROXY.

Steps To Reproduce

  1. Set environment variables in your shell
    Example for posix-shell
    HTTPS_PROXY="my.proxy"
    NO_PROXY="database.local"
  2. Have a oracle-database running on your local network with the DNS you specify in NO_PROXY from step 1.
  3. Configure dbt to target the oracle-database you configured in step 2.
  4. Run dbt

Relevant log output using --debug flag enabled

10:32:10  dbt was unable to connect to the specified database.
The database returned the following error:

  >Database Error
  DPY-6005: cannot connect to database (CONNECTION_ID=dbt-oracle-1.9.2-caot9iNuzx7+XxJViaAdSA==).
  DPY-2029: https_proxy requires use of the tcps protocol

Environment

- OS: Not relevant
- Python: Not relevant
- dbt: Not relevant

What Oracle database version are you using dbt with?

Not relevant

Additional Context

A workaround is to unset the HTTPS_PROXY variable when we are connecting to a local database or use thick client.

This issue have been discussed before on slack with a proposed solution, ref: https://getdbt.slack.com/archives/C01PWH4TXLY/p1683206320243519

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions