Azure-Samples / LUIS-DevOps-Template

Template repo encapsulating best engineering practices and DevOps using GitHub Actions for the development of a LUIS application.
MIT License
21 stars 17 forks source link

NLU.DevOps tools System.Net.Http.HttpRequestException: Resource temporarily unavailable #41

Closed ikivanc closed 4 years ago

ikivanc commented 4 years ago

I've received below error in my pipeline in "Test Luis Model" step. When I try to run this command in my local environment, it works without a problem.

I'm using westeurope endpoint.

image

`info: NLU.DevOps.CommandLine.Test.TestCommand[0] Running tests against NLU model...

at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.Rest.RetryDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.PredictionOperations.GetVersionPredictionWithHttpMessagesAsync(Guid appId, String versionId, PredictionRequest predictionRequest, Nullable1 verbose, Nullable1 showAllIntents, Nullable1 log, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.PredictionOperationsExtensions.GetVersionPredictionAsync(IPredictionOperations operations, Guid appId, String versionId, PredictionRequest predictionRequest, Nullable1 verbose, Nullable1 showAllIntents, Nullable1 log, CancellationToken cancellationToken) at NLU.DevOps.Luis.LuisTestClient.QueryAsync(PredictionRequest predictionRequest, CancellationToken cancellationToken) in D:\a\1\s\src\NLU.DevOps.LuisV3\LuisTestClient.cs:line 51 at NLU.DevOps.Luis.LuisNLUTestClient.TestAsync(JToken query, CancellationToken cancellationToken) in D:\a\1\s\src\NLU.DevOps.LuisV3\LuisNLUTestClient.cs:line 53 at NLU.DevOps.CommandLine.EnumerableExtensions.<>c__DisplayClass0_02.<<SelectAsync>g__selectWithIndexAsync|1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at NLU.DevOps.CommandLine.EnumerableExtensions.SelectAsync[T,TResult](IEnumerable1 items, Func`2 selector, Int32 degreeOfParallelism) in D:\a\1\s\src\NLU.DevOps.CommandLine\EnumerableExtensions.cs:line 36 at NLU.DevOps.CommandLine.Test.TestCommand.RunAsync() in D:\a\1\s\src\NLU.DevOps.CommandLine\Test\TestCommand.cs:line 51 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at NLU.DevOps.CommandLine.Test.TestCommand.Main() in D:\a\1\s\src\NLU.DevOps.CommandLine\Test\TestCommand.cs:line 29 at NLU.DevOps.CommandLine.Program.Run(ICommand command) in D:\a\1\s\src\NLU.DevOps.CommandLine\Program.cs:line 36 at NLU.DevOps.CommandLine.Program.Main(String[] args) in D:\a\1\s\src\NLU.DevOps.CommandLine\Program.cs:line 18

[error]Process completed with exit code 134.`

ikivanc commented 4 years ago

When I track the logs, I'm able to see a LUIS app created and all credentials retrieved in pipeline. I think the issue with publish, it can not be published and then test can not reach to prediction endpoint.

I disabled the last step, "Delete the LUIS test target app". Now I'm able to see the LUIS app created by pipeline. When I check publish settings, it seems like app cannot be published. Please see the status below. image

I may be related with this task

ikivanc commented 4 years ago

I found the blocker, LUIS exceeded rate limit for pricing, however we only free F0 option. Even I got this error, It shows as step is passed. This is the main reason for above error.

image

@AndyCW Is there a way to upgrade this plan or how we can publish and prepare the endpoint?

AndyCW commented 4 years ago

This is a great catch @ikivanc . They only just released the --wait on the bf luis\:train :run CLI and I think they are polling too often. Previous versions of the pipeline had our own manual polling - will have to revert to that.

AndyCW commented 4 years ago

botframework-cli team are implementing a fix