Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment machines exception - The resource 'machines' was not found. #213

Open
MarkSiedle opened this issue Dec 18, 2017 · 1 comment
Labels

Comments

@MarkSiedle
Copy link
Contributor

MarkSiedle commented Dec 18, 2017

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.

Source (with example): https://help.octopusdeploy.com/discussions/problems/65832

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant