Skip to content

Commit

Permalink
small pr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Nov 23, 2023
1 parent 2d280e1 commit d453db3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ dev: has-poetry

lint:
./check-package.sh
poetry run black ./ --diff --exclude=".*syntax_error.py|\.venv.*"
poetry run black ./ --diff --exclude=".*syntax_error.py|\.venv.*|_storage/.*"
# poetry run isort ./ --diff
poetry run mypy --config-file mypy.ini dlt tests
poetry run flake8 --max-line-length=200 dlt
poetry run flake8 --max-line-length=200 tests --exclude tests/reflection/module_cases
# $(MAKE) lint-security

format:
poetry run black ./ --exclude=".*syntax_error.py|\.venv.*"
poetry run black ./ --exclude=".*syntax_error.py|\.venv.*|_storage/.*"
# poetry run isort ./

test-and-lint-snippets:
Expand Down
4 changes: 2 additions & 2 deletions dlt/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def normalize(
self, "normalize", n_ex, normalize.get_normalize_info()
) from n_ex

@with_runtime_trace()
@with_runtime_trace(send_state=True)
@with_schemas_sync
@with_state_sync()
@with_config_section((known_sections.LOAD,))
Expand Down Expand Up @@ -486,7 +486,7 @@ def load(
except Exception as l_ex:
raise PipelineStepFailed(self, "load", l_ex, self._get_load_info(load)) from l_ex

@with_runtime_trace(send_state=True)
@with_runtime_trace()
@with_config_section(("run",))
def run(
self,
Expand Down
11 changes: 5 additions & 6 deletions dlt/pipeline/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
STATE_URL_SUFFIX = "/state"


class TSchemaSyncPayload(TypedDict):
class TPipelineSyncPayload(TypedDict):
pipeline_name: str
destination_name: str
destination_displayable_credentials: str
Expand Down Expand Up @@ -64,7 +64,7 @@ def _sync_schemas_to_platform(trace: PipelineTrace, pipeline: SupportsPipeline)
if not load_info:
return

payload = TSchemaSyncPayload(
payload = TPipelineSyncPayload(
pipeline_name=pipeline.pipeline_name,
destination_name=load_info.destination_name,
destination_displayable_credentials=load_info.destination_displayable_credentials,
Expand Down Expand Up @@ -109,11 +109,10 @@ def on_end_trace_step(
step_info: Any,
send_state: bool,
) -> None:
pass
if send_state:
# also sync schemas to dlthub
_sync_schemas_to_platform(trace, pipeline)


def on_end_trace(trace: PipelineTrace, pipeline: SupportsPipeline, send_state: bool) -> None:
_send_trace_to_platform(trace, pipeline)
if send_state:
# also sync schemas to dlthub
_sync_schemas_to_platform(trace, pipeline)

0 comments on commit d453db3

Please sign in to comment.