{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2439","repository_url":"https://api.github.com/repos/Azure/azure-functions-host","labels_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2439/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2439/comments","events_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2439/events","html_url":"https://github.com/Azure/azure-functions-host/issues/2439","id":298877503,"number":2439,"title":"Function Runtime tries to execute function that has compilation errors ","user":{"login":"pratapprashant","id":19914955,"avatar_url":"https://avatars1.githubusercontent.com/u/19914955?v=4","gravatar_id":"","url":"https://api.github.com/users/pratapprashant","html_url":"https://github.com/pratapprashant","followers_url":"https://api.github.com/users/pratapprashant/followers","following_url":"https://api.github.com/users/pratapprashant/following{/other_user}","gists_url":"https://api.github.com/users/pratapprashant/gists{/gist_id}","starred_url":"https://api.github.com/users/pratapprashant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratapprashant/subscriptions","organizations_url":"https://api.github.com/users/pratapprashant/orgs","repos_url":"https://api.github.com/users/pratapprashant/repos","events_url":"https://api.github.com/users/pratapprashant/events{/privacy}","received_events_url":"https://api.github.com/users/pratapprashant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"paulbatum","id":10663,"avatar_url":"https://avatars2.githubusercontent.com/u/10663?v=4","gravatar_id":"","url":"https://api.github.com/users/paulbatum","html_url":"https://github.com/paulbatum","followers_url":"https://api.github.com/users/paulbatum/followers","following_url":"https://api.github.com/users/paulbatum/following{/other_user}","gists_url":"https://api.github.com/users/paulbatum/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbatum/subscriptions","organizations_url":"https://api.github.com/users/paulbatum/orgs","repos_url":"https://api.github.com/users/paulbatum/repos","events_url":"https://api.github.com/users/paulbatum/events{/privacy}","received_events_url":"https://api.github.com/users/paulbatum/received_events","type":"User","site_admin":false},"assignees":[{"login":"paulbatum","id":10663,"avatar_url":"https://avatars2.githubusercontent.com/u/10663?v=4","gravatar_id":"","url":"https://api.github.com/users/paulbatum","html_url":"https://github.com/paulbatum","followers_url":"https://api.github.com/users/paulbatum/followers","following_url":"https://api.github.com/users/paulbatum/following{/other_user}","gists_url":"https://api.github.com/users/paulbatum/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbatum/subscriptions","organizations_url":"https://api.github.com/users/paulbatum/orgs","repos_url":"https://api.github.com/users/paulbatum/repos","events_url":"https://api.github.com/users/paulbatum/events{/privacy}","received_events_url":"https://api.github.com/users/paulbatum/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Azure/azure-functions-host/milestones/24","html_url":"https://github.com/Azure/azure-functions-host/milestone/24","labels_url":"https://api.github.com/repos/Azure/azure-functions-host/milestones/24/labels","id":2551635,"number":24,"title":"Active Questions","description":"","creator":{"login":"christopheranderson","id":2252976,"avatar_url":"https://avatars2.githubusercontent.com/u/2252976?v=4","gravatar_id":"","url":"https://api.github.com/users/christopheranderson","html_url":"https://github.com/christopheranderson","followers_url":"https://api.github.com/users/christopheranderson/followers","following_url":"https://api.github.com/users/christopheranderson/following{/other_user}","gists_url":"https://api.github.com/users/christopheranderson/gists{/gist_id}","starred_url":"https://api.github.com/users/christopheranderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopheranderson/subscriptions","organizations_url":"https://api.github.com/users/christopheranderson/orgs","repos_url":"https://api.github.com/users/christopheranderson/repos","events_url":"https://api.github.com/users/christopheranderson/events{/privacy}","received_events_url":"https://api.github.com/users/christopheranderson/received_events","type":"User","site_admin":false},"open_issues":66,"closed_issues":43,"state":"open","created_at":"2017-05-30T20:58:47Z","updated_at":"2018-02-26T18:46:22Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2018-02-21T08:21:19Z","updated_at":"2018-02-27T02:35:27Z","closed_at":null,"author_association":"NONE","body":"I have an EventHub trigger function app. Everything works fine. But due to environment issue or deployment issues, my function app fails to compile. \r\nWhen my function code is failing to run, Function Runtime still reads messages from the EventHub, tries to execute my function and mark these messages from EventHub as processed (via checkpoint api). \r\n\r\n#### Investigative information\r\n\r\n2018-02-21T06:40:55.148 [Info] Function started (Id=a2ea1702-3bf9-4351-9348-1fa662ac295b)\r\n2018-02-21T06:40:55.164 [Error] Function compilation error\r\n2018-02-21T06:40:55.164 [Error] run.csx(25,26): error CS0103: The name 'NLog' does not exist in the current context\r\n\r\n#### Expected behavior \r\n\r\nIf there are any compilation errors in function code, Function Runtime shouldn’t read messages from EventHub nor mark them as processed.\r\n\r\n#### Repro steps\r\n\r\n1. Create an EventHub trigger function app\r\n2. Add NLog NuGet package\r\n3. Add this line : var logger = NLog.LogManager.GetCurrentClassLogger();\r\n4. Now push a message to EventHub (working condition)\r\n5. Get the sequence number from the checkpoint data (from the storage blob)\r\n6. Failing condition : in the project.json file change the NLog version to an unknown version. \r\n7. Change the version from  \"NLog\":\"4.4.12\" to  \"NLog\":\"44.12\"\r\n8. Now push another message to EventHub\r\n9. If you check the sequence number again, it will increase. But message from the EventHub didn’t get processed. \r\n\r\n#### Repro code\r\n\r\nrun.csx\r\n`\r\npublic static void Run(string myEventHubMessage, TraceWriter log)\r\n{\r\n\tvar logger = NLog.LogManager.GetCurrentClassLogger();\r\n}\r\n`\r\n\r\nworking project.json\r\n`\r\n{\r\n    \"frameworks\": {\r\n        \"net46\": {\r\n            \"dependencies\": {\r\n                \"NLog\":\"4.4.12\"\r\n            }\r\n        }\r\n    }\r\n}\r\n`\r\nfailing project.json\r\n`\r\n{\r\n    \"frameworks\": {\r\n        \"net46\": {\r\n            \"dependencies\": {\r\n                \"NLog\":\"44.12\"\r\n            }\r\n        }\r\n    }\r\n}\r\n`"},"comment":{"url":"https://api.github.com/repos/Azure/azure-functions-host/issues/comments/368726355","html_url":"https://github.com/Azure/azure-functions-host/issues/2439#issuecomment-368726355","issue_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2439","id":368726355,"user":{"login":"tobiasb","id":54142,"avatar_url":"https://avatars1.githubusercontent.com/u/54142?v=4","gravatar_id":"","url":"https://api.github.com/users/tobiasb","html_url":"https://github.com/tobiasb","followers_url":"https://api.github.com/users/tobiasb/followers","following_url":"https://api.github.com/users/tobiasb/following{/other_user}","gists_url":"https://api.github.com/users/tobiasb/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasb/subscriptions","organizations_url":"https://api.github.com/users/tobiasb/orgs","repos_url":"https://api.github.com/users/tobiasb/repos","events_url":"https://api.github.com/users/tobiasb/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasb/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T02:35:27Z","updated_at":"2018-02-27T02:35:27Z","author_association":"NONE","body":"I'll see if I can escalate this because it would be extremely unfortunate if that would prevent us from using the Function event hub binding for reliable messaging.\r\n\r\n> If a customer forgets the try/catch, then their function will be \"stuck\" on that bad message, retrying it over and over\r\n\r\nThat's how the `EventProcessorHost` works as well. \r\n\r\nI see where you're coming from but if the customer forgets a `try/catch` and is on a consumption plan and doesn't realize they aren't successfully processing messages, maybe they shouldn't be using Azure at all ;-)"}}
{"actor":{"display_login":"tobiasb"}}