DNNCommunity/PolyDeploy

No agent found in pool TFSvNext which satisfies the specified demands

pankajmittal2006 opened this issue · 14 comments

Hello Team,

I am using DNN9.2.2 in one of my project. I am working on CI/CD pipeline. I found PolyDeploy to be useful to deploy multiple modules via pipeline.
I have installed the module on one of the environments and created API and Encryption key. I am using Azure DevOps. I have added PolyDeploy task in the pipeline. I am using "TFSvNext" agent in the pipeline. When i am running it, I am getting the following error:
##[Error 1]
No agent found in pool TFSvNext which satisfies the specified demands:
msbuild
visualstudio
vstest
cantarus-deploy-client
Agent.Version -gtVersion 2.144.0

Kindly suggest.

You need to also use the PolyDeploy client installer task, which gets a specific version of the deploy client. This will satisfy the demands of the other task. Hope it helps!

Thanks for quick response. Yes, that error went away. But i am getting new error now which is as follows:

##[section]Starting: Use Cantarus PolyDeploy 0.9.x

Task : Cantarus PolyDeploy for DNN Installer
Description : Get a version of the PolyDeploy Deploy Client
Version : 1.0.3
Author : Engage Software
Help :

Downloading: https://api.github.com/repos/cantarus/PolyDeploy/releases
##[error]Unexpected HTTP response: 403
##[error]Unable to download DeployClient 0.9.x
##[section]Finishing: Use Cantarus PolyDeploy 0.9.x

It seems like its trying to get the latest version but getting an error. When i tried calling the mentioned URL from the browser i.e. "https://api.github.com/repos/cantarus/PolyDeploy/releases" I got the below error:

{"message":"API rate limit exceeded for ... (IP Address). (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}

kindly suggest.

The link : "https://api.github.com/repos/cantarus/PolyDeploy/releases" sometimes worked and sometimes not. Somehow it worked for me for few times and able to download the Deploy Client which is cached by Azure DevOps server. I hope this error is not coming due to IP Whitelisting. We cannot define the list of IP's as for Azure DevOps

Now, when its is trying to execute second task "Deploy with Cantarus PolyDeploy" which requires DeployClient.exe, I am getting the following error:
"##[error]Unhandled: Unable to locate executable file: 'DeployClient.exe'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file."

I don't see any field / parameter where I can provide the path for the "DeployClient.exe". Its by default being cached at some predefined location.

Kindly suggest.

@pankajmittal2006 I haven't run into the rate limit issue or the Unable to locate executable file issue. Are you using a Windows agent? The first task should automatically add the executable to the PATH environment variable so that's it's accessible by the second task.

For the rate limit, I thought I had copied how one of the built-in Azure DevOps tasks was reading releases, but I can add some more error handling around it. Probably not this week, though.

@bdukes , I need to check that with the Server's Administrator. Most probably it would be Windows only but I am not sure about it as of now. Is PolyDeploy only works with Linux agent?

In the first task, I am getting the following message:
"Found tool in cache: DeployClient.exe 0.9.3 x64"

That means its there in cache. But I am bit surprised that how come its not available for use in the second task if its found in the first task. I have attached the document containing screenshots of all the tasks. Kindly let me know if I am doing something wrong.
PolyDeploy Settings.docx

Following information shared by Admin :

  1. all shared Azure DevOps Servers are Windows Servers.
  2. All tools installed during a pipeline forced install would go to Drive:\Build%whateveragent#itsusing%_work_tool%file%.exe.

If these are custom agents, you can add a folder with the deploy client, add that folder to the PATH, and then indicate on the agent that it satisfies the cantarus-deploy-client demand.

@bdukes , It is not a custom agent.

As mentioned above, All tools installed during a pipeline forced install would go to Drive:\Build%whateveragent#itsusing%_work_tool%file%.exe. So, DeployClient.exe would go be available in this folder. Hence the first task is not returning any error.

If I run the pipeline in debug mode to get the error details then the first task would fail always (with 403 error - rate limit issue).

I was going through the documentation for DeployClient (https://github.com/cantarus/PolyDeploy/blob/master/docs/deploy-client.md) that we need to "Place our module .zip files in the same directory as DeployClient.exe." which is not always possible. In my case, I am placing all my .zip files in $(Build.artifactsstagingdirectory) and DeployClient.exe is available at different path (as set by the Admin for the tools).

What kind of rights required on an agent to satisfy : cantarus-deploy-client demand?

Kindly suggest.

@bdukes , As confirmed by Admin, tasks would not be allowed to add anything to the server PATH statement. This means it would not get added to PATH by first task.

Is there any other way to get it working? Kindly suggest.

First, I should point out that the Azure DevOps task that you're asking about isn't part of this repository, it's instead managed as a separate project at https://github.com/EngageSoftware/cantarus-polydeploy-client.

Second, I've released a new version of the task, which exposes a new input to the task which allows you to specify a custom download URL. You can use this to get around the GitHub API limit issue you were seeing (I've not ever experienced that error, FWIW).

Regarding the path to the .zip files, whatever you specify in the task inputs will be copied to the correct directory to work with the deploy client.

Hope it helps.

@bdukes , Thanks for doing the modifications. It is running now but now I start getting the below error message:
Starting installation...
46/46 module archives processed, 44/46 succeeded.
Finished installation in 161812.1834 ms.
##[error]The process 'F:\Build\Agent4_work_tool\DeployClient.exe\0.9.3\x64\DeployClient.exe' failed with exit code 4
##[error]Deploy failed

It seems like some packages have been installed and others are not. Can I get to know that which package got failed and What would be the reason for the same in pipeline task? If the few modules got failed and in turn task also got failed, then all the other modules will be rollback or not ?

Please let me know.

We're tracking that in #13. I don't believe anyone has committed to making those changes, but they shouldn't be too substantial.

@bdukes , Is there any reasonable timeline for this? Kindly let me know so that i can take the decision accordingly.

At the moment there's not anyone planning to work on it, as far as I know, so there is no timeline.