Skip to content

Cannot create ADF trigger annotations using Python SDK #39200

Closed
@VKovalchuk-danone

Description

@VKovalchuk-danone
  • 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:

  1. 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)
  1. It creates a trigger that does not have any annotation;
  2. Check types using mypy, it says annotation must be List[JSON] which is alias for MutableMapping[str, Any] but annotations must be List[str] type.

Expected behavior
Trigger annotation are expected to be created.

Screenshots
Image

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

Data FactoryMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions