Azure / Azure/azure-functions-host
WebFunctionsManager#CreateOrUpdate does not set Files property in response
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
# Investigative information
Missing content of property `Files` in return value when calling `WebFunctionsManager#CreateOrUpdate`.
Following class contains a field named `Files`, which is not filled by the following call chain:
https://github.com/Azure/azure-functions-host/blob/4556a24d806403e9dc034ce79dcfce7b480cf6dc/src/WebJobs.Script.WebHost/Models/FunctionMetadataResponse.cs#L69
Call chain:
https://github.com/Azure/azure-functions-host/blob/4556a24d806403e9dc034ce79dcfce7b480cf6dc/src/WebJobs.Script.WebHost/Controllers/FunctionsController.cs#L68
https://github.com/Azure/azure-functions-host/blob/4556a24d806403e9dc034ce79dcfce7b480cf6dc/src/WebJobs.Script.WebHost/Management/WebFunctionsManager.cs#L87
https://github.com/Azure/azure-functions-host/blob/4556a24d806403e9dc034ce79dcfce7b480cf6dc/src/WebJobs.Script.WebHost/Management/WebFunctionsManager.cs#L162
https://github.com/Azure/azure-functions-host/blob/4556a24d806403e9dc034ce79dcfce7b480cf6dc/src/WebJobs.Script.WebHost/Extensions/FunctionMetadataExtensions.cs#L23
#### Repro steps
Provide the steps required to reproduce the problem:
1. Calling the REST endpoint using a valid payload to create a Function
2. Await HTTP response and investigate the JSON payload. The `files` property is empty.
#### Expected behavior
- `files` property should be filled with the passed values of the POST payload.
#### Actual behavior
- `files` property is an empty JSON object
#### Known workarounds
none
#### Related information
Provide any related information
* Programming language used: Go (azure-sdk-for-go)
Source
```go
appsClient := web.NewAppsClientWithBaseURI(resourceEndpoint, subscriptionID)
resp, err := client.GetFunction(ctx, resourceGroup, functionAppName, functionName)
resp.Files // should be a filled map, but it's empty
```
Contributor guide
Research direction
Start with FunctionMetadataResponse.cs and trace the listed path through FunctionsController.cs, WebFunctionsManager.cs, and FunctionMetadataExtensions.cs. Reproduce the CreateOrUpdate REST request and inspect its JSON response; done means the files property contains the values supplied in the POST payload rather than an empty object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100