Skip to content

Only run source index for main builds#16377

Merged
ericstj merged 1 commit intomainfrom
akoeplinger-patch-2
Dec 5, 2025
Merged

Only run source index for main builds#16377
ericstj merged 1 commit intomainfrom
akoeplinger-patch-2

Conversation

@akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Dec 5, 2025

Set the default value for the condition to check for main branch, following what repos like wpf do: https://github.com/dotnet/wpf/blob/b0eef594c3cf95fed8d75e819c94f6eba65da826/eng/pipeline.yml#L25-L26

This also allows someone to override the condition if they want to.

Fixes an issue where servicing branches were running source indexing (and missing fixes like #16278).

@ericstj ericstj requested review from joperezr and radical December 5, 2025 16:56
@ericstj
Copy link
Member

ericstj commented Dec 5, 2025

@akoeplinger
Copy link
Member Author

akoeplinger commented Dec 5, 2025

there's no good way to check what the default branch is. I don't think anyone currently enabling source-indexing is using a different name, my thinking was that if repo is using a different name they can just override the condition.

@ericstj
Copy link
Member

ericstj commented Dec 5, 2025

Here's the list of repos indexed today -- https://github.com/dotnet/source-indexer/blob/3733d33b8050743a7034c3e2c10deb06c3a2b78d/src/index/repositories.props

I think you're right, but I'd like to add more (like NuGet). I guess we just need to make sure they update the condition. I think we hadn't added NuGet in the past due to it building outside dnceng. I think we might need to do some work in azdo around permissions to let them publish to the source index's internal blob storage.

@ericstj ericstj merged commit 65e09c0 into main Dec 5, 2025
9 checks passed
@ericstj ericstj deleted the akoeplinger-patch-2 branch December 5, 2025 19:00
@akoeplinger
Copy link
Member Author

/backport to release/10.0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Started backporting to release/10.0 (link to workflow run)

@akoeplinger
Copy link
Member Author

/backport to release/9.0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Started backporting to release/9.0 (link to workflow run)

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

@akoeplinger backporting to release/9.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Only run source index for main builds
Using index info to reconstruct a base tree...
M	eng/common/core-templates/job/source-index-stage1.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/common/core-templates/job/source-index-stage1.yml
CONFLICT (content): Merge conflict in eng/common/core-templates/job/source-index-stage1.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Only run source index for main builds
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

akoeplinger added a commit that referenced this pull request Dec 5, 2025
github-actions bot pushed a commit that referenced this pull request Dec 5, 2025
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.

2 participants