-
Notifications
You must be signed in to change notification settings - Fork 825
[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
base: main
Are you sure you want to change the base?
[infra] Use Artifacts Output layout #6301
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. |
Need to investigate and fix the flakiness with the projects in the |
There was a problem hiding this 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.
Fix incorrect path to artifacts to sign.
bc6f348
to
aa5fd6b
Compare
Restore missing flag.
@@ -0,0 +1,6 @@ | |||
<Project> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
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
CHANGELOG.md
files updated for non-trivial changes