Skip to content

opentelemetry-bootstrap -a install shouldn't upgrade libraries #1563

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

Closed
codeboten opened this issue Feb 2, 2021 · 5 comments
Closed

opentelemetry-bootstrap -a install shouldn't upgrade libraries #1563

codeboten opened this issue Feb 2, 2021 · 5 comments
Labels
auto-instrumentation related to auto-instrumentation of the sdk bug Something isn't working

Comments

@codeboten
Copy link
Contributor

Describe your environment
The opentelemetry-bootstrap install option currently searches for installed libraries and instrumentations to match those libraries which is really useful. However, some of those instrumentation libraries will have the side effect of upgrading the libraries they're instrumenting, which is unexpected.

Steps to reproduce

pip install tornado==4.0
pip freeze | grep tornado
tornado==4.0
opentelemetry-bootstrap -a install
pip freeze | grep tornado
opentelemetry-instrumentation-tornado==0.17b0
tornado==6.1

What is the expected behavior?
The instrumentation library should not have been installed

What is the actual behavior?
tornado was upgraded

@codeboten codeboten added bug Something isn't working auto-instrumentation related to auto-instrumentation of the sdk labels Feb 2, 2021
@srikanthccv
Copy link
Member

Ahh, I ran into this problem. What do you think about the idea of instrumentations not installing library and expect it to be installed by user? One potential problem could be instrumentation library may not be compatible with instrumented library version.

@owais
Copy link
Contributor

owais commented Mar 31, 2021

Thanks for linking to this issue @lonewolf3739. @codeboten I think we should just get rid of bootstrap and all such issues caused by instrumentation libraries depending on target libraries. #1729

@srikanthccv
Copy link
Member

Hmm

$ python -m pip install opentelemetry-instrumentation-tornado==0.17b0
...
...
Successfully installed opentelemetry-api-0.17b0 opentelemetry-instrumentation-0.17b0 opentelemetry-instrumentation-tornado-0.17b0 tornado-6.1
$ python -m pip install tornado==4.0
...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
opentelemetry-instrumentation-tornado 0.17b0 requires tornado>=6.0, but you have tornado 4.0 which is incompatible.

installation in different order doesn't show conflict error?

$ python -m pip install tornado==4.0
...
...
$ python -m pip install opentelemetry-instrumentation-tornado==0.17b0
...
Installing collected packages: tornado, opentelemetry-instrumentation-tornado
  Attempting uninstall: tornado
    Found existing installation: tornado 4.0
    Uninstalling tornado-4.0:
      Successfully uninstalled tornado-4.0
Successfully installed opentelemetry-instrumentation-tornado-0.17b0 tornado-6.1

I would have expected it to behave same in both cases.

@lzchen
Copy link
Contributor

lzchen commented Apr 5, 2021

I would have expected it to behave same in both cases.

Isn't the reason because we pinned the tornado version to >=6.0? What is the issue here?

@codeboten
Copy link
Contributor Author

Moved to discussion: #1729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-instrumentation related to auto-instrumentation of the sdk bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants