Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove logbook #10119

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20240509-093717.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Dependencies
body: Remove logbook dependency
time: 2024-05-09T09:37:17.745129-05:00
custom:
Author: emmyoop
Issue: "8027"
2 changes: 0 additions & 2 deletions core/dbt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

### links.py

### logger.py

### main.py

### node_types.py
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/artifacts/schemas/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def inner(cls: Type[VersionedSchema]):
return inner


# This is used in the ArtifactMixin and RemoteResult classes
# This is used in the ArtifactMixin and RemoteCompileResultMixin classes
@dataclasses.dataclass
class VersionedSchema(dbtClassMixin):
dbt_schema_version: ClassVar[SchemaVersion]
Expand Down
1 change: 0 additions & 1 deletion core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def global_flags(func):
@p.deprecated_favor_state
@p.deprecated_print
@p.deprecated_state
@p.enable_legacy_logger
@p.fail_fast
@p.favor_state
@p.indirect_selection
Expand Down
6 changes: 0 additions & 6 deletions core/dbt/cli/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@
is_flag=True,
)

enable_legacy_logger = click.option(
"--enable-legacy-logger/--no-enable-legacy-logger",
envvar="DBT_ENABLE_LEGACY_LOGGER",
hidden=True,
)

exclude = click.option(
"--exclude",
envvar=None,
Expand Down
12 changes: 2 additions & 10 deletions core/dbt/contracts/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from dbt.artifacts.schemas.results import ExecutionResult, TimingInfo
from dbt.artifacts.schemas.run import RunExecutionResult, RunResult, RunResultsArtifact
from dbt.contracts.graph.nodes import ResultNode
from dbt.logger import LogMessage
from dbt_common.dataclass_schema import dbtClassMixin

TaskTags = Optional[Dict[str, Any]]
Expand All @@ -17,12 +16,7 @@


@dataclass
class RemoteResult(VersionedSchema):
logs: List[LogMessage]


@dataclass
class RemoteCompileResultMixin(RemoteResult):
class RemoteCompileResultMixin(VersionedSchema):

Check warning on line 19 in core/dbt/contracts/sql.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/contracts/sql.py#L19

Added line #L19 was not covered by tests
raw_code: str
compiled_code: str
node: ResultNode
Expand All @@ -41,7 +35,7 @@

@dataclass
@schema_version("remote-execution-result", 1)
class RemoteExecutionResult(ExecutionResult, RemoteResult):
class RemoteExecutionResult(ExecutionResult):

Check warning on line 38 in core/dbt/contracts/sql.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/contracts/sql.py#L38

Added line #L38 was not covered by tests
results: Sequence[RunResult]
args: Dict[str, Any] = field(default_factory=dict)
generated_at: datetime = field(default_factory=datetime.utcnow)
Expand All @@ -59,14 +53,12 @@
def from_local_result(
cls,
base: RunExecutionResult,
logs: List[LogMessage],
) -> "RemoteExecutionResult":
return cls(
generated_at=base.generated_at,
results=base.results,
elapsed_time=base.elapsed_time,
args=base.args,
logs=logs,
)


Expand Down
18 changes: 0 additions & 18 deletions core/dbt/flags.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
# Do not import the os package because we expose this package in jinja
from argparse import Namespace
from os import getenv as os_getenv
from pathlib import Path
from typing import Optional


# for setting up logger for legacy logger
def env_set_truthy(key: str) -> Optional[str]:
"""Return the value if it was set to a "truthy" string value or None
otherwise.
"""
value = os_getenv(key)
if not value or value.lower() in ("0", "false", "f"):
return None
return value


# for setting up logger for legacy logger
ENABLE_LEGACY_LOGGER = env_set_truthy("DBT_ENABLE_LEGACY_LOGGER")


# this roughly follows the patten of EVENT_MANAGER in dbt/common/events/functions.py
# During de-globlization, we'll need to handle both similarly
Expand Down
Loading
Loading