Skip to content

Commit

Permalink
[#3867] Turn on partial parsing by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Oct 1, 2021
1 parent b65ae1d commit d167916
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Normalize global CLI arguments/flags ([#2990](https:/dbt-labs/dbt/issues/2990), [#3839](https:/dbt-labs/dbt/pull/3839))
- Turns on the static parser by default and adds the flag `--no-static-parser` to disable it. ([#3377](https:/dbt-labs/dbt/issues/3377), [#3939](https:/dbt-labs/dbt/pull/3939))
- Generic test FQNs have changed to include the relative path, resource, and column (if applicable) where they are defined. This makes it easier to configure them from the `tests` block in `dbt_project.yml` ([#3259](https:/dbt-labs/dbt/pull/3259), [#3880](https:/dbt-labs/dbt/pull/3880)
- Turn on partial parsing by default ([#3867](https:/dbt-labs/dbt/issues/3867), [#3989](https:/dbt-labs/dbt/issues/3989))

### Fixes
- Add generic tests defined on sources to the manifest once, not twice ([#3347](https:/dbt-labs/dbt/issues/3347), [#3880](https:/dbt-labs/dbt/pull/3880))
Expand Down
3 changes: 3 additions & 0 deletions core/dbt/dataclass_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def serialize(self, value):
# Assume UTC if timezone is missing
if value.tzinfo is None:
out = out + "Z"
elif out.endswith('+00:00'):
out = out.replace('+00:00', '')
out = out + "Z"
return out

def deserialize(self, value):
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"STATIC_PARSER": True,
"WARN_ERROR": False,
"WRITE_JSON": True,
"PARTIAL_PARSE": False,
"PARTIAL_PARSE": True,
"USE_COLORS": True,
"PROFILES_DIR": DEFAULT_PROFILES_DIR,
"DEBUG": False,
Expand Down
5 changes: 5 additions & 0 deletions core/dbt/parser/manifest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass
from dataclasses import field
from datetime import datetime
import os
import traceback
from typing import (
Expand Down Expand Up @@ -557,6 +558,10 @@ def read_manifest_for_partial_parse(self) -> Optional[Manifest]:
# different version of dbt
is_partial_parseable, reparse_reason = self.is_partial_parsable(manifest)
if is_partial_parseable:
# We don't want to have stale generated_at dates
manifest.metadata.generated_at = datetime.utcnow()
# or invocation_ids
manifest.metadata.invocation_id = dbt.tracking.active_user.invocation_id
return manifest
except Exception as exc:
logger.debug(
Expand Down

0 comments on commit d167916

Please sign in to comment.