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

CT 1894 log partial parsing var changes and sort cli vars before hashing #6713

Merged
merged 4 commits into from
Jan 25, 2023

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Jan 24, 2023

resolves #6710

Description

If the order of vars passed on the command line changes, then partial parsing will be aborted. Sort the vars before hashing in order to avoid unnecessary reparsing.

Checklist

@gshank gshank requested review from a team as code owners January 24, 2023 19:23
@gshank gshank requested review from emmyoop and stu-k January 24, 2023 19:23
@cla-bot cla-bot bot added the cla:yes label Jan 24, 2023
@heysweet
Copy link
Contributor

Thank you so much for adding this logging (and the argument normalization!), it'll be super helpful!

@gshank gshank requested review from peterallenwebb and removed request for stu-k January 25, 2023 14:56
core/dbt/events/types.py Outdated Show resolved Hide resolved
Copy link
Contributor

@dbeatty10 dbeatty10 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 👍

@gshank gshank merged commit a34521e into main Jan 25, 2023
@gshank gshank deleted the ct-1894-log_partial_parsing_var_changes branch January 25, 2023 22:47
@jtcohen6
Copy link
Contributor

@gshank Is this something you'd feel comfortable backporting for inclusion in a v1.4.x patch release? The changes look quite minor:

  • new logging
  • functional change to sort & stringify vars before hashing

(cc @bossnunta)

@gshank
Copy link
Contributor Author

gshank commented Jan 26, 2023

Yes, should be pretty straightforward to backport. Will do that.

github-actions bot pushed a commit that referenced this pull request Jan 26, 2023
…ing (#6713)

* Log information about vars_hash, normalize cli_vars before hashing

* Changie

* Add to test_events.py

* Update core/dbt/events/types.py

Co-authored-by: Doug Beatty <[email protected]>
(cherry picked from commit a34521e)
gshank pushed a commit that referenced this pull request Jan 26, 2023
…t cli vars before hashing (#6758)

* CT 1894 log partial parsing var changes and sort cli vars before hashing (#6713)

* Log information about vars_hash, normalize cli_vars before hashing

* Changie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1894] Add logging to improve diagnosing of unable to partial parsing because vars have changed
5 participants