-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Pr check for agent-base (#20195)
* Add Pr check for agent-base - added pr checks for agent-base - added troubleshooting section to the docs * Add Pr check for agent-base - Merged two method in one - Fixed powershell test error
- Loading branch information
1 parent
70b4018
commit ec83c35
Showing
5 changed files
with
121 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Validation Errors in the pipeline | ||
|
||
## findNonUniqueTaskLib section | ||
The check is looking for duplicate usage of [azure-pipelines-task-lib](https://www.npmjs.com/package/azure-pipelines-task-lib).\ | ||
The `azure-pipelines-task-lib` was designed as a singleton and there might be errors if the task uses different package versions. | ||
|
||
If you have common npm packages as the task dependency, make sure the all dependencies have same version of `azure-pipelines-task-lib` in the task.\ | ||
As a possible solution you also can remove these package versions through the `make.json` file, for example: | ||
|
||
```json | ||
{ | ||
"rm": [ | ||
{ | ||
"items": [ | ||
"node_modules/azure-pipelines-tasks-java-common/node_modules/azure-pipelines-task-lib", | ||
], | ||
"options": "-Rf" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## findIncompatibleAgentBase section | ||
The checks will throws error if the [agent-base](https://www.npmjs.com/package/agent-base) package with version below 6.0.2 was found. \ | ||
Usually this package comes with `azure-pipelines-tasks-azure-arm-rest` package. | ||
|
||
The `agent-base` package below 6.0.2 does not work with node 10+ and the task will fail if the cx will try to use it with proxy. \ | ||
To fix the check you need to upgrade it on 6.0.2 at least, for it, please, upgrade your common packages for a new version(if avaiable). \ | ||
Another option is to install agent-base v6+ in the task and remove existing one using the `make.json` file using path from the error. | ||
|
||
```json | ||
{ | ||
"rm": [ | ||
{ | ||
"items": [ | ||
"node_modules/https-proxy-agent/node_modules/agent-base", | ||
"node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/agent-base" | ||
], | ||
"options": "-Rf" | ||
} | ||
] | ||
} | ||
``` |