Skip to content

[BUG] 1password support broken #239

@bgaidioz

Description

@bgaidioz

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:

  1. Specify a 1password ref in the config and enable 1password
  2. Run mxcp validate or mxcp list or ...

Expected Behavior

Environment

  • MXCP Version: 0.12.0

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions