question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Maestro++/Darc] Maestro staging swagger broken

See original GitHub issue
  • This issue is blocking This blocks production deployments

  • This issue is causing unreasonable pain

Going to https://maestro-int.westus2.cloudapp.azure.com/swagger/ui/index.html shows:

image

and has a link to https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fmaestro-int.westus2.cloudapp.azure.com%2Fapi%2F2020-02-20%2Fswagger.json

which shows:

{
     "schemaValidationMessages": [
     {
        "level": "error",
        "message": "Can't read from file https://maestro-int.westus2.cloudapp.azure.com/api/2020-02-20/swagger.json"
    }]
}

This is likely related to the deletion of one of the 2020-02-20 controllers here: https://github.com/dotnet/arcade-services/pull/1745.

I attempted to run the https://github.com/dotnet/arcade-services/blob/722d732c4c202f7f92ed96355c7d5c59b719fbf3/src/Maestro/maestro-angular/src/maestro-client/generate-client.cmd script while pointing to the int website, and received an error:

HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error). 
    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() 
    at System.Net.Http.HttpClient.GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 
    at Microsoft.DotNet.SwaggerGenerator.MSBuild.GenerateSwaggerCode.GetSwaggerDocument(String input) in /_/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.MSBuild/GenerateSwaggerCode.cs:line 97 
    at Microsoft.DotNet.SwaggerGenerator.MSBuild.GenerateSwaggerCode.ExecuteAsync() in /_/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.MSBuild/GenerateSwaggerCode.cs:line 57
    at Microsoft.DotNet.SwaggerGenerator.MSBuild.GenerateSwaggerCode.Execute() in /_/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.MSBuild/GenerateSwaggerCode.cs:line 37

which seems related to the fact that we’re already getting the swagger errors.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ChadNedzlekcommented, Oct 19, 2021

I believe we also fixed this already with a revert, so I’m going to move this to rollout?

1reaction
mmitchecommented, Oct 19, 2021

@dotnet/dnceng We need to get better about commenting.

There is often a lot of nuance in code, code that is written specifically to deal with special cases related to external factors (e.g. restrictions in services that we integrate with, specific data shapes), code that is written to deal with unexpected bug fixes, etc. We need to be better about commenting the why. We don’t always need to comment the what, but the why is important.

Even in code that is not particularly nuanced, we need to remember that it might be years between the team writing and reviewing it, and the next person coming along and changing it. Write comments as if no one will remember anything about why a piece of code was written, or what kind of design was chosen and for what reasons.

In the case related to this issue, a few comments in the class header or at the overrides, or even the base class would have made the why of the overrides clear. Otherwise there is no clear indication that the Channel types are different without deep inspection, and what effect this would have.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Swagger to detect breaking API changes
We consider it a breaking change to: remove an endpoint; add a new required request parameter; remove or change the type of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found