Skip to content

Packaging this sdk with PEX causes collisions #281

Closed
@Sheemap

Description

@Sheemap

Is your feature request related to a problem? Please describe.

Yes, It's causing an issue with our build system. The issue is the testing directories for this repo and the python-eventsource repo, are named the same and both included in their respective pip releases.


We use the pex build tool to package up all our dependencies up into a serverless function, it tries to ensure packages don't conflict when it collects those dependencies.

Unfortunately when building python-server-sdk, it errors out due to a namespace collision with python-eventsource, which it depends on.

I got to this conclusion from someone else reporting this error to the Pants build system devs, here is the maintainer's explanation and proposed fix. pantsbuild/pants#20224 (comment)

Describe the solution you'd like

If it isn't used at runtime, excluding the testing folder from the released pip package would be great.

Describe alternatives you've considered

  • Move the test folders to be within the ldclient module
  • Renaming the folders

Additional context

There is a workaround we can use short term to allow collisions, but we hope to use launchdarkly on a lot of functions, and don't want to disable this collision feature long term.

Logs I'm seeing

Encountered collisions populating src.python.api/lambda from PEX at faas_repository.pex:
1. src.python.api/lambda/testing/http_util.py was provided by:
	sha1:41a85a0d0ed3f173204af13855221a85262e9509 -> /home/bread/.cache/pants/named_caches/pex_root/installed_wheels/1b9580d49755735bd7acccd4e2cecfc17a1669e8e499e96e396a401012dbdae3/launchdarkly_server_sdk-9.3.0-py3-none-any.whl/testing/http_util.py
	sha1:6992afbf74d310b1d70287f856d9d96140f9455d -> /home/bread/.cache/pants/named_caches/pex_root/installed_wheels/3d7e5301bc4b4a744ecdaa10de8bce52c2f3c66a97e9aa10ab11ca81b67fb31b/launchdarkly_eventsource-1.1.1-py3-none-any.whl/testing/http_util.py
2. src.python.api/lambda/testing/__init__.py was provided by:
	sha1:b679ff39746fd1ccd574ad90603eb8c5e97d5164 -> /home/bread/.cache/pants/named_caches/pex_root/installed_wheels/1b9580d49755735bd7acccd4e2cecfc17a1669e8e499e96e396a401012dbdae3/launchdarkly_server_sdk-9.3.0-py3-none-any.whl/testing/__init__.py
	sha1:da39a3ee5e6b4b0d3255bfef95601890afd80709 -> /home/bread/.cache/pants/named_caches/pex_root/installed_wheels/3d7e5301bc4b4a744ecdaa10de8bce52c2f3c66a97e9aa10ab11ca81b67fb31b/launchdarkly_eventsource-1.1.1-py3-none-any.whl/testing/__init__.py

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions