Skip to content

Use complog for source indexer - #17317

Open
jjonescz wants to merge 3 commits into
dotnet:mainfrom
jjonescz:complog
Open

Use complog for source indexer#17317
jjonescz wants to merge 3 commits into
dotnet:mainfrom
jjonescz:complog

Conversation

@jjonescz

@jjonescz jjonescz commented Aug 11, 2026

Copy link
Copy Markdown
Member

To double check:

Validated on dotnet/extensions - the currently published stage1 artifacts of dotnet/extensions are complog-based and published on https://source.dot.net. Official build run with this change is https://dev.azure.com/dnceng/internal/_build/results?buildId=3055692&view=results

Copilot AI lite review requested due to automatic review settings August 11, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Arcade source indexing Stage 1 pipeline templates to generate a .complog from the build binlog (via complog) and upload Stage 1 artifacts, replacing the prior binlog-to-sln processing approach.

Changes:

  • Replace BinLogToSln usage with complog create to produce build.complog for Stage 1 output.
  • Add runAsPublic plumbing and a dedicated public package source for fetching the complog tool.
  • Make the “Build Repository” step conditional when sourceIndexBuildCommand is empty.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
eng/common/core-templates/steps/source-index-stage1-publish.yml Switch Stage 1 processing to complog and adjust tool acquisition/feeds.
eng/common/core-templates/job/source-index-stage1.yml Adjust job behavior (conditional build step, pass-through parameters, job-level settings).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread eng/common/core-templates/steps/source-index-stage1-publish.yml
Comment thread eng/common/core-templates/job/source-index-stage1.yml
- job: SourceIndexStage1
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.condition }}
continueOnError: true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think source index stage should not block official builds by default. But happy to change this if others disagree.

sourceIndexProcessBinlogPackageVersion: 1.0.1-20260521.2
runAsPublic: false
sourceIndexUploadPackageVersion: '2.0.0-20260521.2'
sourceIndexComplogPackageVersion: '0.9.50'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you pick a fixed package version here vs. letting it float to latest?

@jjonescz jjonescz Aug 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just continuing what it was doing previously for the BinlogToSln tool. I think the reason was that pinned versions are more deterministic and avoid sudden breaks across all pipelines.

However, with my other change to make this stage not fail the whole build, I guess it would be more okay to use a floating version here.

What kind of version would you suggest? Just * or 0.9.*...? (I'm not sure what's complog's versioning scheme)

- script: |
mkdir ".source-index/stage1output"
git rev-parse HEAD > .source-index/stage1output/hash
$(Agent.TempDirectory)/.source-index/tools/complog create ${{parameters.BinlogPath}} -o .source-index/stage1output/build.complog

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work when a repository produces multiple binlogs? That is what say VMR would do.

@jjonescz jjonescz Aug 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This infra doesn't currently support that (and never did). VMR doesn't use this, it has its own logic, specifically it has a loop:

https://github.com/dotnet/dotnet/blob/a2c79539ae1265f88edea9a4663ac174cd657d67/eng/pipelines/templates/steps/source-index-stage1.yml#L72

@jjonescz
jjonescz marked this pull request as ready for review August 17, 2026 11:10
@jjonescz

Copy link
Copy Markdown
Member Author

@tannergooding can you please take a look? thanks

tannergooding
tannergooding previously approved these changes Aug 22, 2026

@tannergooding tannergooding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think allowing the version to float makes sense especially with failure to source index no longer blocking

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

eng/common/core-templates/steps/source-index-stage1-publish.yml:19

  • Because this template accepts a custom pool and script runs under Bash on Linux agents, the unquoted * rendered from the default version is expanded against $(Agent.TempDirectory) (which contains the newly installed dotnet directory) before dotnet sees it. The install then receives --version dotnet instead of the intended floating version; quote the value or use a pinned/omitted version so Linux-based consumers can install the tool.
    $(Agent.TempDirectory)/dotnet/dotnet tool install complog --version ${{parameters.sourceIndexComplogPackageVersion}} --source ${{parameters.sourceIndexPublicPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools

eng/common/core-templates/steps/source-index-stage1-publish.yml:4

  • Using * makes the default restore a floating complog version, so a newly published release can change or break every source-index run without a template change. This violates Arcade's servicing requirement that each build tool have a specific version (Documentation/Servicing.md:10); pin the exact version validated for this template and update it explicitly.
  sourceIndexComplogPackageVersion: '*'

Copilot AI review requested due to automatic review settings August 24, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

eng/common/core-templates/steps/source-index-stage1-publish.yml:4

  • Using * makes the complog tool version non-reproducible and violates Arcade's servicing requirement that every build-support tool use a specific version (Documentation/Servicing.md:10). A future complog release can change indexing behavior or break this pipeline without a repository change; pin this to an approved exact version and roll it forward deliberately.
  sourceIndexComplogPackageVersion: '*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants