Description
On our Jenkins build agent we are also stress testing our server a little bit, and every hundredth build or so fails with an error similar to
...|Microsoft.AspNetCore.Mvc.Routing.DefaultApiVersionRoutePolicy|ERROR|Request matched multiple actions resulting in ambiguity. Matching actions:
OUR_NAMESPACE.Controllers.InventoryController.CheckInventoryAsync (OUR_MODULE)
the odd thing, it is always just one matching action, and as I mentioned before, it happens very irregularly. So far, the issue could always be resolved, by restarting the build.
We looked into it, and saw that before the error is created, only the distinct matched actions are being selected: https://github.com/Microsoft/aspnet-api-versioning/blob/0ec42dc0685f7d8292bcbda202498c77591cae02/src/Microsoft.AspNetCore.Mvc.Versioning/Routing/DefaultApiVersionRoutePolicy.cs#L183
Our best guess so far is, that for some weird reason, sometimes the same action is registered multiple times. This would explain why the error can't really be reproduced, and why the error message shows only one action.