Skip to content

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Aug 26, 2025

Received the error below when installing union and flyte in the same venv. This's because the keyring will automatically load the union keyring plugin.
https://github.com/jaraco/keyring/blob/71dedcbcf21847f358ad0510ea6bff59de1449a2/keyring/backend.py#L241-L245

$ flyte get secret 
[flyte] Using editable install as root directory: /Users/kevin/git/flyte-sdk
Error initializing plugin EntryPoint(name='union_keyring_file', value='union._keyring.file', group='keyring.backends').
Traceback (most recent call last):
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/keyring/backend.py", line 244, in _load_plugins
    init_func = ep.load()
                ^^^^^^^^^
  File "/Users/kevin/.local/share/uv/python/cpython-3.12.6-macos-x86_64-none/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kevin/.local/share/uv/python/cpython-3.12.6-macos-x86_64-none/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/__init__.py", line 26, in <module>
    from union.remote import UnionRemote
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/remote/__init__.py", line 1, in <module>
    from union.remote._app_template_factory import HuggingFaceModelInfo, ShardConfig, VLLMShardArgs
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/remote/_app_template_factory.py", line 11, in <module>
    from union.app import App, Input
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/app/__init__.py", line 1, in <module>
    from union.app._arize import ArizeConfig, PhoenixConfig
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/app/_arize.py", line 6, in <module>
    from ._models import AppConfigProtocol, AppSerializationSettings, Link
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/app/_models.py", line 34, in <module>
    from union.internal.app.app_definition_pb2 import App as AppIDL
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/internal/app/app_definition_pb2.py", line 14, in <module>
    from union.internal.common import identity_pb2 as common_dot_identity__pb2
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/internal/common/identity_pb2.py", line 14, in <module>
    from union.internal.common import identifier_pb2 as common_dot_identifier__pb2
  File "/Users/kevin/git/flyte-sdk/.venv/lib/python3.12/site-packages/union/internal/common/identifier_pb2.py", line 17, in <module>
    DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x63ommon/identifier.proto\x12\x0f\x63loudidl.common\x1a\x17validate/validate.proto\"~\n\x11ProjectIdentifier\x12+\n\x0corganization\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0corganization\x12\x1f\n\x06\x64omain\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1b\n\x04name\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"T\n\x11\x43lusterIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"O\n\x15\x43lusterPoolIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"_\n\x17\x43lusterConfigIdentifier\x12+\n\x0corganization\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0corganization\x12\x17\n\x02id\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x02id\"3\n\x0eUserIdentifier\x12!\n\x07subject\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07subject\":\n\x15\x41pplicationIdentifier\x12!\n\x07subject\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07subject\"Q\n\x0eRoleIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"O\n\rOrgIdentifier\x12>\n\x04name\x18\x01 \x01(\tB*\xfa\x42\'r%\x10\x01\x18?2\x1f^[a-z0-9]([-a-z0-9]*[a-z0-9])?$R\x04name\"y\n\x18ManagedClusterIdentifier\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12:\n\x03org\x18\x03 \x01(\x0b\x32\x1e.cloudidl.common.OrgIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x03orgJ\x04\x08\x01\x10\x02\"S\n\x10PolicyIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04nameB\xb0\x01\n\x13\x63om.cloudidl.commonB\x0fIdent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^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Couldn't build proto file into descriptor pool: duplicate file name common/identifier.proto
                                                                Secrets                                                                 

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@pingsutw pingsutw marked this pull request as draft August 26, 2025 21:05
pingsutw and others added 2 commits August 31, 2025 00:59
Simplify the function by removing the dictionary handling branch and only
keeping the Python 3.12/3.13 EntryPoints approach.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@pingsutw
Copy link
Member Author

pingsutw commented Sep 2, 2025

It doesn't work in Python 3.10/3.11 since keyring will load the plugin before SDK monkey patches it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant