diff --git a/Extensions/XplatGenerateReleaseNotes/V3/ReleaseNotesFunctions.ts b/Extensions/XplatGenerateReleaseNotes/V3/ReleaseNotesFunctions.ts index cde842dde..b3f5813db 100644 --- a/Extensions/XplatGenerateReleaseNotes/V3/ReleaseNotesFunctions.ts +++ b/Extensions/XplatGenerateReleaseNotes/V3/ReleaseNotesFunctions.ts @@ -1293,7 +1293,7 @@ export async function generateReleaseNotes( const pr = globalPullRequests[prIndex]; for (let csIndex = 0; csIndex < pr.associatedCommits.length; csIndex++) { const cs = pr.associatedCommits[csIndex]; - var foundPR = allPullRequests.find( e => e.lastMergeCommit.commitId === cs.commitId); + var foundPR = allPullRequests.find( e => e.lastMergeCommit && e.lastMergeCommit.commitId === cs.commitId); if (foundPR) { agentApi.logInfo(`Found the PR ${foundPR.pullRequestId} associated wth ${cs.commitId} added to the 'inDirectlyAssociatedPullRequests' array`); inDirectlyAssociatedPullRequests.push(foundPR); diff --git a/Extensions/XplatGenerateReleaseNotes/readme.md b/Extensions/XplatGenerateReleaseNotes/readme.md index b9a8fb83b..9ff66aa51 100644 --- a/Extensions/XplatGenerateReleaseNotes/readme.md +++ b/Extensions/XplatGenerateReleaseNotes/readme.md @@ -342,7 +342,9 @@ This task makes many calls to the Azure DevOps REST API, the volume depends on t Error: connect ETIMEDOUT 13.107.42.18:443 ``` -At present, even though the task utilizes retry logic, there is no way to recover from these timeouts. The only solution is to retry the failed job, this will usually work (eventually) +This is an issue with the underlying Azure DevOps Node SDK or REST API endpoints, not this task. Hence, an issue has been raised in the the appropriate [Repo #425](https://github.com/microsoft/azure-devops-node-api/issues/425) + +The best workaround at present is to always place this task, and any associated tasks e.g. one that upload the generated release notes to a WIKI, in a dedicated YML pipeline job. This allows the task to be easily retried without rerunning the whole pipeline. ## OAUTH Scope limiting what Associated Items can be seen This task uses the build agent's access OAUTH token to access the Azure DevOps API. The permissions this identity has is dependant upon the [the Job authorization scope](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/access-tokens?view=azure-devops&tabs=yaml#job-authorization-scope).