MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
59 stars 14 forks source link

Build Quality Checks getting statusCode=403 #133

Closed fromthewoods closed 3 years ago

fromthewoods commented 3 years ago

We just migrated our collection from TFS 2018 deployment to a new Azure DevOps Server 2020 deployment (new servers). This is a new agent on an existing Build server. Below is a log of a build agent step for Build Quality Checks.

Any help on what endpoint it is failing to talk to and how to resolve would be appreciated. It seems like a proxy issue, but the log shows the correct proxy values.


##[debug]Evaluating condition for step: 'Quality: Check build quality'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> True
##[debug]Result: True
Starting: Quality: Check build quality
==============================================================================
Task         : Build Quality Checks
Description  : Breaks a build based on quality metrics like number of warnings or code coverage.
Version      : 8.0.2
Author       : Microsoft
Help         : [[Docs]](https://github.com/MicrosoftPremier/VstsExtensions/blob/master/BuildQualityChecks/en-US/overview.md)
==============================================================================
##[debug]Using node path: D:\azdev\01\externals\node10\bin\node.exe
##[debug]agent.TempDirectory=D:\azdev\01\_work\_temp
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading INPUT_ALLOWCOVERAGEVARIANCE
##[debug]loading INPUT_ALLOWWARNINGVARIANCE
##[debug]loading INPUT_BASEBRANCHREF
##[debug]loading INPUT_BASEDEFINITIONFILTER
##[debug]loading INPUT_BASEDEFINITIONID
##[debug]loading INPUT_BASEREPOID
##[debug]loading INPUT_CHECKCOVERAGE
##[debug]loading INPUT_CHECKWARNINGS
##[debug]loading INPUT_COVERAGEDELTATYPE
##[debug]loading INPUT_COVERAGEFAILOPTION
##[debug]loading INPUT_COVERAGEPRECISION
##[debug]loading INPUT_COVERAGETHRESHOLD
##[debug]loading INPUT_COVERAGETYPE
##[debug]loading INPUT_COVERAGEUPPERTHRESHOLD
##[debug]loading INPUT_CREATEBUILDISSUES
##[debug]loading INPUT_DISABLECERTCHECK
##[debug]loading INPUT_EVALUATEFILEWARNINGS
##[debug]loading INPUT_EVALUATETASKWARNINGS
##[debug]loading INPUT_EXPLICITFILTER
##[debug]loading INPUT_FORCECOVERAGEIMPROVEMENT
##[debug]loading INPUT_FORCEFEWERWARNINGS
##[debug]loading INPUT_IGNOREDECREASEABOVEUPPERTHRESHOLD
##[debug]loading INPUT_INCLUDEPARTIALLYSUCCEEDED
##[debug]loading INPUT_INCLUSIVEFILTERING
##[debug]loading INPUT_RUNTITLE
##[debug]loading INPUT_SHOWSTATISTICS
##[debug]loading INPUT_TREAT0OF0AS100
##[debug]loading INPUT_USEUNCOVEREDELEMENTS
##[debug]loading INPUT_WARNINGFAILOPTION
##[debug]loading INPUT_WARNINGFILESARTIFACT
##[debug]loading INPUT_WARNINGTASKFILTERS
##[debug]loading INPUT_WARNINGTHRESHOLD
##[debug]loading SECRET_SONARQUBE_ENDPOINT
##[debug]loaded 36
##[debug]Agent.ProxyUrl=http://proxyserverdns:8080
##[debug]Agent.ProxyUsername=undefined
##[debug]Agent.ProxyPassword=undefined
##[debug]Agent.ProxyBypassList=["commSeparatedDNSnamesIncludingOurNew","AzureDevOpsServer","BecauseItisOnPremise"]
##[debug]expose agent proxy configuration.
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]createBuildIssues=true
##[debug]check path : D:\azdev\01\_work\_tasks\BuildQualityChecks_16a2ad20-f191-11e5-bed4-ab22bcd17937\8.0.2\task.json
##[debug]adding resource file: D:\azdev\01\_work\_tasks\BuildQualityChecks_16a2ad20-f191-11e5-bed4-ab22bcd17937\8.0.2\task.json
##[debug]system.culture=en-US
##[debug]check path : D:\azdev\01\_work\_tasks\BuildQualityChecks_16a2ad20-f191-11e5-bed4-ab22bcd17937\8.0.2\node_modules\nodeapihelpers\messages.json
##[debug]adding resource file: D:\azdev\01\_work\_tasks\BuildQualityChecks_16a2ad20-f191-11e5-bed4-ab22bcd17937\8.0.2\node_modules\nodeapihelpers\messages.json
##[debug]system.culture=en-US
##[debug]disableCertCheck=false
##[debug]SystemVssConnection exists true
##[debug]System.TeamFoundationCollectionUri=https://AzureDevOpsServer/Collection/
##[debug]BQC.LogRawData=undefined
##[debug]Build.Repository.Provider=TfsGit
##[debug]baseBranchRef=refs/heads/branchname
##[debug]baseDefinitionId=BuildDefName
##[debug]System.DefinitionId=628
##[debug]includePartiallySucceeded=true
##[debug]System.TeamProject=ProjectName
##[debug]System.DefinitionId=628
##[debug]Build.DefinitionVersion=8
##[debug]Build.BuildId=53342
##[debug]PSGer.Build.PollInterval=undefined
##[debug]PSGer.Build.MaxWaitTime=undefined
##[debug]Resource file has already set to: D:\azdev\01\_work\_tasks\BuildQualityChecks_16a2ad20-f191-11e5-bed4-ab22bcd17937\8.0.2\node_modules\nodeapihelpers\messages.json
tunneling socket could not be established, statusCode=403
[ERROR] tunneling socket could not be established, statusCode=403
##[error]tunneling socket could not be established, statusCode=403
##[debug]Processed: ##vso[task.logissue type=error;]tunneling socket could not be established, statusCode=403
##[debug]setTaskResult
##[debug]Agent.TempDirectory=D:\azdev\01\_work\_temp
##[debug]Processed: ##vso[task.addattachment type=Distributedtask.Core.Summary;name=undefined;]D:\azdev\01\_work\_temp\BuildQualityChecksSummary.md
##[debug]createBuildIssues=true
##[debug]task result: Failed
##[debug]Processed: ##vso[task.complete result=Failed;]
Finishing: Quality: Check build quality
ReneSchumacher commented 3 years ago

Hi @fromthewoods,

thanks for reporting this. This is a known issue in one of the libraries that are used by our task. It does not use the proxy bypass list under some circumstances. Could you set the variable NO_PROXY to an empty value in your pipeline? This should force the library to use the proxy bypass list from the agent configuration. Please let me know if this works for you.

I'm already working on a new version of the task with an updated version of the library. However, we need to test for all on-prem versions of Azure DevOps Server/Team Foundation Server to ensure that this updated library does not break anything there.

fromthewoods commented 3 years ago

Thanks @ReneSchumacher ... that work around seems to work. Any plans for when the updated task will be released?

ReneSchumacher commented 3 years ago

Hey, sorry for not updating this issue. The latest version 8.0.3 already had the fix, so it should work without seeing the NO_PROXY variable to an empty value.

ReneSchumacher commented 3 years ago

Closing this issue now as it has been fixed. Please feel free to comment again if you still have problems with proxy configuration and Build Quality Checks.