Describe the Bug
The 1password (onepassword) interface is asynchronous, and all the code that was written against it is sync. The UT runs against a sync mocked client (meaning Python's onepassword isn't used at all).
To Reproduce
Steps to reproduce the behavior:
- Specify a 1password ref in the config and enable 1password
- Run
mxcp validate or mxcp list or ...
Expected Behavior
Environment
Error Output
% MXCP_CONFIG=mxcp-config.yml mxcp validate --debug
Error: Failed to resolve 1Password URL 'op://Engineering/Salesforce Develop/username': 'Client' object has no attribute 'secrets'
Traceback:
Traceback (most recent call last):
File "/Users/bgaidioz/IdeaProjects/mxcp/src/mxcp/server/core/refs/resolver.py", line 274, in resolve_onepassword_url
secret_value = client.secrets.resolve(secret_ref)
AttributeError: 'Client' object has no attribute 'secrets'
Additional Context
Fixing the code to use the async API is tricky because loading config is done sometimes in a sync context, sometimes in an asynchronous context. Better fix the config loading into an async implementation and fix 1password after?
Describe the Bug
The 1password (
onepassword) interface is asynchronous, and all the code that was written against it is sync. The UT runs against a sync mocked client (meaning Python'sonepasswordisn't used at all).To Reproduce
Steps to reproduce the behavior:
mxcp validateormxcp listor ...Expected Behavior
Environment
Error Output
Additional Context
Fixing the code to use the async API is tricky because loading config is done sometimes in a sync context, sometimes in an asynchronous context. Better fix the config loading into an async implementation and fix 1password after?