fierce-oil-47448
05/31/2024, 7:39 PMKeyringLocked("Failed to unlock the collection!")
when I register workflows. I need to unlock my keyring to proceed, but don't understand why.fierce-oil-47448
05/31/2024, 7:40 PM/home/ubuntu/vfm/ml_platform/workflows/data_processing/launch:9 in <module> │
│ │
│ ❱ 9 │ launch( │
│ │
│ /home/ubuntu/vfm/ml_platform/orchestration/cli/launcher.py:80 in launch │
│ │
│ ❱ 80 │ │ registered_preprocess_wf = remote.register_script( │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/remote/remote.py:929 in register_script │
│ │
│ ❱ 929 │ │ │ │ md5_bytes, upload_native_url = self.fast_package(pathlib.Path(source_pat │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/remote/remote.py:802 in fast_package │
│ │
│ ❱ 802 │ │ return self.upload_file(pathlib.Path(zip_file)) │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/remote/remote.py:825 in upload_file │
│ │
│ ❱ 825 │ │ upload_location = self.client.get_upload_signed_url( │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/remote/remote.py:236 in client │
│ │
│ ❱ 236 │ │ │ self._client = SynchronousFlyteClient(self.config.platform, **self._kwargs) │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/clients/raw.py:50 in __init__ │
│ │
│ ❱ 50 │ │ │ cfg, upgrade_channel_to_authenticated(cfg, upgrade_channel_to_proxy_authenti │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/clients/auth_helper.py:140 in upgrade_channel_to_authenticated │
│ │
│ ❱ 140 │ authenticator = get_authenticator(cfg, RemoteClientConfigStore(in_channel)) │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/clients/auth_helper.py:73 in get_authenticator │
│ │
│ ❱ 73 │ │ return PKCEAuthenticator(cfg.endpoint, cfg_store, scopes=cfg.scopes, verify=veri │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/clients/auth/authenticator.py:111 in __init__ │
│ │
│ ❱ 111 │ │ super().__init__(endpoint, header_key, KeyringStore.retrieve(endpoint), verify=v │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/flytekit/clients/auth/keyring.py:58 in retrieve │
│ │
│ ❱ 58 │ │ │ refresh_token = _keyring.get_password(for_endpoint, KeyringStore._refresh_to │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/keyring/core.py:56 in get_password │
│ │
│ ❱ 56 │ return get_keyring().get_password(service_name, username) │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/keyring/backends/SecretService.py:79 in get_password │
│ │
│ ❱ 79 │ │ collection = self.get_preferred_collection() │
│ │
│ /home/ubuntu/.venv/lib/python3.11/site-packages/keyring/backends/SecretService.py:68 in get_preferred_collection │
│ │
│ ❱ 68 │ │ │ │ raise KeyringLocked("Failed to unlock the collection!")
freezing-airport-6809
fierce-oil-47448
05/31/2024, 8:42 PMfreezing-airport-6809
dry-parrot-15675
06/03/2024, 9:58 AMimport keyring
from keyring.backends.chainer import ChainerBackend
# Get the current keyring backend
current_backend = keyring.get_keyring()
# Print the type and description of the backend
print("Keyring backend:", type(current_backend))
print("Keyring backend description:", current_backend)
# If the backend is ChainerBackend, list its backends
if isinstance(current_backend, ChainerBackend):
print("ChainerBackend is using the following backends:")
for backend in current_backend.backends:
print("-", type(backend), ":", backend)
You might then check if keyring generally works:
import keyring
# Define the service name, username, and password
service_name = "my_service"
username = "my_username"
password = "my_secure_password"
# Store the password
keyring.set_password(service_name, username, password)
print("Password stored successfully.")
# Retrieve the password
retrieved_password = keyring.get_password(service_name, username)
print(f"Retrieved password: {retrieved_password}")
fierce-oil-47448
06/03/2024, 3:07 PMfierce-oil-47448
06/06/2024, 8:31 AMKeyring backend: <class 'keyring.backends.SecretService.Keyring'>
Keyring backend description: keyring.backends.SecretService.Keyring (priority: 5)
Traceback (most recent call last):
File "/home/ubuntu/vfm/foo.py", line 24, in <module>
keyring.set_password(service_name, username, password)
File "/home/ubuntu/.venv/lib/python3.11/site-packages/keyring/core.py", line 61, in set_password
get_keyring().set_password(service_name, username, password)
File "/home/ubuntu/.venv/lib/python3.11/site-packages/keyring/backends/SecretService.py", line 88, in set_password
collection = self.get_preferred_collection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.venv/lib/python3.11/site-packages/keyring/backends/SecretService.py", line 68, in get_preferred_collection
raise KeyringLocked("Failed to unlock the collection!")
keyring.errors.KeyringLocked: Failed to unlock the collection!
cc: @dry-parrot-15675dry-parrot-15675
06/06/2024, 10:24 AMfreezing-airport-6809