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

Optimize Symbols packaging targets for rebuild scenarios #4288

Closed
MichaelSimons opened this issue Apr 2, 2024 · 2 comments · Fixed by dotnet/installer#19303
Closed

Optimize Symbols packaging targets for rebuild scenarios #4288

MichaelSimons opened this issue Apr 2, 2024 · 2 comments · Fixed by dotnet/installer#19303
Assignees
Labels
area-infra Source-build infrastructure and reporting

Comments

@MichaelSimons
Copy link
Member

While testing the UX of dotnet/installer#19222, I noticed RepackageSymbols and CreateSdkSymbolsTarball will always run if you do a rebuild without changing any source.

My usage scenario was was

  1. prep-source-build.sh
  2. build.sh -sb
  3. build.sh --test -sb

The rebuild is very fast until it hits these two targets. If these two targets would no-op, it would be nice although I recognize this is not a main line usage scenario.

[root@codespaces-8ae7d1 dotnet]# ./build.sh --test -sb
Found bootstrap SDK 9.0.100-preview.4.24178.10, bootstrap Arcade 9.0.0-beta.24177.2
Shutting down MSBuild server...
Shutting down VB/C# compiler server...
VB/C# compiler server shut down successfully.
MSBuild server shut down successfully.

Shutting down MSBuild server...
Shutting down VB/C# compiler server...
VB/C# compiler server shut down successfully.
MSBuild server shut down successfully.

  Build Mode: source-build
  Build Environment: x64 Release linux fedora.39-x64
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild;xdt;nuget-client;symreader;aspnetcore;diagnostics;deployment-tools;fsharp;razor;roslyn-analyzers;sourcelink;templating;vstest;aspire;sdk;test-templates;installer;scenario-tests] needed by 'dotnet'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals] needed by 'runtime'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild] needed by 'fsharp'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime] needed by 'templating'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'xdt'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;diagnostics;runtime] needed by 'vstest'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'symreader'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'cecil'.
  Building dependencies [source-build-reference-packages;arcade;source-build-externals] needed by 'deployment-tools'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'test-templates'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'diagnostics'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime] needed by 'roslyn'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild;xdt] needed by 'nuget-client'.
  Building dependencies [source-build-reference-packages;arcade;command-line-api] needed by 'sourcelink'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn] needed by 'msbuild'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild;xdt;nuget-client;symreader;aspnetcore;diagnostics;deployment-tools;fsharp;razor;roslyn-analyzers;sourcelink;templating;vstest] needed by 'sdk'.
  Building dependencies [source-build-reference-packages;arcade;command-line-api;source-build-externals] needed by 'scenario-tests'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'emsdk'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'command-line-api'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild;xdt;nuget-client;symreader] needed by 'aspnetcore'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'aspire'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild;xdt;nuget-client;symreader;aspnetcore] needed by 'razor'.
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime] needed by 'roslyn-analyzers'.
  Building dependencies [source-build-reference-packages] needed by 'arcade'.
  Building dependencies [source-build-reference-packages;arcade] needed by 'source-build-externals'.
/workspaces/dotnet/repo-projects/Directory.Build.targets(507,5): warning MSB3026: Could not copy "/workspaces/dotnet/src/xdt/artifacts/sb/package-cache/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/.nupkg.metadata" to "/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/.nupkg.metadata". Beginning retry 1 in 1000ms. The process cannot access the file '/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/.nupkg.metadata' because it is being used by another process.  [/workspaces/dotnet/repo-projects/xdt.proj]
/workspaces/dotnet/repo-projects/Directory.Build.targets(507,5): warning MSB3026: Could not copy "/workspaces/dotnet/src/test-templates/artifacts/sb/package-cache/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/microsoft.dotnet.build.tasks.feed.9.0.0-beta.24179.6.nupkg.sha512" to "/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/microsoft.dotnet.build.tasks.feed.9.0.0-beta.24179.6.nupkg.sha512". Beginning retry 1 in 1000ms. The process cannot access the file '/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/microsoft.dotnet.build.tasks.feed.9.0.0-beta.24179.6.nupkg.sha512' because it is being used by another process.  [/workspaces/dotnet/repo-projects/test-templates.proj]
/workspaces/dotnet/repo-projects/Directory.Build.targets(507,5): warning MSB3026: Could not copy "/workspaces/dotnet/src/emsdk/artifacts/sb/package-cache/microsoft.dotnet.xlifftasks/9.0.0-beta.24179.6/.nupkg.metadata" to "/workspaces/dotnet/.packages/microsoft.dotnet.xlifftasks/9.0.0-beta.24179.6/.nupkg.metadata". Beginning retry 1 in 1000ms. The process cannot access the file '/workspaces/dotnet/.packages/microsoft.dotnet.xlifftasks/9.0.0-beta.24179.6/.nupkg.metadata' because it is being used by another process.  [/workspaces/dotnet/repo-projects/emsdk.proj]
  Building dependencies [source-build-reference-packages;arcade;cecil;command-line-api;emsdk;source-build-externals;runtime;roslyn;msbuild;xdt;nuget-client;symreader;aspnetcore;diagnostics;deployment-tools;fsharp;razor;roslyn-analyzers;sourcelink;templating;vstest;aspire;sdk;test-templates] needed by 'installer'.
  Packaged all symbols in '/workspaces/dotnet/artifacts/assets/Release/dotnet-symbols-all-9.0.100-preview.4.24202.1-fedora.39-x64.tar.gz'
  Packaged sdk symbols in '/workspaces/dotnet/artifacts/assets/Release/dotnet-symbols-sdk-9.0.100-preview.4.24202.1-fedora.39-x64.tar.gz'
  Found 0 files in prebuilt packages dir.
  Shipping packages are located in '/workspaces/dotnet/artifacts/packages/Release/Shipping/'.
  Shipping assets are located in '/workspaces/dotnet/artifacts/assets/Release/'.
@ViktorHofer
Copy link
Member

ViktorHofer commented Apr 3, 2024

/workspaces/dotnet/repo-projects/Directory.Build.targets(507,5): warning MSB3026: Could not copy "/workspaces/dotnet/src/xdt/artifacts/sb/package-cache/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/.nupkg.metadata" to "/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/.nupkg.metadata". Beginning retry 1 in 1000ms. The process cannot access the file '/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/.nupkg.metadata' because it is being used by another process. [/workspaces/dotnet/repo-projects/xdt.proj]
/workspaces/dotnet/repo-projects/Directory.Build.targets(507,5): warning MSB3026: Could not copy "/workspaces/dotnet/src/test-templates/artifacts/sb/package-cache/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/microsoft.dotnet.build.tasks.feed.9.0.0-beta.24179.6.nupkg.sha512" to "/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/microsoft.dotnet.build.tasks.feed.9.0.0-beta.24179.6.nupkg.sha512". Beginning retry 1 in 1000ms. The process cannot access the file '/workspaces/dotnet/.packages/microsoft.dotnet.build.tasks.feed/9.0.0-beta.24179.6/microsoft.dotnet.build.tasks.feed.9.0.0-beta.24179.6.nupkg.sha512' because it is being used by another process. [/workspaces/dotnet/repo-projects/test-templates.proj]
/workspaces/dotnet/repo-projects/Directory.Build.targets(507,5): warning MSB3026: Could not copy "/workspaces/dotnet/src/emsdk/artifacts/sb/package-cache/microsoft.dotnet.xlifftasks/9.0.0-beta.24179.6/.nupkg.metadata" to "/workspaces/dotnet/.packages/microsoft.dotnet.xlifftasks/9.0.0-beta.24179.6/.nupkg.metadata". Beginning retry 1 in 1000ms. The process cannot access the file '/workspaces/dotnet/.packages/microsoft.dotnet.xlifftasks/9.0.0-beta.24179.6/.nupkg.metadata' because it is being used by another process. [/workspaces/dotnet/repo-projects/emsdk.proj]

FWIW the warnings are because of #4234

@NikolaMilosavljevic
Copy link
Member

With the work in #4225, we are getting rid of temporary Symbols* tarballs, that we could have used as target inputs.

We are currently also deleting all temporary repo symbols that are used by these targets: https://github.com/dotnet/installer/blob/73c5241b5e3a3176a1d4d0c152661d2bf4e755a9/src/SourceBuild/content/eng/build.sourcebuild.targets#L58

To enable incremental support, we need to preserve these input symbols. We do not delete any other artifacts published by repo builds, so this would be the appropriate thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infra Source-build infrastructure and reporting
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants