opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

Refactor bootstrap generation

Open ocelotl opened this issue 1 year ago • 9 comments

This makes the bootstrap script get the package version directly from pypi instead of from our lists of packages. This makes sure that the packages are actually available for the end user to install.

ocelotl avatar Dec 21 '23 03:12 ocelotl

Just to clarify, in our release process, we change each package to the release version and then we regenerate bootstrap_gen.py. I'm curious as to how you generated the 0.43b0 versions of bootstrap_gen.py, did you run the new script or did you replace these manually? I think we just need to add a try catch for erroneous installs, there's no need to change what is generated in our dev branch right?

lzchen avatar Dec 27 '23 17:12 lzchen

I think we allow users to specify version in bootstrap so probably have to still reflect this in the install.

lzchen avatar Dec 27 '23 17:12 lzchen

I'm not sure if this is exactly a workaround for https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2053 since users will still see an error message if the package doesn't exist in Pypi right? I think there isn't really a workaround since there's no way to provide the actual package (the most we can do is not display the error message and just explain on the issues that the package is not available yet).

lzchen avatar Dec 27 '23 17:12 lzchen

Just to clarify, in our release process, we change each package to the release version and then we regenerate bootstrap_gen.py. I'm curious as to how you generated the 0.43b0 versions of bootstrap_gen.py, did you run the new script or did you replace these manually? I think we just need to add a try catch for erroneous installs, there's no need to change what is generated in our dev branch right?

Right, reverted to 44b0.dev.

ocelotl avatar Jan 02 '24 23:01 ocelotl

Just to clarify, in our release process, we change each package to the release version and then we regenerate bootstrap_gen.py. I'm curious as to how you generated the 0.43b0 versions of bootstrap_gen.py, did you run the new script or did you replace these manually? I think we just need to add a try catch for erroneous installs, there's no need to change what is generated in our dev branch right?

Right, reverted to 44b0.dev.

Which fails tox -e generate...

ocelotl avatar Jan 02 '24 23:01 ocelotl

I'm not sure if this is exactly a workaround for #2053 since users will still see an error message if the package doesn't exist in Pypi right? I think there isn't really a workaround since there's no way to provide the actual package (the most we can do is not display the error message and just explain on the issues that the package is not available yet).

This is a workaround because no exception is being raised now, only an error message is now produced for the particular package.

ocelotl avatar Jan 02 '24 23:01 ocelotl

Fixes #2053

I think this fixes the bootstrap script issue, but doesn't actually solve the PyPI error you would when trying to install the non-existent release

aabmass avatar Feb 01 '24 17:02 aabmass

I think this fixes the bootstrap script issue, but doesn't actually solve the PyPI error you would when trying to install the non-existent release

Seconding this, and was also mentioned at today's sig meeting. In this PR description I've included an example error if a user with aiohttp installed tries to bootstrap with the latest release: https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2299. It would be great to have this part fixed.

tammy-baylis-swi avatar Feb 29 '24 18:02 tammy-baylis-swi

any update on this?

npuichigo avatar Mar 12 '24 16:03 npuichigo