Area: Deployment Issues
Sub-Area: Container Deployment
Applies to: OSS + Cloud
Issue
The DataHub Actions container fails at startup. The log shows an error from datahub_actions.entrypoints with a traceback through datahub/ingestion/api/registry.py, and it ends with a KeyError that names a plugin:
KeyError: 'key already in use - executor'
The plugin name at the end changes from run to run. It can be any registered action plugin, such as executor, slack, teams or snowflake_tag_propagation.
You Might Be Asking
- Why does DataHub Actions crash right after it starts?
- Which version fixes the "key already in use" error?
- Can I set a worker count to work around it?
Cause
DataHub Actions finds its plugins through a plugin registry. The registry reads the installed plugin list the first time something looks up a plugin. Before DataHub v1.6.0, that first read had no lock. When two threads in the same process do the first lookup at the same moment, both threads register the same plugins, and the second one fails with key already in use - <plugin name>.
DataHub v1.6.0 added a lock around that first read, so only one thread loads the plugin list. Releases v1.5.0 through v1.5.0.7 don't have the lock.
Solution
Upgrade DataHub Actions to v1.6.0 or later.
- For the
datahub-actionsDocker image, use a pinned release tag of v1.6.0 or later. Don't uselatest. See Deploying with Docker for the image variants and tag guidance. - If you install DataHub Actions with pip, install
acryl-datahubandacryl-datahub-actions1.6.0 or later. - If you see this error in a DataHub Cloud Remote Executor, upgrade the executor image to the latest release.
DataHub Actions has no worker count setting. There is no DATAHUB_ACTIONS_WORKERS variable and no --num-workers flag. datahub actions run accepts only -c/--config and --debug, and it ignores any other option you pass, so adding these does nothing.
Until you can upgrade, restart the container. The race can only happen during the first plugin lookup in a process, so a restart can get past it. It can fail again on a later start, so treat the restart as a stopgap.