PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.33k stars 1.5k forks source link

Conflicting task names if both prefect-aws and prefect-gcp are installed #13043

Open jspbach opened 1 year ago

jspbach commented 1 year ago

Expectation / Proposal

Installing prefect-gcp and prefect-aws side by side raises warnings about task name conflicts. The problem seems to be sensitive to installing order: if prefect-gcp is installed before prefect-aws then the errors will mention the latter and vice versa.

I have Prefect 2.10.3 installed with the latest versions (as of this writing) of each supplementary package.

Traceback / Example

.../prefect/tasks.py:279: UserWarning: A task named 'create_secret' and defined at '.../prefect_gcp/secret_manager.py:29' conflicts with another task. Consider specifying a unique `name` parameter in the task definition:

 `@task(name='my_unique_name', ...)`
  warnings.warn(
...prefect/tasks.py:279: UserWarning: A task named 'update_secret' and defined at '.../prefect_gcp/secret_manager.py:85' conflicts with another task. Consider specifying a unique `name` parameter in the task definition:

 `@task(name='my_unique_name', ...)`
  warnings.warn(
.../prefect/tasks.py:279: UserWarning: A task named 'read_secret' and defined at '.../prefect_gcp/secret_manager.py:142' conflicts with another task. Consider specifying a unique `name` parameter in the task definition:

 `@task(name='my_unique_name', ...)`
  warnings.warn(
.../prefect/tasks.py:279: UserWarning: A task named 'delete_secret' and defined at '.../prefect_gcp/secret_manager.py:192' conflicts with another task. Consider specifying a unique `name` parameter in the task definition:

 `@task(name='my_unique_name', ...)`
  warnings.warn(
discdiver commented 1 year ago

See same issue in main Prefect repo