-
Notifications
You must be signed in to change notification settings - Fork 440
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
FunctionMetadataManager.AddMetadataFromCustomProviders logging incorrect function count #10220
Comments
kshyju
added a commit
that referenced
this issue
Jun 14, 2024
kshyju
added a commit
that referenced
this issue
Jun 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
FunctionMetadataManager.AddMetadataFromCustomProviders
method is logging incorrect message.If you look at the code at line 230, we are logging the length of
functionMetadataListArray
, not the actual total function count.azure-functions-host/src/WebJobs.Script/Host/FunctionMetadataManager.cs
Lines 225 to 230 in d1067c5
and the logging action
azure-functions-host/src/WebJobs.Script/Diagnostics/Extensions/LoggerExtension.cs
Lines 129 to 132 in d1067c5
To reproduce this issue, add the below test to FunctionMetadataMangerTests.cs and run. The test will fail in the last assert statement and that confirms that we are logging incorrect message.
In this test, there are 2 providers. The
GetFunctionMetadataAsync
of first provider returns 1 function and the second provider returns 3 functions. So Ideally we should be logging "4 functions found (Custom)". But currently we are logging the provider count (2 functions found (Custom))The text was updated successfully, but these errors were encountered: