Skip to content
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

Disable SCM queries for build #17157

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Disable SCM queries for build #17157

merged 1 commit into from
Aug 9, 2023

Conversation

mthalman
Copy link
Member

@mthalman mthalman commented Aug 9, 2023

The SB smoke tests are failing due to the .version file in the SB artifacts tarball not having the correct content. It doesn't contain the repo commit but does have the version. The MSBuild property that's used to input the repo commit is $(RepositoryCommit). Looking at the binlog shows that this property is not set for the package-source-build project.

This is caused by source-link being bundled with the SDK in dotnet/sdk#31632. Because of that EnableSourceControlManagerQueries gets defaulted to true. And because EnableSourceControlManagerQueries is true, it causes RepositoryCommit to not be set.

This is fixed by explicitly disabling EnableSourceControlManagerQueries.

Fixes dotnet/source-build#3426

@mthalman mthalman requested a review from a team as a code owner August 9, 2023 14:32
@mthalman mthalman merged commit f5ad81b into dotnet:main Aug 9, 2023
18 checks passed
@mthalman mthalman deleted the sb3426 branch August 9, 2023 17:21
@@ -4,6 +4,7 @@
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
<_SuppressSdkImports>true</_SuppressSdkImports>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
Copy link
Member

Choose a reason for hiding this comment

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

Your description made me think this was only needed for the package-source-build project? Is there a reason to set it here versus the package-source-build project?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's only needed for package-source-build. But given the intent of the property, it seemed relevant to apply it to all projects in this context to avoid potential issues in the future.

Copy link
Member

Choose a reason for hiding this comment

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

it seemed relevant to apply it to all projects in this context to avoid potential issues in the future.

That makes sense but keep in mind it won't flow into the project repo build the way it is set so it really has limited value here.

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.

VerifyVersionFile test fails in bootstrapping stage 2 build
3 participants