Azure / Azure/azure-rest-api-specs-examples

Urgent: Sudden issue started with GetDataFactoryPipeline function

Open
#4,825 5 comments 0 reactions 1 assignee Assigned to @welovej View on GitHub
customer-reported issue-addressed question
Dominant language
No language data
Stars
40
Forks
23
Avg merge
23h 36m
Merged PRs (30d)
172

Description

### Link to sample

_No response_

### Library name and version

Package= Azure.ResourceManager.DataFactory, Version=1.1.0

### Language of the Sample

- [X] C#/.NET
- [ ] Java
- [ ] JavaScript/TypedScript
- [ ] Python
- [ ] Golang
- [ ] Other - Please specify in Issue details field

### Sample Issue Type

- [x] Sample not working
- [ ] Sample missing
- [ ] Do not understand sample

### Issue details

I've been using the Azure.ResourceManager.DataFactory SDK and recently encountered an issue. Previously, I used the GetDataFactoryPipeline method to retrieve my pipeline details and then run it in the next step. This setup has been working fine. However, yesterday, when I tried to run the pipeline, it threw an exception from the GetDataFactoryPipeline method.

The stack trace is:
---------------------------------------------------------------------------------
System.InvalidCastException
HResult=0x80004002
Message=Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'System.String'.
Source=Azure.Core.Expressions.DataFactory
StackTrace:
at Azure.Core.Expressions.DataFactory.DataFactoryElementJsonConverter.Deserialize[T](JsonElement json)
at Azure.Core.Expressions.DataFactory.DataFactoryElementJsonConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.ReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Azure.ResourceManager.DataFactory.Models.WebActivity.DeserializeWebActivity(JsonElement element, ModelReaderWriterOptions options)
at Azure.ResourceManager.DataFactory.Models.PipelineActivity.DeserializePipelineActivity(JsonElement element, ModelReaderWriterOptions options)
at Azure.ResourceManager.DataFactory.DataFactoryPipelineData.DeserializeDataFactoryPipelineData(JsonElement element, ModelReaderWriterOptions options)
at Azure.ResourceManager.DataFactory.PipelinesRestOperations.Get(String subscriptionId, String resourceGroupName, String factoryName, String pipelineName, String ifNoneMatch, CancellationToken cancellationToken)
at Azure.ResourceManager.DataFactory.DataFactoryPipelineCollection.Get(String pipelineName, String ifNoneMatch, CancellationToken cancellationToken)
at Azure.ResourceManager.DataFactory.DataFactoryResource.GetDataFactoryPipeline(String pipelineName, String ifNoneMatch, CancellationToken cancellationToken)
at Domains.Datafactory.DatafactoryDomain.d__11.MoveNext() in D:\Project\Arne_Clo\azure-data-factory-integration-dot-net\Domains\Datafactory\DatafactoryDomain.cs:line 73

Above stack track trace states that something strange is released and the object is changed from System.String to System.Collections.Generic.Dictionary`2[System.String,System.Object].

I did not see any parameter changes for the same function (GetDataFactoryPipeline), I believe this is an internal issue and want this issue to address ASAP.

![image](https://github.com/user-attachments/assets/81695e90-3a72-4600-b236-2abe86031c75)

### Expected behavior

_No response_

### Actual behavior

_No response_

### Reproduction Steps

_No response_

### Environment

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win-x64

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.