You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tv...@apache.org on 2026/07/22 17:17:01 UTC
(beam) branch tvalentyn-patch-1 created (now afd281683b4)
This is an automated email from the ASF dual-hosted git repository.
tvalentyn pushed a change to branch tvalentyn-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git
at afd281683b4 Provide better error when beam plugin was supplied but wasn't staged.
This branch includes the following new commits:
new afd281683b4 Provide better error when beam plugin was supplied but wasn't staged.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(beam) 01/01: Provide better error when beam plugin was supplied but wasn't staged.
Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tvalentyn pushed a commit to branch tvalentyn-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git
commit afd281683b49753cc71d5283171353058a42f327
Author: tvalentyn <tv...@users.noreply.github.com>
AuthorDate: Wed Jul 22 10:16:51 2026 -0700
Provide better error when beam plugin was supplied but wasn't staged.
---
sdks/python/apache_beam/runners/worker/sdk_worker_main.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/sdks/python/apache_beam/runners/worker/sdk_worker_main.py b/sdks/python/apache_beam/runners/worker/sdk_worker_main.py
index 754a631eaf3..e21c423751b 100644
--- a/sdks/python/apache_beam/runners/worker/sdk_worker_main.py
+++ b/sdks/python/apache_beam/runners/worker/sdk_worker_main.py
@@ -57,17 +57,21 @@ def _import_beam_plugins(plugins):
try:
importlib.import_module(plugin)
_LOGGER.debug('Imported beam-plugin %s', plugin)
- except ImportError:
+ except ImportError as exc:
+ if '.' not in plugin:
+ _LOGGER.warning('Failed to import beam-plugin %s', plugin, exc_info=exc)
+ continue
+
try:
_LOGGER.debug((
"Looks like %s is not a module. "
- "Trying to import it assuming it's a class"),
+ "Trying to import it assuming it's a class."),
plugin)
module, _ = plugin.rsplit('.', 1)
importlib.import_module(module)
_LOGGER.debug('Imported %s for beam-plugin %s', module, plugin)
- except ImportError as exc:
- _LOGGER.warning('Failed to import beam-plugin %s', plugin, exc_info=exc)
+ except ImportError as fallback_exc:
+ _LOGGER.warning('Failed to import beam-plugin %s', plugin, exc_info=fallback_exc)
def create_harness(environment, dry_run=False):