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: accommodate filter in src freshness #95

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

JFrackson
Copy link
Collaborator

This is a manual port of eliyarson's proposed PR on dbt-gloss.


Description

When using optional freshness argument filter the hook check_source_has_freshness.py returns the following error:

AttributeError: 'str' object has no attribute 'keys'

It happens because the hook is expecting dictionaries (warn_after and error_after), but filter is a string.
A simple fix is to pop the key if it exists before checking for required keys as I did in the PR.

Obs: I had to change github flake8 pre-commit hook from gitlab to github because I don't have a gitlab acc, feel free to change back to gitlab if you guys think it's necessary.

Testing

pytest tests/unit/test_check_source_has_freshness.py

@JFrackson JFrackson self-assigned this Feb 14, 2023
@BAntonellini BAntonellini merged commit c60edfd into main Feb 16, 2023
@JFrackson JFrackson deleted the fix/src-freshness-filter branch March 29, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants