This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: remove stale opentelemetry_sdk packages at lib module import time #158
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ee7c4b9
to
8c44d1d
Compare
PietroPasotti
suggested changes
Aug 5, 2024
80020fa
to
b3057ef
Compare
fixes #157 by moving the stale package culling of charm_tracing.py ahead of all package imports and widening its scope to any opentelemetry package directories.
b3057ef
to
b7b25d2
Compare
@PietroPasotti everything is as you suggested, with the one addition of the "# Not None or empty list" comment on that |
PietroPasotti
approved these changes
Aug 8, 2024
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.
LGTM
# Conflicts: # src/charm.py # tests/scenario/test_charm.py
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
#157
Solution
This PR takes the solution from #151 and:
While fixing this PR, I noticed the ruff.lint settings in pyproject.toml were under an incorrect array ([lint] instead of [tool.ruff]/[tool.ruff.lint]). I've fixed that plus any linting errors that came up as a result as a drive-by.
Context
#151
Testing Instructions
(in a machine model)
to repro the original issue
to demo the fix:
Release Notes
Adds a workaround for juju bug 2058335, which results in parts of old python packages being left in the virtual environment after upgrades during charm refresh. This patch detects and removes any duplicate
opentelemetry-exporter-otlp-proto-http
package found during upgrade.