-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Feature] Improve logging and display of information #34
Conversation
…ure/add-plan-command
This class stores the changes identified in 2 ways: - a descriptive way, with an action/type/id - a programmatic way, on how it should be handled (func and params)
The logic becomes a bit more complex to handle the case where we setup env var overwrites in a new job that doesn't exist in Cloud yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@b-per This is a much-needed addition for improved readability. One small recommendation would be to include the original and updated values for what changed in a given object. It's a little extra overhead from a data tracking perspective, but I imagine it will prevent unexpected updates in the future if someone accidentally adds a typo into their config.
What are your thoughts?
def to_table(self) -> Table: | ||
"""Return a table representation of the changeset.""" | ||
|
||
table = Table(title="Changes detected") | ||
|
||
table.add_column("Action", style="cyan", no_wrap=True) | ||
table.add_column("Type", style="magenta") | ||
table.add_column("ID", style="green") | ||
|
||
for change in self.__root__: | ||
table.add_row( | ||
change.action.upper(), string.capwords(change.type), change.identifier | ||
) | ||
|
||
return table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautiful! Excellent use of rich
.
Thanks for the feedback! If it's ok with you, I'd like to get this one across and tackle enhancing the before/after changes as part of another issue (I created #35 for it). If you agree, could you approve this PR? |
Totally fair! Let's |
rich
to display a table summarizing the changes between the local file and dbt Cloudwarning
logging toinfo
Example of screenshot with
plan
: