Skip to content

[infra] Use Artifacts Output layout #6301

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

martincostello
Copy link
Member

Fixes #6256.

Changes

Use Artifacts Output layout to make build output easy to locate.

This has the additional effect of de-nesting the structure of the ZIP files containing the packages that are uploaded to GitHub Actions artifacts.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@github-actions github-actions bot added infra Infra work - CI/CD, code coverage, linters documentation Documentation related labels Jun 3, 2025
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.75%. Comparing base (e21e9cc) to head (9570549).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6301      +/-   ##
==========================================
- Coverage   86.76%   86.75%   -0.01%     
==========================================
  Files         258      258              
  Lines       11879    11879              
==========================================
- Hits        10307    10306       -1     
- Misses       1572     1573       +1     
Flag Coverage Δ
unittests-Project-Experimental 86.37% <ø> (ø)
unittests-Project-Stable 86.67% <ø> (+0.03%) ⬆️
unittests-Solution 86.57% <ø> (-0.13%) ⬇️
unittests-UnstableCoreLibraries-Experimental 85.87% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

@martincostello
Copy link
Member Author

Need to investigate and fix the flakiness with the projects in the docs folder.

@martincostello martincostello marked this pull request as ready for review June 3, 2025 16:54
@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 16:54
@martincostello martincostello requested a review from a team as a code owner June 3, 2025 16:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the build and packaging layout to use the new Artifacts Output layout, simplifying the structure of ZIP files and making build outputs easier to locate. Key changes include:

  • Adding an Import of a centralized Directory.Build.props file in test, src, examples, and docs.
  • Redirecting build output paths in PowerShell scripts to use a new artifacts directory.
  • Updating GitHub workflow definitions to publish and validate packages from the new artifacts paths.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/Directory.Build.props Added Import to parent Directory.Build.props
src/Directory.Build.props Added Import to parent Directory.Build.props
examples/Directory.Build.props Added Import to parent Directory.Build.props
docs/Directory.Build.props Added Import and opted out of Artifacts Output for docs
build/scripts/test-threadSafety.ps1 Updated the artifacts path for test build output
build/scripts/test-aot-compatibility.ps1 Redirected Publish path to the new artifacts layout for AOT compatibility test
build/Common.prod.props Removed PackageOutputPath to transition to the new artifacts layout
Directory.Build.props Added new properties for Artifacts Output configuration
.github/workflows/publish-packages-1.0.yml Updated artifact paths from src to the artifacts directory
.github/workflows/package-validation.yml Updated artifact paths from src to the artifacts directory
Comments suppressed due to low confidence (4)

build/Common.prod.props:20

  • Removal of PackageOutputPath may cause unexpected publishing behavior if the artifacts output is not correctly redirected; please verify that the new configuration handles all legacy scenarios.
<PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath>

build/scripts/test-threadSafety.ps1:19

  • [nitpick] Ensure that the updated artifacts path is accurate across environments and consistently used throughout the build scripts.
$artifactsPath = Join-Path $rootDirectory "artifacts/bin/$testProjectName/$($configuration.ToLowerInvariant())_$targetFramework"

.github/workflows/publish-packages-1.0.yml:83

  • [nitpick] Confirm that the new artifact path aligns with the overall output layout and that the updated path correctly locates the packages for publishing.
path: ./artifacts/package/release

.github/workflows/package-validation.yml:33

  • [nitpick] Verify that the new artifact directory is correctly accessible and that file permissions in the validation environment will not block artifact retrieval.
path: ./artifacts/package/release

Use Artifacts Output layout to make build output easy to locate.

Resolves open-telemetry#6256.
- Fix output paths.
- Fix `$coyoteVersion` not being used.
Improvement moved to open-telemetry#6302- back out the change that silently broke the workflow.
Various docs projects have the same project names, meaning they output to the same directories on disk and cause write-conflicts if artifacts output is enabled for them.
Restore the file pattern for publishing to MyGet.
@martincostello martincostello marked this pull request as draft June 12, 2025 17:05
Fix incorrect path to artifacts to sign.
@martincostello martincostello force-pushed the gh-6256-artifacts-output branch from bc6f348 to aa5fd6b Compare June 12, 2025 17:39
Restore missing flag.
@martincostello martincostello marked this pull request as ready for review June 12, 2025 17:40
@@ -0,0 +1,6 @@
<Project>
Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj Jun 18, 2025

Choose a reason for hiding this comment

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

Historically, this repo has avoided using a Directory.Build.props at the root and instead scoped props to src/, test/, etc. Introducing a root-level props file changes the MSBuild evaluation scope and might unintentionally affect folders like tools/, examples/, or future additions.

Would it be better to keep this scoped inside src/ or test/, and have src/test import it explicitly if needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Artifacts output requires it to be at the solution root.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with the artifacts folder, but I have concerns regarding Directory.Build.props.

Copy link
Member Author

Choose a reason for hiding this comment

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

To not have that file at the root you're fighting the tooling because Artifacts Output specifically wants that file at that location to enable it. If you define the property elsewhere it generates an error and tells you to move it.

I did try putting it in the existing files, and then the output was in the wrong place and needed defining in multiple places. I was fighting the tooling.

Having the file at the root fits with the .NET SDK defaults and what someone uninitiated walking up to the repo would expect to find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related infra Infra work - CI/CD, code coverage, linters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] Use Artifacts Output Layout
3 participants