-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always getting the workitems as empty array in the build pipe line #917
Comments
As the log shows the task has been unable to find any associated WI, commits or tests. Hence those blocks are empty in the generated release notes. Remember the task compares builds, so in your log we can see |
The structure would be something along the lines of the sample shown below, as per the documentation But remember these global list is just the WI/CS associated with the builds
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Hello, faced with the same issue. Here is the log:
Talking about |
By default the comparison is done against the las successful build of the definition, irrespective of the branch, but there are technique you can do make sure the comparison is a build of a certain criteria Watch the video of the conference session I did on this tool, as I think this might provide an answer. What I do is put the release notes task in it's own stage that is only run if a certain condition is met e.g. a human approves release to that stage, or a condition is met that allows entry into the stage e.g. a parameter is not set to beta - or both. Remember to also checkout the WIKI for the settings required to get this working This model means that the task is only run when it is required, and will look back to the last successful build that ran the current stage so showing the changes since the last release to that stage. |
Yes, we are running this task only while building on the master branch. But seems like the task is looking for last builds ignoring even if the task has run or not. Thank you for the link to the WIKI. Will check whether some settings can affect the result and come back to you. |
Hello, having same issue:
And I have these in the template: Associated Pull Requests ({{pullRequests.length}})
And generated release: Associated Pull Requests (1)
Builds with associated WI/CS (0)Global list of WI (0)List of WI returned by WIQL (0)Associated commits
Can't find what's wrong. |
Describe the bug
The task always showing the empty array of work itmes, pull requests and builds. Tried all the following, and those are either empty array or no result.
Associated work items
{{json this.workitems}}
associatedWorkitems
{{json this.associatedWorkitems}}
Associated pull requests
{{json this.pullRequests}}
Associated relations
{{json this.relations}}
Global work items
{{json workitems}}
Global pull requests
{{json pullRequests}}
builds
{{json this.builds}}
tests
{{json this.tests}}
inDirectlyAssociatedPullRequests
{{json this.inDirectlyAssociatedPullRequests}}
commits
{{json this.commits}}
compareBuildDetails
{{json this.compareBuildDetails}}
currentStage
{{json this.currentStage}}
Remember that there are a number of Azure DevOps (VSTS) extensions in this repo so please say which one you are using, and if an extension contains multiple tasks which task also
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Logs
2021-01-04T15:15:03.4418165Z ##[debug]Evaluating condition for step: 'Generate Release Notes based on Release Comparison API'
2021-01-04T15:15:03.4420242Z ##[debug]Evaluating: succeeded()
2021-01-04T15:15:03.4420802Z ##[debug]Evaluating succeeded:
2021-01-04T15:15:03.4422114Z ##[debug]=> True
2021-01-04T15:15:03.4422652Z ##[debug]Result: True
2021-01-04T15:15:03.4423261Z ##[section]Starting: Generate Release Notes based on Release Comparison API
2021-01-04T15:15:03.4609634Z ==============================================================================
2021-01-04T15:15:03.4609996Z Task : Generate Release Notes (Crossplatform)
2021-01-04T15:15:03.4610402Z Description : Generates a release notes file in a format of your choice from the build or release history
2021-01-04T15:15:03.4610725Z Version : 3.39.2
2021-01-04T15:15:03.4610937Z Author : Black Marble
2021-01-04T15:15:03.4611413Z Help : Version: 3.39.2. More Information
2021-01-04T15:15:03.4612102Z ==============================================================================
2021-01-04T15:15:03.5091095Z ##[debug]Using node path: C:\agents\2.179.0\externals\node10\bin\node.exe
2021-01-04T15:15:03.9944965Z ##[debug]agent.TempDirectory=D:\a_temp
2021-01-04T15:15:03.9967773Z ##[debug]loading inputs and endpoints
2021-01-04T15:15:03.9990763Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2021-01-04T15:15:04.0033149Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2021-01-04T15:15:04.0038105Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2021-01-04T15:15:04.0038887Z ##[debug]loading INPUT_APPENDTOFILE
2021-01-04T15:15:04.0039557Z ##[debug]loading INPUT_CHECKSTAGE
2021-01-04T15:15:04.0040260Z ##[debug]loading INPUT_CUSTOMHANDLEBARSEXTENSIONFILE
2021-01-04T15:15:04.0040950Z ##[debug]loading INPUT_DUMPPAYLOADFILENAME
2021-01-04T15:15:04.0041716Z ##[debug]loading INPUT_DUMPPAYLOADTOCONSOLE
2021-01-04T15:15:04.0043055Z ##[debug]loading INPUT_DUMPPAYLOADTOFILE
2021-01-04T15:15:04.0043520Z ##[debug]loading INPUT_GETALLPARENTS
2021-01-04T15:15:04.0043997Z ##[debug]loading INPUT_GETINDIRECTPULLREQUESTS
2021-01-04T15:15:04.0044523Z ##[debug]loading INPUT_GETPARENTSANDCHILDREN
2021-01-04T15:15:04.0044990Z ##[debug]loading INPUT_MAXRETRIES
2021-01-04T15:15:04.0045438Z ##[debug]loading INPUT_OUTPUTFILE
2021-01-04T15:15:04.0045873Z ##[debug]loading INPUT_PAUSETIME
2021-01-04T15:15:04.0046340Z ##[debug]loading INPUT_REPLACEFILE
2021-01-04T15:15:04.0046811Z ##[debug]loading INPUT_SEARCHCROSSPROJECTFORPRS
2021-01-04T15:15:04.0048523Z ##[debug]loading INPUT_SHOWONLYPRIMARY
2021-01-04T15:15:04.0050395Z ##[debug]loading INPUT_SORTWI
2021-01-04T15:15:04.0052364Z ##[debug]loading INPUT_STOPONREDEPLOY
2021-01-04T15:15:04.0054477Z ##[debug]loading INPUT_TEMPLATEFILE
2021-01-04T15:15:04.0056371Z ##[debug]loading INPUT_TEMPLATELOCATION
2021-01-04T15:15:04.0064597Z ##[debug]loaded 22
2021-01-04T15:15:04.0069666Z ##[debug]Agent.ProxyUrl=undefined
2021-01-04T15:15:04.0071064Z ##[debug]Agent.CAInfo=undefined
2021-01-04T15:15:04.0071468Z ##[debug]Agent.ClientCert=undefined
2021-01-04T15:15:04.0072224Z ##[debug]Agent.SkipCertValidation=undefined
2021-01-04T15:15:04.1770719Z ##[debug]Starting Tag XplatGenerateReleaseNotes task
2021-01-04T15:15:04.1771598Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/xxxx/
2021-01-04T15:15:04.1772172Z ##[debug]System.TeamProject=ResearchDevelopment
2021-01-04T15:15:04.1780349Z ##[debug]templateLocation=File
2021-01-04T15:15:04.1782090Z ##[debug]templatefile=D:\a\1\s\NewBuildTemplate.md
2021-01-04T15:15:04.1782477Z ##[debug]inlinetemplate=undefined
2021-01-04T15:15:04.1783580Z ##[debug]outputfile=D:\a\1\a\newbuildreleasenotes.md
2021-01-04T15:15:04.1784002Z ##[debug]outputVariableName=undefined
2021-01-04T15:15:04.1785240Z ##[debug]showOnlyPrimary=false
2021-01-04T15:15:04.1786346Z ##[debug]replaceFile=True
2021-01-04T15:15:04.1787431Z ##[debug]appendToFile=True
2021-01-04T15:15:04.1789348Z ##[debug]getParentsAndChildren=false
2021-01-04T15:15:04.1789919Z ##[debug]searchCrossProjectForPRs=False
2021-01-04T15:15:04.1790433Z ##[debug]overrideStageName=undefined
2021-01-04T15:15:04.1790928Z ##[debug]stopOnRedeploy=False
2021-01-04T15:15:04.1791580Z ##[debug]SortWi=false
2021-01-04T15:15:04.1792097Z ##[debug]customHandlebarsExtensionCode=undefined
2021-01-04T15:15:04.1792848Z ##[debug]customHandlebarsExtensionFile=customHandlebarsExtension
2021-01-04T15:15:04.1793459Z ##[debug]customHandlebarsExtensionFolder=undefined
2021-01-04T15:15:04.1794091Z ##[debug]gitHubPat=undefined
2021-01-04T15:15:04.1794572Z ##[debug]bitbucketSecret=undefined
2021-01-04T15:15:04.1795065Z ##[debug]bitbucketUser=undefined
2021-01-04T15:15:04.1795568Z ##[debug]dumpPayloadToFile=true
2021-01-04T15:15:04.1796061Z ##[debug]dumpPayloadToConsole=true
2021-01-04T15:15:04.1796612Z ##[debug]dumpPayloadFileName=D:\a\1\a/payload.json
2021-01-04T15:15:04.1797212Z ##[debug]checkStage=true
2021-01-04T15:15:04.1798263Z ##[debug]getAllParents=false
2021-01-04T15:15:04.1798749Z ##[debug]tags=undefined
2021-01-04T15:15:04.1799224Z ##[debug]overridePat=undefined
2021-01-04T15:15:04.1799708Z ##[debug]overrideBuildReleaseId=undefined
2021-01-04T15:15:04.1800238Z ##[debug]getIndirectPullRequests=true
2021-01-04T15:15:04.1800735Z ##[debug]maxRetries=20
2021-01-04T15:15:04.2138574Z ##[debug]Build.BuildId=2581
2021-01-04T15:15:04.2139144Z ##[debug]Release.ReleaseId=undefined
2021-01-04T15:15:04.2139628Z ##[debug]Release.DefinitionId=undefined
2021-01-04T15:15:04.2140271Z ##[debug]Release_EnvironmentName=undefined
2021-01-04T15:15:04.2140976Z ##[debug]ReleaseNotes.Fix349=undefined
2021-01-04T15:15:04.2182309Z Creating Azure DevOps API connections for https://dev.azure.com/xxxxx/ with 'allowRetries' set to 'true' and 'maxRetries' count to '20'
2021-01-04T15:15:04.2185046Z ##[debug]Getting System.AccessToken
2021-01-04T15:15:04.2185718Z ##[debug]Getting credentials the agent is running as
2021-01-04T15:15:04.2190195Z ##[debug]SYSTEMVSSCONNECTION exists true
2021-01-04T15:15:04.2190703Z ##[debug]Found an OAUTH token
2021-01-04T15:15:04.2191204Z Creating the credential handler from the OAUTH token
2021-01-04T15:15:04.6054588Z Getting the current build details
2021-01-04T15:15:04.6584468Z ##[debug]System.StageName=__default
2021-01-04T15:15:04.6585621Z Getting items associated the builds since the last successful build to the stage '__default'
2021-01-04T15:15:04.8613221Z Found '27' matching builds to consider
2021-01-04T15:15:04.8613471Z Comparing 2581 against 2581
2021-01-04T15:15:04.8613672Z Ignore compare against self
2021-01-04T15:15:04.8613842Z Comparing 2580 against 2581
2021-01-04T15:15:04.8613996Z Considering build
2021-01-04T15:15:04.9408015Z Found required stage __default in the completed and successful state in build 2580
2021-01-04T15:15:04.9408439Z Getting the details between 2580 and 2581
2021-01-04T15:15:04.9651233Z Using workaround for build API limitation (see issue #349)
2021-01-04T15:15:04.9888260Z ##[debug]ReleaseNotes.Fix349.MaxCommits=undefined
2021-01-04T15:15:04.9889064Z ##[debug]ReleaseNotes.Fix349.MaxWorkItems=undefined
2021-01-04T15:15:05.0292096Z Processing commits found
2021-01-04T15:15:05.0926053Z ##[debug]Found 0 test results associated with the build
2021-01-04T15:15:05.0926749Z ##[debug]No tests associated with build 2581
2021-01-04T15:15:05.0927122Z Get the file details associated with the commits
2021-01-04T15:15:05.0933106Z Get any test details associated with the build
2021-01-04T15:15:05.1568910Z ##[debug]Found 0 test results associated with the build
2021-01-04T15:15:05.1569638Z ##[debug]No tests associated with build 2581
2021-01-04T15:15:05.1570009Z Removing duplicate Commits from master list
2021-01-04T15:15:05.1570406Z Removing duplicate WorkItems from master list
2021-01-04T15:15:05.1576510Z Expanding the truncated commit messages...
2021-01-04T15:15:05.1576848Z Expanded truncated commit messages 0
2021-01-04T15:15:05.1583112Z Get details of [0] WIs
2021-01-04T15:15:05.1584195Z Leaving WI in default order as returned by API
2021-01-04T15:15:05.1584954Z ##[debug]Getting the details of build 2581 from default project
2021-01-04T15:15:05.1859631Z The default artifact for the release was not linked to an Azure DevOps Git Repo Pull Request
2021-01-04T15:15:05.1861028Z Getting all completed Azure DevOps Git Repo PRs in the Team Project ResearchDevelopment
2021-01-04T15:15:05.1865938Z ##[debug]Get batch of PRs [0] - [1000]
2021-01-04T15:15:05.3361922Z ##[debug]Adding batch of 127 PRs
2021-01-04T15:15:05.3362300Z Found 127 Azure DevOps PRs in the repo
2021-01-04T15:15:05.3362537Z Enriching known Pull Requests
2021-01-04T15:15:05.3365957Z Checking the CS associated with the PRs to see if they are inturn associated PRs
2021-01-04T15:15:05.3370907Z Total Builds: [0]
2021-01-04T15:15:05.3371387Z Total Commits: [0]
2021-01-04T15:15:05.3371879Z Total Workitems: [0]
2021-01-04T15:15:05.3374146Z Total Related Workitems (Parent/Children): [0]
2021-01-04T15:15:05.3374806Z Total Release Tests: [0]
2021-01-04T15:15:05.3375094Z Total Tests: [0]
2021-01-04T15:15:05.3375352Z Total Pull Requests: [0]
2021-01-04T15:15:05.3375639Z Total Indirect Pull Requests: [0]
2021-01-04T15:15:05.3376045Z Start of payload data dump
2021-01-04T15:15:05.3476110Z End of payload data dump
2021-01-04T15:15:05.3476336Z Writing payload data to file D:\a\1\a/payload.json
2021-01-04T15:15:05.3476808Z ##[debug]Using template mode File
2021-01-04T15:15:05.3477112Z Loading template file D:\a\1\s\NewBuildTemplate.md
2021-01-04T15:15:05.3477461Z ##[debug]Loading handlebar template
2021-01-04T15:15:05.3477784Z ##[debug]Processing template
2021-01-04T15:15:05.3478095Z ##[debug] WI: 0
2021-01-04T15:15:05.3478383Z ##[debug] CS: 0
2021-01-04T15:15:05.3478722Z ##[debug] PR: 0
2021-01-04T15:15:05.3479010Z ##[debug] Builds: 0
2021-01-04T15:15:05.3479328Z ##[debug] Global Tests: 0
2021-01-04T15:15:05.3479679Z ##[debug] Release Tests: 0
2021-01-04T15:15:05.3480007Z ##[debug] Related WI: 0
2021-01-04T15:15:05.3480300Z ##[debug] Indirect PR: 0
2021-01-04T15:15:05.3480612Z ##[debug]Processing handlebar template
2021-01-04T15:15:05.3778500Z Loading handlebars-helpers extension
2021-01-04T15:15:05.6440337Z ##[debug]No custom Handlebars code to process
2021-01-04T15:15:05.7463017Z Completed processing template
2021-01-04T15:15:05.7463663Z Writing output file D:\a\1\a\newbuildreleasenotes.md
2021-01-04T15:15:05.7467735Z Finished writing output file D:\a\1\a\newbuildreleasenotes.md
2021-01-04T15:15:05.7470662Z ##[debug]task result: Succeeded
2021-01-04T15:15:05.7480830Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]
2021-01-04T15:15:05.8015331Z ##[section]Finishing: Generate Release Notes based on Release Comparison API
What is the issue see:
The text was updated successfully, but these errors were encountered: