GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Don't use `pkg_resources.get_distribution(..).version` by DouglasHeriot · Pull Request #256 · GoogleCloudPlatform/opentelemetry-operations-python

Conversation

@DouglasHeriot

@DouglasHeriot DouglasHeriot commented Jul 5, 2023

Copy link
Copy Markdown
Contributor

Similar to discussion at googleapis/python-api-core#27 I am using opentelemetry in an environment where modules are vendored without pip. So, pkg_resources can not be used to search for a module at runtime to get its version.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@DouglasHeriot
DouglasHeriot marked this pull request as ready for review July 18, 2023 15:16
@DouglasHeriot
DouglasHeriot requested a review from a team as a code owner July 18, 2023 15:16
@aabmass

aabmass commented Jul 18, 2023

Copy link
Copy Markdown
Collaborator

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aabmass
aabmass reviewed Jul 18, 2023
View reviewed changes

@aabmass aabmass left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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.

Can you also update here?

opentelemetry-operations-python/opentelemetry-exporter-gcp-trace/tests/test_cloud_trace_exporter.py

Line 98 in 8f8d2f0

pkg_resources.get_distribution("opentelemetry-sdk").version

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@DouglasHeriot
DouglasHeriot force-pushed the version branch from be3320e to dd0daa4 Compare August 3, 2023 08:09
@DouglasHeriot

DouglasHeriot commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for noticing that. I also found I missed another use in opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DouglasHeriot
DouglasHeriot force-pushed the version branch 3 times, most recently from 372a1a9 to 8ef25e2 Compare August 3, 2023 10:14
DouglasHeriot added 2 commits August 3, 2023 03:45
@DouglasHeriot
Pin upstream version of opentelemetry when running tests
f0e1a75
Fix in GoogleCloudPlatform#254 didn't apply to tox environments that run `pip install .`

`test_detects_gce` was failing with opentelemetry-sdk version 1.19.0
instead of 1.18.0
@DouglasHeriot
Don't use pkg_resources.get_distribution(..).version
d74772c
Similar to discussion at googleapis/python-api-core#27 I am using opentelemetry in an environment where modules are vendored without pip. So, pkg_resources can not be used to search for a module at runtime to get its version.
@DouglasHeriot
DouglasHeriot force-pushed the version branch from 8ef25e2 to d74772c Compare August 3, 2023 10:46
@DouglasHeriot DouglasHeriot mentioned this pull request Aug 3, 2023
Pin upstream version of opentelemetry when running tests #270
Merged
@DouglasHeriot

DouglasHeriot commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

This won’t be able to pass the tests until #270 (fix pinning to older opentelemetry-sdk version) and/or #269 (update opentelemetry-sdk version) are merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aabmass
Merge branch 'main' into version
4fac04f
@aabmass

aabmass commented Aug 3, 2023

Copy link
Copy Markdown
Collaborator

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aabmass
Merge branch 'main' into version
5804e18
@aabmass
aabmass enabled auto-merge (squash) August 3, 2023 20:25
@aabmass

aabmass commented Aug 3, 2023

Copy link
Copy Markdown
Collaborator

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aabmass
aabmass approved these changes Aug 3, 2023
View reviewed changes
@aabmass
aabmass merged commit c487ff7 into GoogleCloudPlatform:main Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aabmass aabmass aabmass approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@DouglasHeriot @aabmass
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.