Skip to content

Commit

Permalink
Merge pull request #2513 from southpolemonkey/dev/marian-anderson
Browse files Browse the repository at this point in the history
(#2511) Remove log messages about opening connections in set_connecti…
  • Loading branch information
beckjake authored Jun 8, 2020
2 parents 05634e6 + 2be7ee6 commit f3565f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

### Fixes
- Fixed an error in create_adapter_plugins.py script when -dependency arg not passed ([#2507](https://github.com/fishtown-analytics/dbt/issues/2507), [#2508](https://github.com/fishtown-analytics/dbt/pull/2508))
- Remove misleading "Opening a new connection" log message in set_connection_name. ([#2511](https://github.com/fishtown-analytics/dbt/issues/2511))

Contributors:
- [@raalsky](https://github.com/Raalsky) ([#2417](https://github.com/fishtown-analytics/dbt/pull/2417), [#2485](https://github.com/fishtown-analytics/dbt/pull/2485))
- [@alf-mindshift](https://github.com/alf-mindshift) ([#2431](https://github.com/fishtown-analytics/dbt/pull/2431))
- [@scarrucciu](https://github.com/scarrucciu) ([#2508](https://github.com/fishtown-analytics/dbt/pull/2508))
- [@southpolemonkey](https://github.com/southpolemonkey)([#2511](https://github.com/fishtown-analytics/dbt/issues/2511))

## dbt 0.17.0 (Release TBD)

Expand Down
4 changes: 0 additions & 4 deletions core/dbt/adapters/base/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ def set_connection_name(self, name: Optional[str] = None) -> Connection:
.format(conn.name)
)
else:
logger.debug(
'Opening a new connection, currently in state {}'
.format(conn.state)
)
conn.handle = LazyHandle(self.open)

conn.name = conn_name
Expand Down
6 changes: 6 additions & 0 deletions core/dbt/contracts/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from dbt.exceptions import InternalException
from dbt.utils import translate_aliases

from dbt.logger import GLOBAL_LOGGER as logger


Identifier = NewType('Identifier', str)
register_pattern(Identifier, r'^[A-Za-z_][A-Za-z0-9_]+$')
Expand Down Expand Up @@ -87,6 +89,10 @@ def __init__(self, opener: Callable[[Connection], Connection]):
self.opener = opener

def resolve(self, connection: Connection) -> Connection:
logger.debug(
'Opening a new connection, currently in state {}'
.format(connection.state)
)
return self.opener(connection)


Expand Down

0 comments on commit f3565f3

Please sign in to comment.