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

PDBArtifacts artifact should not be created when PushToLocalStorage is true #15443

Open
mmitche opened this issue Jan 23, 2025 · 1 comment
Open

Comments

@mmitche
Copy link
Member

mmitche commented Jan 23, 2025

via failure:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=926533&view=logs&j=9050e078-31bf-5111-d8ec-8b6fa95caf9c&t=4df1dbeb-294c-5d6e-97b8-581fe506c270&l=24130

Fail to upload 'D:\a\_work\1\s\src\runtime\artifacts\tmp\Release\PDBsToPublish\Microsoft.Win32.SystemEvents\net9.0-windows\Microsoft.Win32.SystemEvents.pdb' due to 'Could not find a part of the path 'D:\a\_work\1\s\src\runtime\artifacts\tmp\Release\PDBsToPublish\Microsoft.Win32.SystemEvents\net9.0-windows\Microsoft.Win32.SystemEvents.pdb'.'.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\_work\1\s\src\runtime\artifacts\tmp\Release\PDBsToPublish\Microsoft.Win32.SystemEvents\net9.0-windows\Microsoft.Win32.SystemEvents.pdb'.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)

<!--
Publish Windows PDBs produced by SymStore.targets (by default, only shipping PDBs are placed there).
SymbolUploader doesn't support embedded PDBs yet, so let SymStore.targets do the conversion for now.
https://github.com/dotnet/symstore/issues/143
-->
<ItemGroup>
<FilesToPublishToSymbolServer Include="$(ArtifactsSymStoreDirectory)**\*.pdb"/>
</ItemGroup>
<!--
The below lines comprise workarounds for two issues:
- AzDO logging commands don't let us add subfolders by executing different `##vso` commands:
https://github.com/microsoft/azure-pipelines-tasks/issues/11689 . Therefore a parent folder
containing all desired subfolders is published. The primary goal of these artifacts isn't
to be browsable by humans. The target that publish the symbols will filter and publish only
the PDB files.
- It's possible that the user have PDBs outside the Arcade.SDK standard folder
(artifacts/SymStore/$Configuration) and we need to maintain that support. For that reason,
and the one mentioned above, we copy all files in `FilesToPublishToSymbolServer` to a temporary
folder before adding them to the AzDO artifact container.
-->
<Copy
SourceFiles="@(FilesToPublishToSymbolServer)"
DestinationFiles="@(FilesToPublishToSymbolServer->'$(PDBsToPublishTempLocation)%(RecursiveDir)%(Filename)%(Extension)')"
/>
<Message
Text="##vso[artifact.upload containerfolder=PdbArtifacts;artifactname=PdbArtifacts]$(PDBsToPublishTempLocation)"
Importance="high"
Condition="'@(FilesToPublishToSymbolServer)' != ''"/>

I think what is going on here is that when PushToLocalStorage is true, we copy most assets to the local artifacts directory. But the end of this target queues AzDO upload commands for any PDB artifacts. When we clean after building, this may mean that the uploads fail because the source files get deleted (the uploads are async).

I think what should be going on here is that PushToBuildStorage should take the input PDB artifacts and handle them the same way it handles assets or packages based on the PushToLocalStorage value. We also then need to ensure that the PDBArtifacts artifact gets properly created and populated at the end of a vertical.

@mmitche mmitche converted this from a draft issue Jan 23, 2025
@mmitche
Copy link
Member Author

mmitche commented Jan 23, 2025

@NikolaMilosavljevic FYI and case you have any thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant