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

feat: Output full URL path in error messages #785

Merged
merged 5 commits into from
Jul 11, 2022

Conversation

ericboucher
Copy link
Contributor

Output actual full path in response_error_message instead of "{self.path}"

@ericboucher ericboucher changed the title Output full path in error messages feat: Output full path in error messages Jul 2, 2022
@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #785 (ce6a52e) into main (6fc504b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #785      +/-   ##
==========================================
+ Coverage   80.28%   80.29%   +0.01%     
==========================================
  Files          34       34              
  Lines        3408     3410       +2     
  Branches      679      679              
==========================================
+ Hits         2736     2738       +2     
  Misses        499      499              
  Partials      173      173              
Impacted Files Coverage Δ
singer_sdk/streams/rest.py 82.16% <100.00%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fc504b...ce6a52e. Read the comment docs.

@edgarrmondragon
Copy link
Collaborator

Hi @ericboucher, I'm generally in favor of this change, but do you know if there are any security concerns with logging the formatted path, which may contain contextual information (entity IDs, etc.)?

@edgarrmondragon edgarrmondragon self-assigned this Jul 2, 2022
@ericboucher
Copy link
Contributor Author

I was thinking about this. I think it's generally fine since it is not logging URL parameters where you could have a token or sensitive data. An option could be to add a line to obfuscate secrets but I am not sure it's necessary.

@edgarrmondragon
Copy link
Collaborator

I was thinking about this. I think it's generally fine since it is not logging URL parameters where you could have a token or sensitive data. An option could be to add a line to obfuscate secrets but I am not sure it's necessary.

@ericboucher alright 👍. Can you then just add a note to the method's docstring indicating the cases in which it may be desirable to override the method (e.g. when the URL path contains secrets or PII)? That'll render in the docs page.

@edgarrmondragon edgarrmondragon changed the title feat: Output full path in error messages feat: Output full URL path in error messages Jul 7, 2022
Copy link
Collaborator

@edgarrmondragon edgarrmondragon left a comment

Choose a reason for hiding this comment

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

@ericboucher lgtm, thanks!

@edgarrmondragon edgarrmondragon merged commit 6a3a72b into meltano:main Jul 11, 2022
@ericboucher ericboucher deleted the full-path-error branch July 12, 2022 13:02
edgarrmondragon added a commit that referenced this pull request Jul 13, 2022
* Output full path in error messages

* Update rest.py

* Add warning in method

* Update rest.py

Co-authored-by: Edgar R. M <[email protected]>
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.

2 participants