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

Fix/0141 regression snapshot freshness #1729

Merged
merged 2 commits into from
Sep 10, 2019

Conversation

drewbanin
Copy link
Contributor

@drewbanin drewbanin commented Sep 9, 2019

fixes #1728

The full run-down:

  • 0.14.1 auto-selects ephemeral models as a performance optimization
  • the FreshnessRunner correctly handles non-source nodes, raising an exception (freshness runner: got a non-Source)
  • this exception bubbles up to the queue handler
  • dbt tries to mark nodes dependent on the ephemeral model as "skipped", if they exists
  • the freshness runner doesn't support skipping, raises 'Freshness: nodes cannot be skipped!'
  • the exception is swallowed by dbt and the process hangs

We actually do have a test for freshness tasks running alongside ephemeral models, but crucially, this hang only occurs if there is a model that _depends_on an ephemeral model in the project. I've update the test suite accordingly.

@cla-bot cla-bot bot added the cla:yes label Sep 9, 2019
@drewbanin drewbanin changed the base branch from dev/louisa-may-alcott to dev/0.14.2 September 9, 2019 23:38
@drewbanin drewbanin force-pushed the fix/0141-regression-snapshot-freshness branch from 5391566 to 689a0ea Compare September 10, 2019 15:17
Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, one very minor comment

status = dbt.utils.pluralize(result.status, 'result')
logger.info(" Got {}, expected 0.".format(status))
except ValueError:
logger.info(" Status: {}".format(result.status))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, but I would organize this like:

try:
    int(result.status)
except ValueError:
    logger.info("  Status: {}".format(result.status))
else:
    status = dbt.utils.pluralize(result.status, 'result')
    logger.info("  Got {}, expected 0.".format(status))

Otherwise uncaught ValueErrors in dbt.utils.pluralize will act as if your int failed.

@drewbanin drewbanin merged commit 491ad69 into dev/0.14.2 Sep 10, 2019
@drewbanin drewbanin deleted the fix/0141-regression-snapshot-freshness branch September 10, 2019 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants