Repository navigation
Enable osx-x64 in PR validation - #4720
ViktorHofer wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the VMR Azure Pipelines stage templates to include an osx-arm64 unified-build leg as part of PR (and other default verification-driven) validation.
Changes:
- Adds a new verification-driven job in
vmr-verticals.ymlto run anOSXbuild targetingosx/arm64whenunified-build-osx-arm64is selected. - Registers
unified-build-osx-arm64in the defaultverificationslist invmr-build.yml. - Removes the previously unconditional
osx/arm64OSXjob from the full-build job list to avoid redundant execution now that it’s verification-driven.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/pipelines/templates/stages/vmr-verticals.yml | Adds the conditional osx-arm64 unified-build job and removes the unconditional duplicate job from the full-build section. |
| eng/pipelines/templates/stages/vmr-build.yml | Adds unified-build-osx-arm64 to the default PR verification list so the new leg is enabled by default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
We build on x64 Macs in public so you can't run arm64 bits in scenario-tests there |
|
I like it in theory but it will put even more stress on the hosted pool... |
|
Agreed that this isn't helping with our limited capacity but we can always revert if necessary. |
@mmitche these failures are interesting. Tells me:
|
|
@ellahathaway @mmitche can you please help me diagnose if the added osx-x64 job tries to real sign here in public? |
The job is dry run signing, so it is not attempting to real sign. |
|
OK then that probably means that dry-run signing doesn't correctly handle symlinks, hardlinks or pkg files? cc @MichaelSimons I see the same failures in the public scheduled (daily) build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1297350&view=logs&j=3ac9c5cd-f25e-53e7-1c9b-f058b1dbaa18&t=05376304-94d7-5e9d-7761-01060cc44912 |
Can we have the OSX job upload the runtime artifacts even when signing in that leg fails? I pulled the runtime artifacts from an official build that published the runtime artifacts, and they pass dry-run signing (link to pipeline run). I’m wondering if the PR build is producing a different artifact structure/layout, and having the failing leg’s runtime artifacts would help confirm. |
|
That's a great idea but a bit hard to implement with our current infrastructure. We would need to make Publish.proj (Arcade) run even when Sign.proj fails. EDIT: Let's see if that helps. |
|
I was able to repro the error locally with the |
I discovered what I appears to be the same issue and fixed it in dotnet/arcade#16536. |
|
Looks like dry run signing the .tar.gz file on osx is still broken. @ellahathaway / @MichaelSimons any idea what the next step should be here? |
Is it possible that the artifact is structured incorrectly? We're not seeing this issue in official builds and Michael fixed the suspected SignTool issue. |
|
Do the default official builds dry run sign? I thought they would maybe test sign.
Hmm, not sure... |
I think default official builds on non-release branches don't sign at all, not even dry run signing. I would expect to see this error in any official build that real signs or dry-run signs though (test signing is not supported on non-windows) |
We haven't seen this in the p2 build, so maybe something else is going on. |
|
This is only showing up in public... We could diff the .tar.gz produced here with one produced internally from the same SHA. |
|
Looking a bit closer here: |
|
The "large sections of zero bytes" is pretty interesting there. Hypothesis would be that the Other possibility is that the macOS machines in internal CI vs. public have different tar implementations. |
macOS bsdtar (libarchive) detects sparse files by default and encodes them using GNU sparse format 1.0 via PAX extended attributes. This causes entry names to contain 'GNUSparseFile.0' path segments instead of the real file names, because .NET's TarReader doesn't process the GNU.sparse.name PAX attribute. DLLs on APFS can be detected as sparse due to zero-filled PE alignment sections. Adding --no-read-sparse disables sparse detection during archive creation, ensuring normal tar entries are written. Co-authored-by: Copilot <[email protected]>
|
If this works, it's somewhat likely that there are bugs in .NET's tar implementation again. |
| Condition="'$(_CurrentArchiveFormat)' == 'zip'"/> | ||
| <!-- use parallel gzip implementation when available --> | ||
| <Exec Command="tar -cf - . | pigz > "$(_DestinationFileName)"" | ||
| <Exec Command="tar --no-read-sparse -cf - . | pigz > "$(_DestinationFileName)"" |
There was a problem hiding this comment.
@mmitche the tar on my macOS 14 machine doesn't have the --no-read-sparse option, I guess it might also not be available in some Linux distros. But let's see if it indeed would fix the issue.
We're using macOS 15 both internally and externally, the only difference is public uses x64 while internal uses arm64 (not sure if there can be difference in the tar version) |
macOS bsdtar detects sparse files by default and encodes them using GNU sparse format 1.0 via PAX extended attributes. .NET's TarReader doesn't handle these entries, exposing 'GNUSparseFile.0' placeholder paths instead of real file names (dotnet/runtime#125281). Adding --no-read-sparse disables sparse detection, ensuring normal tar entries are written. Co-authored-by: Copilot <[email protected]>
Removed ContinueOnError attribute from Sign.proj.
|
@mmitche your commits resolved the issue! Nice find. What are the next steps? Alex indicated that we can't merge this in given that not all tar installations have that command available. |
|
I wonder if #5281 also plays into this. |
|
We could use the workaround and scope to osx-only builds with some detected version, while we wait for resolution of dotnet/runtime#125281 |
|
|
OK this is still an issue. The OSX legs are failing when triggering the osx job in public via azp run dotnet-unified-build-full. @mmitche do you remember what the cause was exactly? Would be good file a BCL issue in the Tar implementation if necessary. |
|
Closing. I'm not interested in adding the osx-x64 job to the PR validation when it takes over 4 hours. Until three days ago, OSX ran just fine publicly now in the scheduled public builds. So the previously discussed issue is already resolved. |
Diagnosing "Run Tests" (scenario-tests) failures only in the official build later is really annoying. Would be good to guard full stack osx build in PR.