2
votes

A couple of month ago I created a Power BI report using our company Azure DevOps build pipeline as data source (using odata v3.0-preview). Things were working quite well until a month or so ago it start failing to refresh the report data. After investigating it would seem that certain values are no longer retrievable but I cannot find any announcement from Microsoft that you will no longer be able to retrieve data from these sources?

My Azure Devops OData calls attempt to retrieve the following three pieces of information: BuildPipelines, Builds and TestRuns (these were all working correctly). Here are some examples of how each call was created:

  • https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/BuildPipelines?$filter=ProjectSK%20eq%20test&$select=BuildPipelineSK,BuildPipelineName
  • https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/Builds?$filter=ProjectSK%20eq%20test&$select=BuildPipelineSK,BuildSK,BuildOutcome,StartedDate,BuildNumber
  • https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/TestRuns?$filter=ProjectSK%20eq%20test&$select=BuildSK,RunDurationSeconds,ResultCount,ResultFailCount,ResultPassCount

The above calls break, in browser, through Power BI desktop and Power BI online.

Any assistance regarding this would be greatly appreciated.

Here is an example of the report I created using the above data sources:

enter image description here

1

1 Answers

3
votes

Hey Bernard I think I can help you.

I also use the oData feed a good bit and in late December I got an email from the Azure DevOps Analytics program manager about the following changes. They rolled out in early Jan. I looked around for any blog\announcement but I could not find one, so I guess I will just share what I know here.

I would also add that you can check the valid schema at this endpoint https://analytics.dev.azure.com/{OrganizationName}/{ProjectName}/_odata/{version}/$metadata

Email from the program manager is below the line.


Updates Summary:

  1. All entity sets and entity properties with names starting with BuildPipeline will be renamed to start with Pipeline
  2. All entity sets and entity properties with names starting with Build will be renamed to start with PipelineRun
  3. The entity set BuildTaskResults will be renamed to PipelineRunActivityResults
  4. The entity set BuildPipelineTasks will be renamed to PipelineTasks
  5. All Release entity sets are removed, and their properties are merged into Test entity sets. The following entity sets are removed a. ReleasePipelines b. ReleaseEnvironments c. ReleaseStages d. Releases The properties of these release entity sets can now be referenced in queries on Test entity sets by directly using the entity property. For instance, usage of ReleasePipeline/ReleasePipelineId in Test entity queries can be replaced with ReleasePipelineId.

Details: enter image description here enter image description here

Examples: Older query this https://analytics.dev.azure.com/{orgname}/{projectName}/_odata/v3.0-preview/Builds?$apply=filter(BuildPipelineId eq 381)/aggregate($count as Count)

will become https://analytics.dev.azure.com/{orgname}/{projectName}/_odata/v3.0-preview/PipelineRuns?$apply=filter(PipelineId eq 381)/aggregate($count as Count)

Handling release entity sets and entity properties

Azure DevOps Analytics contained only those Release entries that were associated with TestRuns and never contained the completed date for release. All those Release entity sets are being removed and their properties are being merged into Test entity sets. For example, queries that use Release entity sets directly will

https://analytics.dev.azure.com/{orgname} /{projectName}/_odata/v3.0-preview/ReleasePipelines/$count

https://analytics.dev.azure.com/{orgname} /{projectName}/_odata/v3.0-preview/ReleaseEnvironments/$count

https://analytics.dev.azure.com/{orgname} /{projectName}/_odata/v3.0-preview/ReleaseStages/$count

https://analytics.dev.azure.com/{orgname} /{projectName}/_odata/v3.0-preview/Releases/$count

But you need not worry If a release entity property was being used in any Test query. Since the release properties are being merged into Test entity sets, you should use the property directly, without using navigation. For instance, in a test entity, if a release entity property is currently being used as ReleasePipeline/ReleasePipelineId, then it should be replaced with ReleasePipelineId. This pattern applies to all Release entity properties used within Test entities.

Examples: Older query this

https://analytics.dev.azure.com/{orgname} /{projectName} /_odata/v3.0-preview/TestRuns?$apply=filter(ReleasePipeline/ReleasePipelineId eq 381)/aggregate($count as Count)

will become

https://analytics.dev.azure.com/{orgname} /{projectName} /_odata/v3.0-preview/TestRuns?$apply=filter(ReleasePipelineId eq 381)/aggregate($count as Count)