Skip to content

Conversation

TimPansino
Copy link
Contributor

@TimPansino TimPansino commented Jul 29, 2025

Overview

  • Fixes TypeErrors caused by calling newrelic.common.encoding_utils.json_encode() on a Path object by converting to a string representation of the Path.
  • Add tests for json_encode() for all supported types to prevent regressions.

Testing

from pathlib import Path
from newrelic.common.encoding_utils import json_encode

p = Path("/test/path/file.py")
d = {"path": p}

print(repr(d))
print(repr(json_encode(d)))
{'path': PosixPath('/test/path/file.py')}
'{"path":"/test/path/file.py"}'

@TimPansino TimPansino requested a review from a team as a code owner July 29, 2025 17:39
Copy link

github-actions bot commented Jul 29, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.72s
✅ MARKDOWN markdownlint 7 0 0 0 1.24s
✅ MARKDOWN markdown-link-check 7 0 0 15.89s
✅ PYTHON ruff 922 0 0 0 0.88s
✅ PYTHON ruff-format 922 0 0 0 0.35s
✅ YAML prettier 13 0 0 0 1.37s
✅ YAML v8r 13 0 0 5.78s
✅ YAML yamllint 13 0 0 0.63s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.35%. Comparing base (cf06bc9) to head (56c54ed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1436      +/-   ##
==========================================
+ Coverage   81.33%   81.35%   +0.01%     
==========================================
  Files         208      208              
  Lines       23563    23566       +3     
  Branches     3716     3717       +1     
==========================================
+ Hits        19166    19173       +7     
+ Misses       3138     3135       -3     
+ Partials     1259     1258       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 6, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 6, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 12, 2025
@TimPansino TimPansino enabled auto-merge (squash) August 13, 2025 20:07
@TimPansino TimPansino merged commit 6724740 into main Aug 13, 2025
107 of 109 checks passed
@TimPansino TimPansino deleted the fix-path-encoding branch August 13, 2025 20:08
@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 13, 2025
@TimPansino TimPansino added this to the v10.16.0 milestone Aug 14, 2025
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.

4 participants