-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Even more scrubbing #5152
Even more scrubbing #5152
Conversation
@ChenyuLInx Thanks for picking this up! I'll leave to other reviews for final approval. After merging, we need to backport to both |
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.
Just a comment but otherwise looks good.
core/dbt/exceptions.py
Outdated
self.args = (cwd, cmd, returncode, stdout, stderr, message) | ||
self.stdout = scrub_secrets(stdout.decode("utf-8"), env_secrets()) | ||
self.stderr = scrub_secrets(stderr.decode("utf-8"), env_secrets()) | ||
self.args = (cwd, self.cmd, returncode, stdout, stderr, message) |
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.
Do we not need to use the scrubbed stdout/stderr here?
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.
Good catch! I wonder what we are using the self.args
for
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.
Look good.
* Even more scrubbing * Changelog entry * Even more * remove reduendent scrub * remove reduendent scrub * fix encoding issue * keep scrubbed log in args Co-authored-by: Chenyu Li <[email protected]> (cherry picked from commit ce0bcc0)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.0.latest 1.0.latest
# Navigate to the new working tree
cd .worktrees/backport-1.0.latest
# Create a new branch
git switch --create backport-5152-to-1.0.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ce0bcc08a6b4933ff8ae7558f6c8f7722ff03dbe
# Push it to GitHub
git push --set-upstream origin backport-5152-to-1.0.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.0.latest Then, create a pull request where the |
* Even more scrubbing * Changelog entry * Even more * remove reduendent scrub * remove reduendent scrub * fix encoding issue * keep scrubbed log in args Co-authored-by: Chenyu Li <[email protected]> (cherry picked from commit ce0bcc0)
* Even more scrubbing * Changelog entry * Even more * remove reduendent scrub * remove reduendent scrub * fix encoding issue * keep scrubbed log in args Co-authored-by: Chenyu Li <[email protected]> (cherry picked from commit ce0bcc0) Co-authored-by: Jeremy Cohen <[email protected]>
* Even more scrubbing * Changelog entry * Even more * remove reduendent scrub * remove reduendent scrub * fix encoding issue * keep scrubbed log in args Co-authored-by: Chenyu Li <[email protected]> (cherry picked from commit ce0bcc0) Co-authored-by: Jeremy Cohen <[email protected]>
* Even more scrubbing * Changelog entry * Even more * remove reduendent scrub * remove reduendent scrub * fix encoding issue * keep scrubbed log in args Co-authored-by: Chenyu Li <[email protected]>
resolves #5151
Description
cmd
inCommandError
(parent), plusstdout
+stderr
inCommandResultError
(child). The latter is whatclients.system.run_cmd
raises andclients.git.clone
catchesrun_cmd
clients.git._raise_git_cloning_error
... even though it should be scrubbed yet again indbt.exceptions.bad_package_spec
This is duplicative logic, but so it goes... until #4836, perhaps?
Locally
Invoking
dbt-core
as a Python module...Checklist
changie new
to create a changelog entry