最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

No agent found that satisfies the specified demands in Azure DevOps On-Prem - Stack Overflow

programmeradmin0浏览0评论

If I run a default pipeline on my company's on-prem Azure DevOps, it runs with no issue. However, when I try running with an AI code review DevOps extension, it gives the following error. I censored the pool name to avoid giving my company name.

##[error]No agent found in pool *** which satisfies the specified demands: npm, Agent.Version -gtVersion 3.225.2

I tried running the pipeline on my personal Azure DevOps on cloud so it can't be an issue with the extension or the yaml configuration. Furthermore, I looked at the Agent version on the Agents tab and it says I have agent version 3.225.2 so not sure why the error message has this part: Agent.Version -gtVersion 3.225.2

This is how my .yml file looks like right now on the on-prem version of ADO:

trigger: none

pool:
  name: ***

variables:
  name: System.Debug
  value: false # enable for more info
  group: open-ai

steps:
- checkout: self
  persistCredentials: true

- task: pretius-openai-reviewer@0
  displayName: 'Code review'
  inputs:
    openaiApiKey: '$(openai-api-key)'
    openaiModel: gpt-3.5-turbo
    openaiApiRateLimitTier: free
    repositoryExcludedFiles: publish.bat
    openaiReproducibleOutputs: True
    openaiApiTimeout: 600000
    openaiMaxTokens: 4000

Using it on the online version on my personal account, this is how it looks like:

trigger: none

pool:
  vmImage: "ubuntu-latest"

variables:
  name: System.Debug
  value: false # enable for more info
  group: open-ai

steps:
- checkout: self
  persistCredentials: true
  
- task: pretius-openai-reviewer@0
  displayName: 'Code review'
  inputs:
    openaiApiKey: '$(openai-api-key)'
    openaiModel: gpt-3.5-turbo
    openaiApiRateLimitTier: tier-1
    repositoryExcludedFiles: publish.bat
    openaiReproducibleOutputs: True
    openaiApiTimeout: 600000
    openaiMaxTokens: 4000

If I run a default pipeline on my company's on-prem Azure DevOps, it runs with no issue. However, when I try running with an AI code review DevOps extension, it gives the following error. I censored the pool name to avoid giving my company name.

##[error]No agent found in pool *** which satisfies the specified demands: npm, Agent.Version -gtVersion 3.225.2

I tried running the pipeline on my personal Azure DevOps on cloud so it can't be an issue with the extension or the yaml configuration. Furthermore, I looked at the Agent version on the Agents tab and it says I have agent version 3.225.2 so not sure why the error message has this part: Agent.Version -gtVersion 3.225.2

This is how my .yml file looks like right now on the on-prem version of ADO:

trigger: none

pool:
  name: ***

variables:
  name: System.Debug
  value: false # enable for more info
  group: open-ai

steps:
- checkout: self
  persistCredentials: true

- task: pretius-openai-reviewer@0
  displayName: 'Code review'
  inputs:
    openaiApiKey: '$(openai-api-key)'
    openaiModel: gpt-3.5-turbo
    openaiApiRateLimitTier: free
    repositoryExcludedFiles: publish.bat
    openaiReproducibleOutputs: True
    openaiApiTimeout: 600000
    openaiMaxTokens: 4000

Using it on the online version on my personal account, this is how it looks like:

trigger: none

pool:
  vmImage: "ubuntu-latest"

variables:
  name: System.Debug
  value: false # enable for more info
  group: open-ai

steps:
- checkout: self
  persistCredentials: true
  
- task: pretius-openai-reviewer@0
  displayName: 'Code review'
  inputs:
    openaiApiKey: '$(openai-api-key)'
    openaiModel: gpt-3.5-turbo
    openaiApiRateLimitTier: tier-1
    repositoryExcludedFiles: publish.bat
    openaiReproducibleOutputs: True
    openaiApiTimeout: 600000
    openaiMaxTokens: 4000
Share Improve this question edited Feb 8 at 17:29 Rui Jarimba 18.2k11 gold badges64 silver badges98 bronze badges Recognized by CI/CD Collective asked Feb 3 at 18:06 Hassaan FaruqHassaan Faruq 111 silver badge2 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

A .yml task can impose demands when choosing an agent to initiate your job run. If the pipeline cannot find an agent with these capabilities, then you will receive the error message shown.

The two demands the task is forcing upon you are:

  • npm
  • Agent.Version -gtVersion 3.225.2

You stated that agent version is already on the correct version for both your on-prem and cloud ADO. This assumes that your self-hosted build agent is failing to meet the npm capability.

The ubuntu-latest agent has this set of software installed : https://github/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

Agent capabilities are automatically detected based on installed software on the agent.


Solution one: Install npm on your self-hosted agents


Solution two: Add npm as a user-defined capability on your agents in your self-hosted pool

This should allow your pipeline to run, but may result in failure if the custom task you are using requires npm to be installed.

This capability will need to be added to all agents in your *** pool.


发布评论

评论列表(0)

  1. 暂无评论