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

terraform: do not print tf file name in the errors #83

Merged
merged 1 commit into from
Aug 29, 2022
Merged

terraform: do not print tf file name in the errors #83

merged 1 commit into from
Aug 29, 2022

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Aug 27, 2022

Description of your changes

We never really go to workspace folder anymore, so it's not worth printing the file name for every error.

Fixes #82

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Manually with AWS.

Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

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

Thanks @muvaf, lgtm. The file name is always main.tf.json anyway. But I guess we are losing the temp folder name in the logs, correct? But then, we can lookup the uid from the K8s resource.

For debugging purposes, I sometimes need the workspace folder's path but I guess we are trying to decrease leaks in our logs.

@muvaf
Copy link
Member Author

muvaf commented Aug 29, 2022

But I guess we are losing the temp folder name in the logs, correct?

I don't think so. This only affects the non-debug errors and as checked in the unit tests, the path wasn't absolute already, i.e. only main.tf.json string is removed. We can still find the workspace path in debug logs.

@muvaf muvaf merged commit 88422b4 into crossplane:main Aug 29, 2022
@muvaf muvaf deleted the dont-leak-tf branch August 29, 2022 14:02
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.

Do not mention tf files in error messages
2 participants