Closed
Description
- Package Name: azure-mgmt-datafactory
- Package Version: 3.1.0
- Operating System: Linux, Windows
- Python Version: 3.10
Describe the bug
ADF triggers may have "annotations" but wrong type in Azure Python SDK doesn't allow creating them with Python code. (Most possibly this bug is present for other ADF resources, too.)
To Reproduce
Steps to reproduce the behavior:
- Adapt and run the code:
from azure.mgmt.datafactory.models import ScheduleTrigger, ...
trigger_resource = TriggerResource(
properties=ScheduleTrigger(
recurrence=ScheduleTriggerRecurrence( ...some params, not important ),
description=some_description,
annotations=["test"],
pipelines=[TriggerPipelineReference(pipeline_reference=..., parameters=...)],
)
)
adf_client = DataFactoryManagementClient(credential, some_subscription_id)
adf_client.triggers.create_or_update(some_resource_group_name, some_factory_name, trigger_name, trigger_resource)
- It creates a trigger that does not have any annotation;
- Check types using mypy, it says annotation must be
List[JSON]
which is alias forMutableMapping[str, Any]
but annotations must beList[str]
type.
Expected behavior
Trigger annotation are expected to be created.
Additional context
We are going to use annotations for further filtering so it would be important.
Also note we are creating triggers using Python SDK, Management API and not using ARM templates (which obviously work).
Usage of Python is mandatory, we can't use other SDKs.
Metadata
Metadata
Assignees
Labels
This issue is related to a management-plane library.Workflow: This issue is responsible by Azure service team.Issues that are reported by GitHub users external to the Azure organization.Workflow: The Azure SDK team believes it to be addressed and ready to close.The issue doesn't require a change to the product in order to be resolved. Most issues start as that