-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Put binlog directly into the VMR's #42984
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet-issue-labeler
bot
added
Area-Infrastructure
untriaged
Request triage from a team member
labels
Aug 23, 2024
ViktorHofer
reviewed
Aug 23, 2024
ViktorHofer
reviewed
Aug 23, 2024
This was referenced Aug 26, 2024
Looks good. A few more changes are necessary. I couldn't directly commit to your branch. Please apply this patch: diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml
index 4490d6ba8c..742bdb494c 100644
--- a/eng/pipelines/templates/jobs/vmr-build.yml
+++ b/eng/pipelines/templates/jobs/vmr-build.yml
@@ -447,8 +447,6 @@ jobs:
cd "$(sourcesPath)"
CopyWithRelativeFolders "artifacts/log/" $targetFolder "*"
- CopyWithRelativeFolders "src/" $targetFolder "*.binlog"
- CopyWithRelativeFolders "src/" $targetFolder "*.log"
if (Test-Path "artifacts/scenario-tests/") {
CopyWithRelativeFolders "artifacts/scenario-tests/" $targetFolder "*.binlog"
@@ -486,11 +484,14 @@ jobs:
fi
cd "$(sourcesPath)"
+
find artifacts/log/ -exec rsync -R {} -t ${targetFolder} \;
+
if [ -d "artifacts/scenario-tests/" ]; then
find artifacts/scenario-tests/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
echo "##vso[task.setvariable variable=hasScenarioTestResults]true"
fi
+
find artifacts/TestResults/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
find artifacts/TestResults/ -type f -name "*.diff" -exec rsync -R {} -t ${targetFolder} \;
find artifacts/TestResults/ -type f -name "Updated*.txt" -exec rsync -R {} -t ${targetFolder} \;
@@ -498,12 +499,8 @@ jobs:
if [[ "${{ parameters.buildSourceOnly }}" == "True" ]]; then
find artifacts/prebuilt-report/ -exec rsync -R {} -t ${targetFolder} \;
- find artifacts/log/binary-report/ -exec rsync -R {} -t ${targetFolder} \;
fi
- find src/ -type f -name "*.binlog" -exec rsync -R {} -t ${targetFolder} \;
- find src/ -type f -name "*.log" -exec rsync -R {} -t ${targetFolder} \;
-
# check if we have assets to publish
if [ -n "$(ls -A 'artifacts/assets/Release/')" ]; then
echo "##vso[task.setvariable variable=hasAssets]true"
diff --git a/src/SourceBuild/content/repo-projects/Directory.Build.targets b/src/SourceBuild/content/repo-projects/Directory.Build.targets
index 7643084ca8..707578e3b7 100644
--- a/src/SourceBuild/content/repo-projects/Directory.Build.targets
+++ b/src/SourceBuild/content/repo-projects/Directory.Build.targets
@@ -513,22 +513,16 @@
<Target Name="CopyDotNetBuildArtifactsLogs"
Condition="'$(IsUtilityProject)' != 'true' and
- Exists('$(ProjectDirectory)artifacts')">
-
+ Exists('$(ProjectDirectory)artifacts')">
<ItemGroup>
<LogFilesToCopy Include="$(ProjectDirectory)artifacts/**/*.log" />
<LogFilesToCopy Include="$(ProjectDirectory)artifacts/**/*.binlog" />
- </ItemGroup>
-
+ </ItemGroup>
+
<!-- Make a copy of the build logs -->
<Copy SourceFiles="@(LogFilesToCopy)"
DestinationFolder="$(DotNetBuildArtifactsLogDir)"
Condition="'@(LogFilesToCopy)' != ''" />
-
- <!-- Cleanup build logs -->
- <Delete Files="@(LogFilesToCopy)" Condition="'@(LogFilesToCopy)' != ''" />
- <Message Text="Files deleted: @(LogFilesToCopy)"/>
-
</Target>
<Target Name="CleanupRepo"
|
Sure, I've updated the code with the patch. |
akoeplinger
reviewed
Aug 26, 2024
ViktorHofer
reviewed
Aug 26, 2024
ViktorHofer
approved these changes
Aug 27, 2024
This looks great. Thanks a lot. |
/backport to release/9.0.1xx |
Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/10806681930 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes dotnet/source-build#4112
Repo logs are stored separately under their repositories, which makes it very inconvenient to check.
So we introduced a new property
DotNetBuildArtifactsLogDir
which point toartifacts\log\Release\<reponame>\
, all repo binlogs and other logs will respect the property and write to that folder.