dbt-labs / dbt-codegen

Macros that generate dbt code
https://hub.getdbt.com/dbt-labs/codegen/latest/
Apache License 2.0
480 stars 106 forks source link

Offline installation / prevent callout to dbt hub #92

Closed geoHeil closed 1 year ago

geoHeil commented 1 year ago

Due to an enterprise setting I cannot cirectly load packages from dbt hub. I have mirrored the dbt-codegen to my internal gitlab instance.

However,

- git: "git@git.dev.mycorp.com/mirrors/github/dbt-codegen.git" 
    revision: 0.9.0

fails with:

External connection exception occurred: HTTPSConnectionPool(host='hub.getdbt.com', port=443): Max retries exceeded with url: /api/v1/index.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x00000232D005CA60>, 'Connection to [hub.getdbt.com](https://hub.getdbt.com/) timed out. (connect timeout=30)'))

due to firewalling.

Other packages like dbt-utils work just fine in this way. How can dbt-codegen support such an offline installation as well? I did not find the place where the dbt installer is calling out to dbt hub.

geoHeil commented 1 year ago

I think https://github.com/dbt-labs/dbt-codegen/blob/main/packages.yml the references to the packages from DBT hub is the problem. DBT utils itself is already available but from the internal system. I would love to not have to fork/change the reference

github-actions[bot] commented 1 year ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

github-actions[bot] commented 1 year ago

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.