-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cannot create WebActivity headers #39187
Comments
Thank you for reporting the issue. Could you please share the name of the SDK you are trying to use? |
Yes. This is the package I am using.
|
What's the error you see here? From my perspective, you are using expression, so you can try something like: var uri = DataFactoryElement<string>.FromExpression($"@concat($"@concat('https://{functionAppName}.azurewebsites.net/api/SyncPermissionsFunction?organization={org.Url}&code=',pipeline().parameters.functionkey)");
var webActivity = new WebActivity("SyncPermissionsFunction", WebActivityMethod.Get, uri); |
I’m trying to pass in the headers. And the headers should be treated like an object or a dictionary. As of now it only takes in a string, and there is no way for me to construct headers if it is of type string. I have tried the whole day to construct the headers from the SDK and have no luck. Can you try on your side to construct a webactivity with headers? |
I'm facing same problem but from other side, I want to run GetDataFactoryPipelines method on DataFactoryResource class and it is throwing exception Turns out deserializing code wants to read String, but JSON returned from API has |
Correct,
That’s correct. I get the same error as well. It expects a json object but the SDK property requires headers to be passed in a string. A WebActivity without headers is not going to do much..we need this fixed. Or might have to revert back to the old SDK. |
Is there any update on this? I am happy to help and fix this issue as well so my team can leverage this feature. It's hard to use a webactivity without the ability to pass in headers. |
I tested Azure/azure-rest-api-specs#26334 and works perfect for me... Not sure how to raise priority on this, because even most basic stuff like fetching pipelines doesn't work, if headers property is set.... |
@ArthurMa1978 , still no traction on this issue, can we proceed with the above PR? We need headers to work for webactivity in Azure Data Factory. |
Not sure if I should be angry or just sad... I even went as far as opening PR... This API is totally broken, I don't get it why is this not getting merged... Is ADF dead product? Should we start transitioning away from it? |
I’m wondering the same here as well. Let’s see if we can escalate this together to someone in Azure since no response from here much. Getting very frustrated because this is the core functionality of a webactivity. |
It is not just about not being able to set WebActivity... |
I am from ADF team. Thanks for feedback we are taking look at this issue. And trying to fix it. |
@ruowan can this be closed, or waiting for NuGet to be published? |
Yes. The nuget package will be released by the end of Jan. |
Library name and version
Azure.ResourceManager.DataFactory v1.0.0-beta.4
Describe the bug
I'm having a lot of trouble creating a web activity headers. I've tried using literal string, secure string, and expression. And none of this worked for the basic scenario such as setting a basic key/value pair.
The previous SDK worked because the headers takes in a dictionary, but the new SDK takes in a DataFactoryElement.
Expected behavior
Generated key value pairs for headers
Actual behavior
Generated value of 0, 1, 2, 3, and each character from the literal string as single item.
Reproduction Steps
// Create pipeline web activity
DataFactoryElement uri = $"@concat('https://{functionAppName}.azurewebsites.net/api/SyncPermissionsFunction?organization={org.Url}&code=',pipeline().parameters.functionkey)";
WebActivity webActivity = new WebActivity("SyncPermissionsFunction", WebActivityMethod.Get, uri);
// This line does not work.
webActivity.Headers = DataFactoryElement.FromLiteral("foo");
Environment
No response
The text was updated successfully, but these errors were encountered: