-
Notifications
You must be signed in to change notification settings - Fork 786
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
[repo] CI improvements #5023
[repo] CI improvements #5023
Conversation
This reverts commit 9e51290.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5023 +/- ##
==========================================
- Coverage 83.38% 83.18% -0.21%
==========================================
Files 297 271 -26
Lines 12531 11968 -563
==========================================
- Hits 10449 9955 -494
+ Misses 2082 2013 -69
Flags with carried forward coverage won't be shown. Click here to find out more. |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
@CodeBlanch Could you also do this for the Coyote checks introduced in #4879? |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Love this! |
@TimothyMothra I pushed an update adding some comments into the child workflows. |
packaged-code: ['src/**', '!**/*.md'] | ||
api-code: ['*/OpenTelemetry.Api*/**', '!**/*.md'] | ||
api-packages: ['src/OpenTelemetry.Api*/**', '!**/*.md'] | ||
instrumentation: ['*/OpenTelemetry.Instrumentation*/**', 'test/TestApp.AspNetCore/**', '!**/*.md'] |
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.
given this repo only has well defined components this is okay. The contrib repo needs some changes to the wording in https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/CONTRIBUTING.md#contributing-a-new-project I believe, so that new components get CI covered. Not a blocker for this PR, just something to be addressed in contrib repo.
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.
Any new component added in the contrib repo would still get CI covered. It's just that if the new component does not a component specific proj
file, any changes to the component would trigger CI for every project in the solution that does not have a dedicated proj
file. That's because the filtering logic would determine that the CI needs to run for every project that does not have a dedicated proj file.
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.
We probably should update the CONTRIBUTING.md to mention that new contributios could have a more efficient CI check by introducing a dedicated proj
file for their component.
@CodeBlanch Need this change here as well? open-telemetry/opentelemetry-dotnet-contrib#1487 |
Good question! We don't need the powershell part because we aren't using that in this repo. The other bits from that PR...
|
- "build" | ||
- "docs" | ||
- "examples" | ||
- "src/Shared" |
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.
Should shared files under src
be excluded?
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.
Good question. This was copied from contrib but probably shouldn't be here. I'm thinking I'm going to leave it alone to see how codecov handles the new ci and come back to this later to smooth out any rough edges. I haven't figured out a way to make codecov really useful yet on contrib either 🤣
unittests-Instrumentation-Stable: | ||
carryforward: true | ||
paths: | ||
- src |
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.
Update path for instrumentation?
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.
Not sure on this either. InstrumentationLibraries.proj actually builds and tests everything so this should be fine but 🤷 I'm considering code coverage as a WIP!
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.
This is a great improvement! Left some comments about codecov.yml which if need to be addressed could be addressed in another PR.
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Changes
We recently overhauled the CI on the contrib repo to support more granular selection of jobs/tasks so that we can run subsets of the pipeline based on what is being changed. This PR brings that set up over to the main repo. We no longer need the "-md" versions of workflows and we can now be more selective about what we run.
The main workflow "ci.yml" now decides what to run based on the files being changed. High-level overview:
InstrumentationLibraries.proj
in stable & experimental modes against the stable NuGet versions of dependencies.All build+test runs have been refactored into a reusable workflow
Component.BuildTest.yml
. The main goal with that is to reduce the amount duplicated code and spots that need to be updated when we add a new TFM. All the steps also now have unique names so the checks UI is easier to read. After this PR the only required action will be "build-test" which is the step in the main workflow which joins everything together once complete.