tfsaggregator / aggregator-cli

A new version of Aggregator aiming at Azure DevOps (ex Visual Studio Team Services)
https://tfsaggregator.github.io/
Apache License 2.0
73 stars 32 forks source link

Problems with recent deployment for updated rule #232

Closed jprettyman closed 3 years ago

jprettyman commented 3 years ago

I deployed an updated rule and the system now fails to run. I deployed to a test area and things worked fine. No errors on deployment and the rule runs fine using the invoke rule. the message in the monitor for that instance is as follows: (I am at a loss on how to fix this.)

2021-02-22 16:34:16.891 Executing 'Functions.TaskRollUp' (Reason='This function was programmatically called via the host APIs.', Id=fc6e6aa5-a31b-499e-a678-f6237dcbe5d5) Information 2021-02-22 16:34:17.229 Error 2021-02-22 16:34:17.229 Function compilation error Error 2021-02-22 16:34:17.231 run.csx(3,1): warning AF006: The reference '../bin/aggregator-webshared.dll' is invalid. If you are attempting to add a framework reference, please remove the '.dll' file extension. Warning 2021-02-22 16:34:17.289 run.csx(3,1): error CS0006: Metadata file '../bin/aggregator-webshared.dll' could not be found Error 2021-02-22 16:34:17.290 run.csx(14,23): warning CS1702: Assuming assembly reference 'Microsoft.Extensions.Logging.Abstractions, Version=3.1.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'aggregator-function' matches identity 'Microsoft.Extensions.Logging.Abstractions, Version=3.1.11.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.Extensions.Logging.Abstractions', you may need to supply runtime policy Warning 2021-02-22 16:34:17.424 run.csx(15,31): error CS1061: 'HttpRequest' does not contain a definition for 'GetWebHookEvent' and no accessible extension method 'GetWebHookEvent' accepting a first argument of type 'HttpRequest' could be found (are you missing a using directive or an assembly reference?) Error 2021-02-22 16:34:17.424 run.csx(16,24): warning CS1701: Assuming assembly reference 'Microsoft.AspNetCore.Mvc.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'aggregator-function' matches identity 'Microsoft.AspNetCore.Mvc.Abstractions, Version=3.1.11.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Mvc.Abstractions', you may need to supply runtime policy Warning 2021-02-22 16:34:17.508 Script compilation failed. Error 2021-02-22 16:34:17.508 Executed 'Functions.TaskRollUp' (Failed, Id=fc6e6aa5-a31b-499e-a678-f6237dcbe5d5, Duration=545ms) Error 2021-02-22 16:34:17.514 Script compilation failed. Error

giuliov commented 3 years ago

The runtime version is older than the one referenced by the function. You can fix using the update.instance command.

jprettyman commented 3 years ago

I am also getting the following message each time I log in: [2021-02-23 06:01:17Z] A new version (v1.0.1) of Aggregator CLI is available, please upgrade. [2021-02-23 06:01:17Z] aggregator-cli v1.0.1 (build: 1.0.1.0 Release) (c) Copyright c TFS Aggregator Team

As far as I can tell, I have the latest. Is there anything I should do? Joe Phy


From: Giulio Vian notifications@github.com Sent: Monday, February 22, 2021 4:02 PM To: tfsaggregator/aggregator-cli aggregator-cli@noreply.github.com Cc: jprettyman jprettyman@outlook.com; Author author@noreply.github.com Subject: Re: [tfsaggregator/aggregator-cli] Problems with recent deployment for updated rule (#232)

The runtime version is older than the one referenced by the function. You can fix using the update.instance command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftfsaggregator%2Faggregator-cli%2Fissues%2F232%23issuecomment-783706791&data=04%7C01%7C%7C15b17ec7681f4ee022c708d8d77d9a88%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496281742993841%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DnYeVfZNTcA3D%2FlY%2FabwvZsEiTCj%2BiIv4lqTQoDLuwg%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF5W3IM4GXQSJDQQT4C765LTALIAZANCNFSM4YA3VNQA&data=04%7C01%7C%7C15b17ec7681f4ee022c708d8d77d9a88%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496281743003799%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2uV0MjRG7diF0%2BzUwFK9IgXejfX16ePOkgqhvmi28k4%3D&reserved=0.

giuliov commented 3 years ago

The update message is a small bug.

I suggested to use the update.instance command to update the runtime of the function to fix the issue.

You should be able to see the runtime version in use running the list.instances command.

jprettyman commented 3 years ago

I am having so much trouble this week with the deployment. I verified that the current version is deployed. When I run a test in the Service hook for workitem.updated I get this message:

Status Code: 401 Reason Phrase: Unauthorized HTTP Version: 1.1 Headers: { Request-Context: appId=cid-v1:f77bc5ea-eeba-4afa-9cbe-4971ea62ea83 Date: Tue, 23 Feb 2021 14:20:02 GMT Content-Length: 0 } The aggregator has a correct PAT, I have authorization, just cannot get it to work. I am completely baffled.

Joe Phy


From: Giulio Vian notifications@github.com Sent: Tuesday, February 23, 2021 7:31 AM To: tfsaggregator/aggregator-cli aggregator-cli@noreply.github.com Cc: jprettyman jprettyman@outlook.com; Author author@noreply.github.com Subject: Re: [tfsaggregator/aggregator-cli] Problems with recent deployment for updated rule (#232)

The update message is a small bug.

I suggested to use the update.instancehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftfsaggregator.github.io%2Fdocs%2Fv3%2Fcommands%2Finstance-commands%2F%23updateinstance&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956137708%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QPq1DLNyiv1pfXrsbm%2F0LLXiPWQqpVa4xr7RQCokS5U%3D&reserved=0 command to update the runtime of the function to fix the issue.

You should be able to see the runtime version in use running the list.instanceshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftfsaggregator.github.io%2Fdocs%2Fv3%2Fcommands%2Finfo-commands%2F%23listinstances&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956147660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=N5DfP2HStl%2BXkwixZUwNP%2BjhqbQ0xSBFLd4Ha7gtX2M%3D&reserved=0 command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftfsaggregator%2Faggregator-cli%2Fissues%2F232%23issuecomment-784204532&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956147660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k1hmNAWiDK9Xw52ohmyb2Jc5wrXfEPf9h93OOv64beY%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF5W3IPROWNYA2YJ2K3BJMLTAOU3NANCNFSM4YA3VNQA&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956157617%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=onc8AX%2FtTWLPU%2Fi30or4n2WJ0seigw4xA%2BAG43uj96I%3D&reserved=0.

jprettyman commented 3 years ago

Some messsages from applicaiton insight.

Inner exception System.EntryPointNotFoundException handled at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw: at System.Collections.Generic.IDictionary`2.Add (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at aggregator.HttpExtensions.AddCustomHeaders (aggregator-webshared, Version=1.0.1.0, Culture=neutral, PublicKeyToken=nullaggregator-webshared, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null: /home/runner/work/aggregator-cli/aggregator-cli/src/aggregator-webshared/ ​

at Submission#0+d1.MoveNext (f-TaskRollUp1558282045, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullf-TaskRollUp1558282045, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null: D:\home\site\wwwroot\TaskRollUp\run.csxf-TaskRollUp1558282045, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null: 16)

Joe Phy


From: Giulio Vian notifications@github.com Sent: Tuesday, February 23, 2021 7:31 AM To: tfsaggregator/aggregator-cli aggregator-cli@noreply.github.com Cc: jprettyman jprettyman@outlook.com; Author author@noreply.github.com Subject: Re: [tfsaggregator/aggregator-cli] Problems with recent deployment for updated rule (#232)

The update message is a small bug.

I suggested to use the update.instancehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftfsaggregator.github.io%2Fdocs%2Fv3%2Fcommands%2Finstance-commands%2F%23updateinstance&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956137708%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QPq1DLNyiv1pfXrsbm%2F0LLXiPWQqpVa4xr7RQCokS5U%3D&reserved=0 command to update the runtime of the function to fix the issue.

You should be able to see the runtime version in use running the list.instanceshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftfsaggregator.github.io%2Fdocs%2Fv3%2Fcommands%2Finfo-commands%2F%23listinstances&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956147660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=N5DfP2HStl%2BXkwixZUwNP%2BjhqbQ0xSBFLd4Ha7gtX2M%3D&reserved=0 command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftfsaggregator%2Faggregator-cli%2Fissues%2F232%23issuecomment-784204532&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956147660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k1hmNAWiDK9Xw52ohmyb2Jc5wrXfEPf9h93OOv64beY%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF5W3IPROWNYA2YJ2K3BJMLTAOU3NANCNFSM4YA3VNQA&data=04%7C01%7C%7C3ed3b0b0e170417a174408d8d7ff5710%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496838956157617%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=onc8AX%2FtTWLPU%2Fi30or4n2WJ0seigw4xA%2BAG43uj96I%3D&reserved=0.

giuliov commented 3 years ago

The Service hook uses Azure Function key for authentication: you can check if matches looking both at Azure Portal and the Service hook configuration

jprettyman commented 3 years ago

Yes, the function keys were different than what was in the service hooks. I updated them, and it fails with this error.

2021-02-23 14:21:46.183 Executing 'Functions.TaskRollUp' (Reason='This function was programmatically called via the host APIs.', Id=184fe680-73d9-470d-a88e-b15bd7e0ea08) Information 2021-02-23 14:21:46.191 Aggregator v1.0.1 executing rule 'TaskRollUp' Information 2021-02-23 14:21:46.264 Entry point was not found. Error 2021-02-23 14:21:46.264 Executed 'Functions.TaskRollUp' (Failed, Id=184fe680-73d9-470d-a88e-b15bd7e0ea08, Duration=23ms) Error 2021-02-23 14:21:46.267 Entry point was not found.

Joe Phy


From: Giulio Vian notifications@github.com Sent: Tuesday, February 23, 2021 8:36 AM To: tfsaggregator/aggregator-cli aggregator-cli@noreply.github.com Cc: jprettyman jprettyman@outlook.com; Author author@noreply.github.com Subject: Re: [tfsaggregator/aggregator-cli] Problems with recent deployment for updated rule (#232)

The Service hook uses Azure Function key for authentication: you can check if matches looking both at Azure Portal and the Service hook configuration

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftfsaggregator%2Faggregator-cli%2Fissues%2F232%23issuecomment-784246585&data=04%7C01%7C%7C50be04d49ef94fa02c6408d8d8086fff%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496878030185059%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tbMtW7tYdtCwcQw82oav6ylootgv2fNeK6iSf04LmfI%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF5W3IJYYECINLUDUM5HOX3TAO4PTANCNFSM4YA3VNQA&data=04%7C01%7C%7C50be04d49ef94fa02c6408d8d8086fff%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496878030195014%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6eCAVkC6fcJg7aXpIiPoP5PTOFInXR2rJizm2XStbEo%3D&reserved=0.

jprettyman commented 3 years ago

I wanted to provide an update on this issue. It is now working. It appears that the update process was not being complete. The application said it was complete, but the files never made it to Azure. We ended up copying files manually and got it to run.