You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to get machines for a given environment, the repository is throwing an exception because OctopusClients appears to not substitute the environmentId into the subsequent paging requests, so the environmentId is stripped out of the URL.
Steps to reproduce:
Setup an environment with > 30 machines (you can use the SeaMonkey project to do this easily if it helps)
Setup a C# script using the OctopusClients library to get this environment's machines (async and sync repositories both fail):
Eg.
var env = Repository.Environments.Get("Environments-87");
var test = Repository.Environments.GetMachines(env);
This explodes with the exception: The resource 'machines' was not found.
After a quick debug, it appears two requests are sent. The first works as intended, but then OctopusClients sends through another request with the environmentId stripped out of the URL. Eg. if the first request is: http://localhost:8065/api/environments/Environments-87/machines?skip=0&take=10,
a second request comes through as: http://localhost:8065/api/environments/machines?skip=10&take=10
Note the change in skip/take parameters, so OctopusClients is internally doing paging and something is wrong in there with the URL.
As part of this ticket, we'll need to investigate the other endpoints that the customer was using where this was failing in the same way, and make sure we fix them all.
When trying to get machines for a given environment, the repository is throwing an exception because OctopusClients appears to not substitute the environmentId into the subsequent paging requests, so the environmentId is stripped out of the URL.
Steps to reproduce:
Eg.
This explodes with the exception: The resource 'machines' was not found.
After a quick debug, it appears two requests are sent. The first works as intended, but then OctopusClients sends through another request with the environmentId stripped out of the URL. Eg. if the first request is:
http://localhost:8065/api/environments/Environments-87/machines?skip=0&take=10
,a second request comes through as:
http://localhost:8065/api/environments/machines?skip=10&take=10
Note the change in skip/take parameters, so OctopusClients is internally doing paging and something is wrong in there with the URL.
As part of this ticket, we'll need to investigate the other endpoints that the customer was using where this was failing in the same way, and make sure we fix them all.
Source (with example): https://help.octopusdeploy.com/discussions/problems/65832
The text was updated successfully, but these errors were encountered: