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

fix: workaround potencial valueerror form importlib_metadata #8069

Closed
wants to merge 2 commits into from

Conversation

juanjux
Copy link
Collaborator

@juanjux juanjux commented Jan 11, 2024

Description

Handle a potential ValueError on importlib_metadata used from internal/packags.py when one path is not a subpath of the second as a workaround of python/importlib_metadata#455

Fixes #8068.

Checklist

  • Change(s) are motivated and described in the PR description.
  • Testing strategy is described if automated tests are not included in the PR.
  • Risk is outlined (performance impact, potential for breakage, maintainability, etc).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Library release note guidelines are followed. If no release note is required, add label changelog/no-changelog.
  • Documentation is included (in-code, generated user docs, public corp docs).
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Title is accurate.
  • No unnecessary changes are introduced.
  • Description motivates each change.
  • Avoids breaking API changes unless absolutely necessary.
  • Testing strategy adequately addresses listed risk(s).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Release note makes sense to a user of the library.
  • Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy
  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@juanjux juanjux changed the title Juanjux/fix importlib valueerror fix: handle potencial valueerror form importlib_metadata Jan 11, 2024
@juanjux juanjux changed the title fix: handle potencial valueerror form importlib_metadata fix: workaround potencial valueerror form importlib_metadata Jan 11, 2024
@juanjux juanjux marked this pull request as ready for review January 11, 2024 11:02
@juanjux juanjux requested review from a team as code owners January 11, 2024 11:02
@juanjux juanjux added ASM Application Security Monitoring backport 2.4 labels Jan 11, 2024
@gnufede
Copy link
Member

gnufede commented Jan 11, 2024

Should we have a regression test for this?

@juanjux
Copy link
Collaborator Author

juanjux commented Jan 11, 2024

Should we have a regression test for this?

Hard to reproduce, since we should change all import paths (the error is deeply into importlib).

@juanjux juanjux closed this Jan 11, 2024
@juanjux
Copy link
Collaborator Author

juanjux commented Jan 11, 2024

Closed, superseded by> #8075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring backport 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'function' object has no attribute '__callonce_result__'
2 participants